lucid  0.0.1
Lifting-based Uncertain Control Invariant Dynamics
Loading...
Searching...
No Matches
lucid::MedianHeuristicTuner Class Referencefinal

Tuner that adjusts the kernel parameters using the median heuristic method. More...

#include <MedianHeuristicTuner.h>

Inheritance diagram for lucid::MedianHeuristicTuner:
lucid::Tuner

Public Member Functions

std::string to_string () const override
 Obtain the string representation of this object.
 
- Public Member Functions inherited from lucid::Tuner
void tune (Estimator &estimator, ConstMatrixRef training_inputs, ConstMatrixRef training_outputs) const
 Optimise the kernel hyperparameters.
 
void tune_online (Estimator &estimator, ConstMatrixRef training_inputs, const OutputComputer &training_outputs) const
 Optimise the kernel hyperparameters.
 

Private Member Functions

void tune_impl (Estimator &estimator, ConstMatrixRef training_inputs, const OutputComputer &training_outputs) const override
 Optimise the kernel hyperparameters.
 

Detailed Description

Tuner that adjusts the kernel parameters using the median heuristic method.

It computes the median of pairwise distances between input data points for each dimension. These computed medians are used to update the \( \sigma_l \) parameters of the kernel in the given estimator. More specifically, given a set of training inputs \( \{x_1, x_2, \ldots, x_n\} \) from \( \texttip{\mathcal{X}}{Polish sample vector space} \subseteq \mathbb{R}^d \),

\[\sigma_l = \sqrt{\text{median}\{\|x_i - x_j\|^2 : 1 \le i < j \le n\}} \]

Once the kernel parameters are updated, the estimator is consolidated using the training data.

Note
Based on the paper Large sample analysis of the median heuristic.

Member Function Documentation

◆ to_string()

std::string lucid::MedianHeuristicTuner::to_string ( ) const
nodiscardoverridevirtual

Obtain the string representation of this object.

Returns
string representation of this object

Reimplemented from lucid::Tuner.

◆ tune_impl()

void lucid::MedianHeuristicTuner::tune_impl ( Estimator & estimator,
ConstMatrixRef training_inputs,
const OutputComputer & training_outputs ) const
overrideprivatevirtual

Optimise the kernel hyperparameters.

Starting from the initial guess, the optimiser finds the best hyperparameters for the kernel. It is up to the subclass to determine the optimisation algorithm used.

Note
The method must call the consolidate method of the estimator to ensure that the kernel is ready to be used.
Precondition
The number of rows in the training inputs should be equal to the number of rows in the training outputs.
Todo
If the OutputComputer becomes a bottleneck, consider having a separate method for when the outputs are available from the get-go.
Parameters
estimatorestimator to optimise
training_inputstraining input data
training_outputstraining output data. It uses an OutputComputer to compute the outputs when needed

Implements lucid::Tuner.


The documentation for this class was generated from the following files: