Linesearch

Surrogate Hessian accelerated parallel line-search: line-search

class stalk.ls.FittingFunction(func=None, args={})

Bases: object

args = {}
find_minimum(grid, sgn=1)
find_noisy_minimum(grid, sgn=1, N=200, Gs=None, fraction=0.025)
func = None
get_distribution(grid, sgn=1, N=200, Gs: ndarray = None)
get_x0_distribution(grid, **kwargs)
get_y0_distribution(grid, **kwargs)
property kind
class stalk.ls.FittingResult(x0, y0, x0_err=0.0, y0_err=0.0, fit=None, fraction=0.025)

Bases: object

property analyzed
fit = None
fraction = None
get_force(x)
get_hessian(x)
get_values(x)
x0 = None
x0_err = 0.0
y0 = None
y0_err = 0.0
class stalk.ls.LineSearch(structure=None, hessian=None, d=None, sigma=0.0, offsets=None, M=7, W=None, R=None, pes=None, path='', dep_jobs=None, interactive=False, **ls_args)

Bases: LineSearchBase

property Lambda
property W_max
add_shift(shift)
property d
property direction
evaluate(pes: PesFunction = None, add_sigma=False, **kwargs)

Evaluate the PES on the line-search grid using an evaluation function.

figure_out_offsets(M=7, W=None, R=None, offsets=None)
property hessian
plot(ax=None, color='tab:blue', target=None, **kwargs)
set_grid(**grid_kwargs)
property shifted_params
property sigma
property structure
property valid_W_max
class stalk.ls.LineSearchBase(offsets=None, values=None, errors=None, fraction=0.025, sgn=1, fit_kind='pf3', fit_func=None, fit_args={}, N=200)

Bases: LineSearchGrid

fit_res: FittingResult
plot(ax=None, color='tab:blue', target=None, **kwargs)
search(**ls_overrides)
search_with_error(**ls_overrides)
property settings
property x0
property x0_err
property y0
property y0_err
class stalk.ls.LineSearchGrid(offsets=None, values=None, errors=None)

Bases: object

property R_max
add_point(point)
disable_value(offset)
enable_value(offset)
property errors

Return errors array of valid points

property evaluated

True if all enabled points are evaluated

find_point(point)
get_all()
get_valid()
property grid

Return list of points

property noisy
property offsets

Return offset array of points

plot(ax=None, f=None, color='tab:blue', **kwargs)
set_value_error(offset, value, error=0.0)
property shifted

True if more than two enabled points have been shifted

property valid
property valid_R_max
property valid_errors

Return errors array of valid points

property valid_grid

Return offset array of valid points

property valid_offsets

Return offset array of points

property valid_values

Return values array of valid points

property values

Return values array of points

class stalk.ls.LsSettings(N=200, fraction=0.025, sgn=1, fit_kind=None, fit_func=None, fit_args={})

Bases: object

property N
copy(**ls_overrides)
property fit_func
property fraction
property sgn
class stalk.ls.MorseFit(p0=None)

Bases: FittingFunction

property kind
p0 = None
class stalk.ls.MorseResult(x0, y0, x0_err=0.0, y0_err=0.0, fit=None, fraction=0.025)

Bases: FittingResult

get_force(x, dx=0.0001)
get_hessian(x, dx=0.0001)
get_values(x)
class stalk.ls.PolynomialFit(n)

Bases: FittingFunction

property kind
property n
class stalk.ls.PolynomialResult(x0, y0, x0_err=0.0, y0_err=0.0, fit=None, fraction=0.025)

Bases: FittingResult

get_force(x)
get_hessian(x)
get_values(x)
class stalk.ls.SplineFit

Bases: FittingFunction

property kind
class stalk.ls.SplineResult(x0, y0, x0_err=0.0, y0_err=0.0, fit=None, fraction=0.025)

Bases: FittingResult

get_force(x)
get_hessian(x)
get_values(x)
class stalk.ls.TargetLineSearch(structure=None, hessian=None, d=None, path='', interactive=False, offsets=None, M=7, W=None, R=None, pes=None, bracket=True, bias_order=1, bias_mix=0.0, interpolate_kind='cubic', fit_kind=None, fit_func=None, fit_args={}, **ls_args)

Bases: TargetLineSearchBase, LineSearch

property Gs
property M
property R_opt
property W_opt
compute_bias_of(M=None, R=None, W=None, num_W=10, **ls_args)
property epsilon
property error_surface
figure_out_adjusted_offsets(**grid_args)
generate_error_surface(W_num=3, W_max=None, sigma_num=3, sigma_max=None, noise_frac=0.05, W_resolution=0.1, S_resolution=0.1, verbosity=1)
property grid_opt
insert_W_data(W)
insert_sigma_data(sigma)
optimize(epsilon, max_rounds=10, skip_setup=False, **kwargs)

Optimize W and sigma to a given target error epsilon > 0.

property optimized
plot(ax=None, **kwargs)
plot_error_surface(ax=None)
property resampled
property setup
setup_optimization(W_num=3, W_max=None, sigma_num=3, sigma_max=None, noise_frac=0.05, W_resolution=0.1, S_resolution=0.1, verbosity=1, **ls_overrides)
property sigma_opt
statistical_cost()

Return statistical cost based on sigma and M

property target_settings
to_settings()
class stalk.ls.TargetLineSearchBase(offsets=None, values=None, errors=None, interpolate_kind='cubic', bias_mix=0.0, bias_order=1, target_x0=0.0, target_y0=0.0, fit_kind=None, fit_func=None, fit_args={}, **ls_args)

Bases: LineSearchBase

add_point(point)
bracket_target_bias(bracket_fraction=0.5, M=7, max_iter=10, bias_order=1, **ls_overrides)
compute_bias(grid: LineSearchGrid, **ls_overrides)
compute_error(grid: LineSearchGrid, **ls_overrides)
compute_errorbar(grid: LineSearchGrid, **ls_overrides)
evaluate_target(offsets)
reset_interpolation(interpolate_kind='cubic')
property target_interp
property target_settings
property valid_target
class stalk.ls.TlsSettings(M=None, N=200, Gs=None, bias_order=1, bias_mix=0.0, target_x0=0.0, target_y0=0.0, **ls_args)

Bases: LsSettings

property Gs
property M
property N
property bias_mix
property bias_order
copy(Gs=None, M=None, N=None, **ls_overrides)
get_safe_offsets(offsets)
property interp
property interp_kind
regenerate_Gs(M=None, N=None, Gs=None)
property target