Models

class PyALAF.models.ArrheniusModel(S0, S1, S2, temperature=3.4112229234180456, beta_0=3.0016509079994, random_state=None)[source]

Bases: object

An Arrhenius type model with the form:

\[S = S_0 - S_1 (\beta-\beta_0) - S_2 (\beta-\beta_0)^2\]

where \(S_0\) corresponds to the value of \(S\) at the onset temperature \(T_0\), \(S_1\) is an activation energy and \(S_2\) corresponds to deviations from Arrhenius behaviour. \(\beta\) is the inverse temperature. A model for each of the \(S_i\) is needed.

evaluate(grid, noise)[source]
class PyALAF.models.PolyModel(weights, features='xy', polynomial_degree=2, scaler=None, random_state=None)[source]

Bases: object

Polynomial Model.

evaluate(grid, noise=0)[source]
evaluate_on_grid(n_data, lim=(-2, 2))[source]
class PyALAF.models.PoolModel(features, objective)[source]

Bases: object

A model where data points are taken directly from a pool of already known data.

evaluate(grid, **kwargs)[source]
class PyALAF.models.PrefitModel(model, n_features, scaler=None, fixed_features=None, random_state=None, verbose=False)[source]

Bases: object

Use a prefit sklearn model as true model.

evaluate(grid, noise=0)[source]

Evaluation function.

class PyALAF.models.inv_alos(d=1, random_state=None)[source]

Bases: object

1-dimensional inverted ALOS ( Agglomeration of Locally Optimized Surrogate) function, taken from https://doi.org/10.48550/arXiv.2303.01560. This is similar to the ALOS function multiplied by -1 so that the function has a global maximum instead of a minimum. The inverted ALOS function is given as: $$ f(X) = - sin[ 30 (x-0.9)^4 ] cos[ 2 (x-0.9) ] + (x-0.9)/2 $$ We can also add some noise $epsilon$: $$ f(X) = - sin[ 30 (x-0.9)^4 ] cos[ 2 (x-0.9) ] + (x-0.9)/2 + epsilon $$

evaluate(X, noise=0)[source]

Evaluation function.

class PyALAF.models.inv_rastrigin(d=2, h=10, random_state=None)[source]

Bases: object

N-dimensional inverted rastrigin function. This is similar to the rastrigin function multiplied by -1 so that the function has a global maximum instead of a minimum. The inverted rastrigin function is given as: $$ f(X) = - h cdot n - sum_{i=1}^{n} [x_i^2 - h cos(2 pi x_i)] $$ We can also add some noise $epsilon$: $$ f(X) = - h cdot n - sum_{i=1}^{n} [x_i^2 - h cos(2 pi x_i)]+ epsilon $$

evaluate(X, noise=0)[source]

Evaluation function.

class PyALAF.models.inv_rosenbrock(d=2, random_state=None)[source]

Bases: object

N-dimensional inverted rastrigin function, defined for at least two dimensions. This is similar to the rastrigin function multiplied by -1 so that the function has a global maximum instead of a minimum. The inverted rastrigin function is given as: $$ f(X) = - sum_{i=1}^{n} [100 (x_{i+1} - x_i^2)^2 + (1-x_i)^2 ] $$ We can also add some noise $epsilon$: $$ f(X) = - sum_{i=1}^{n} [100 (x_{i+1} - x_i^2)^2 + (1-x_i)^2 ] + epsilon $$

evaluate(X, noise=0)[source]

Evaluation function.

class PyALAF.models.inv_sphere(d=1, random_state=None)[source]

Bases: object

N-dimensional inverted sphere function. This is similar to the sphere function multiplied by -1 so that the function has a global maximum instead of a minimum. The inverted sphere function is given as: $$ f(x) = -sum_{i=1}^{d}x_i^2 $$ We can also add some noise $epsilon$: $$ f(x) = -sum_{i=1}^{d}x_i^2 + epsilon $$

evaluate(X, noise=0)[source]

Evaluation function.