Skip to content

[VCF] Fix an importing error in the params as dictionary - #2

Open
viccollado wants to merge 1 commit into
yassine-laguel:mainfrom
viccollado:patch-1
Open

[VCF] Fix an importing error in the params as dictionary#2
viccollado wants to merge 1 commit into
yassine-laguel:mainfrom
viccollado:patch-1

Conversation

@viccollado

Copy link
Copy Markdown

When you use a dictionary to set the parameters, if you include in the dictionary the values of: p, starting_point, pen1, pen2, factor_pen2, bund_mu_start, performance_warnings, numba; but you did not include them as parameters, then these values are ommited and the default values in Optimizer are used.

Example, I was using this code:

params = {
    'p'                            : p_level,
    'starting_point'               : np.array([0.5, 1.5, 0.01], dtype=np.float64),
    'pen1'                         : 400.0,
    'pen2'                         : 600.0,
    'pen2_factor'                  : 1.25,
    'bund_mu_start'                : 38.0,
    'bund_mu_low'                  : 1e-3,
    'bund_mu_high'                 : 1e3,
    'bund_mu_inc'                  : 1.05,
    'bund_mu_dec'                  : 0.95,
    'bund_kappa'                   : 1e-4,
    'bund_max_size_bundle_set'     : 20,
    'bund_delta_tol'               : 1e-7,
    'bund_restarting_period'       : 300,
    'bund_mu_restart'              : 38.0,
    'bund_restarting_penalty_slack': 1e-5,
    'bund_restarting_epsilon_eta'  : 1e-4,
    'bund_scaling_term'            : 1.0,
    'bund_epsilon_alpha'           : 0.01,
    'nb_iterations'                : 150,
    'superquantile_smoothing_param': 0.1,
    'numba'                        : False,
    'performance_warnings'         : False,
}


optimizer = Optimizer(problem, params=params)
solution  = optimizer.run(verbose=True)

When I run it, since I did not include

Optimizer(problem, params=params, p=p_level, starting_point=[], ...)

the values of p, starting point,... was set as the default ones.

… arguments

When you use a dictionary to set the parameters, if you include in the dictionary the values of: p, starting_point, pen1, pen2, factor_pen2, bund_mu_start, performance_warnings, numba; but you did not include them as parameters, then these values are ommited and the default values in Optimizer are used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant