mpcrl.core.schedulers.LogLinearScheduler#
- class mpcrl.core.schedulers.LogLinearScheduler(init_value, final_value, total_steps)[source]#
Bases:
ExponentialScheduler[ScType]Scheduler that updates the scheduled quantity from the initial to the final value in a logarithmic fashion.
In other words, this scheduler updates the initial value of the scheduler towards the final one (to be reached in \(N\) total steps) in a linear fashion between the exponents of the two. Mathematically, at the \(k\)-th step, the value \(v_k\) is
\[v_k = v_0 \exp\left( \text{ln} \left( \frac{v_N}{v_0} \right) \frac{k}{N} \right),\]where \(v_0\) is the initial value, and \(v_N\) the final.
- Parameters:
- init_valuesupports-algebraic-operations
Initial value that will be updated by this scheduler.
- final_valuesupports-algebraic-operations
Final value that will be reached by the scheduler after
total_steps.- total_stepsint
Total number of steps to log-linearly interpolate between
init_valueandfinal_value.
Methods
step()Updates the value of the scheduler by one step.