Methods
dummy_minimize(fnc, dimensions, n_callsopt) → {RandomOptimizer}
Minimize a function using a random algorithm.
While naive, such approach is often surprisingly competitive
for hyperparameter tuning purposes. Internally uses RandomOptimizer
class to perform optimization.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fnc |
function | Function to be minimized. | ||
dimensions |
Array | An array of dimensions, that describe a search space for minimization, or an instance of Space object. | ||
n_calls |
Number |
<optional> |
64 | Function evaluation budget. The function will be evaluated for at most this number of times. |
- Source:
Returns:
The optimizer instance, that contains information about found minimum and explored arguments.
- Type
- RandomOptimizer
minimize_GradientDescent(fnc, grd, x0) → {Object}
Minimize an unconstrained function using first order gradient descent algorithm.
Parameters:
Name | Type | Description |
---|---|---|
fnc |
function | Function to be minimized. This function takes array of size N as an input, and returns a scalar value as output, which is to be minimized. |
grd |
function | A gradient function of the objective. |
x0 |
Array | An array of values of size N, which is an initialization to the minimization algorithm. |
- Source:
Returns:
An object instance with two fields: argument, which
denotes the best argument found thus far, and fncvalue, which is a
value of the function at the best found argument.
- Type
- Object
minimize_L_BFGS(fnc, grd, x0) → {Object}
Minimize an unconstrained function using first order L-BFGS algorithm.
Parameters:
Name | Type | Description |
---|---|---|
fnc |
function | Function to be minimized. This function takes array of size N as an input, and returns a scalar value as output, which is to be minimized. |
grd |
function | A gradient function of the objective. |
x0 |
Array | An array of values of size N, which is an initialization to the minimization algorithm. |
- Source:
Returns:
An object instance with two fields: argument, which
denotes the best argument found thus far, and fncvalue, which is a
value of the function at the best found argument.
- Type
- Object
minimize_Powell(fnc, x0) → {Object}
Minimize an unconstrained function using zero order Powell algorithm.
Parameters:
Name | Type | Description |
---|---|---|
fnc |
function | Function to be minimized. This function takes array of size N as an input, and returns a scalar value as output, which is to be minimized. |
x0 |
Array | An array of values of size N, which is an initialization to the minimization algorithm. |
- Source:
Returns:
An object instance with two fields: argument, which
denotes the best argument found thus far, and fncvalue, which is a
value of the function at the best found argument.
- Type
- Object
rs_minimize(fnc, dimensions, n_callsopt, n_random_starts, mutation_rate) → {OMGOptimizer}
Minimize a function using a random algorithm.
While naive, such approach is often surprisingly competitive
for hyperparameter tuning purposes. Internally uses RandomOptimizer
class to perform optimization.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fnc |
function | Function to be minimized. | ||
dimensions |
Array | An array of dimensions, that describe a search space for minimization, or an instance of Space object. | ||
n_calls |
Number |
<optional> |
64 | Function evaluation budget. The function will be evaluated for at most this number of times. |
n_random_starts |
Integer | Determines how many points wil be generated initially at random. The points are not generated at random after this number of evaluations has been reported to the optimizer. | ||
mutation_rate |
Number | A value in the range of (0.0, 1.0] |
- Source:
Returns:
The optimizer instance, that contains information about found minimum and explored arguments.
- Type
- OMGOptimizer
to_space(space_object) → {Space}
A convenience function for conversion of Array of dimensions into a
single Space instance.
Parameters:
Name | Type | Description |
---|---|---|
space_object |
Object | Either an array of dimension objects, or a Space instance. |
- Source:
Returns:
an instance of Space created out of the provided
objects.
- Type
- Space