Schedules

base.BaseAdapter(initial_value, end_value, ...)

Base class for all the adapters

ConstantAdapter(initial_value, end_value, ...)

This adapter keep the current value equals to the initial_value it's mainly used to have an uniform interface when defining a parameter as constant vs as an adapter

ExponentialAdapter(initial_value, end_value, ...)

Adapts the initial value towards the end value using an exponential "decay" function

InverseAdapter(initial_value, end_value, ...)

Adapts the initial value towards the end value using a "decay" function of the form 1/x

PotentialAdapter(initial_value, end_value, ...)

Adapts the initial value towards the end value using a potential "decay" function

class sklearn_genetic.schedules.base.BaseAdapter(initial_value, end_value, adaptive_rate, **kwargs)[source]

Base class for all the adapters

Parameters:
initial_valuefloat,

Initial value to be adapted

end_valuefloat,

The final (asymptotic) value that the initial_value can take

adaptive_ratefloat,

Controls how fast the initial_value approaches the end_value

kwargsdict,

Possible extra parameters, None for now

Attributes:
current_stepint,

The current number of iterations that the adapter has run

current_valuefloat,

The transformed initial_value after current_steps changes

abstract step()[source]

Run one iteration of the transformation

class sklearn_genetic.schedules.ConstantAdapter(initial_value, end_value, adaptive_rate)[source]

This adapter keep the current value equals to the initial_value it’s mainly used to have an uniform interface when defining a parameter as constant vs as an adapter

Parameters:
initial_valuefloat,

Initial value to be adapted

end_valuefloat,

The final (asymptotic) value that the initial_value can take

adaptive_ratefloat,

Controls how fast the initial_value approaches the end_value

Attributes:
current_stepint,

The current number of iterations that the adapter has run

current_valuefloat,

Same as the initial_value

step()[source]

Run one iteration of the transformation

class sklearn_genetic.schedules.ExponentialAdapter(initial_value, end_value, adaptive_rate)[source]

Adapts the initial value towards the end value using an exponential “decay” function

Parameters:
initial_valuefloat,

Initial value to be adapted

end_valuefloat,

The final (asymptotic) value that the initial_value can take

adaptive_ratefloat,

Controls how fast the initial_value approaches the end_value

Attributes:
current_stepint,

The current number of iterations that the adapter has run

current_valuefloat,

The transformed initial_value after current_steps changes

step()[source]

Run one iteration of the transformation

class sklearn_genetic.schedules.InverseAdapter(initial_value, end_value, adaptive_rate)[source]

Adapts the initial value towards the end value using a “decay” function of the form 1/x

Parameters:
initial_valuefloat,

Initial value to be adapted

end_valuefloat,

The final (asymptotic) value that the initial_value can take

adaptive_ratefloat,

Controls how fast the initial_value approaches the end_value

Attributes:
current_stepint,

The current number of iterations that the adapter has run

current_valuefloat,

The transformed initial_value after current_steps changes

step()[source]

Run one iteration of the transformation

class sklearn_genetic.schedules.PotentialAdapter(initial_value, end_value, adaptive_rate)[source]

Adapts the initial value towards the end value using a potential “decay” function

Parameters:
initial_valuefloat,

Initial value to be adapted

end_valuefloat,

The final (asymptotic) value that the initial_value can take

adaptive_ratefloat,

Controls how fast the initial_value approaches the end_value

Attributes:
current_stepint,

The current number of iterations that the adapter has run

current_valuefloat,

The transformed initial_value after current_steps changes

step()[source]

Run one iteration of the transformation