GaussianCorrection#

class skfda.preprocessing.dim_reduction.variable_selection.recursive_maxima_hunting.GaussianCorrection(*, mean=0, cov=1)[source]#

Correction assuming that the underlying process is Gaussian.

The conditional mean of a Gaussian process \(X(t)\) is

\[\mathbb{E}[X(t) \mid X(t_0) = x_0] = \mathbb{E}[X(t)] + \frac{\mathrm{Cov}[X(t), X(t_0)]}{\mathrm{Cov}[X(t_0), X(t_0)]} (X(t_0) - \mathbb{E}[X(t_0)])\]

The corrections after this is applied are of type GaussianConditionedCorrection.

Parameters:
  • mean (Union[float, Callable[[NDArrayFloat], NDArrayFloat]]) – Mean function of the Gaussian process.

  • cov (Union[float, CovarianceLike]) – Covariance function of the Gaussian process.

Methods

conditional_mean(X, selected_index)

Mean of the process conditioned to the value observed.

conditioned(*, X, T, t_0)

Return a correction object conditioned to the value of a point.

correct(X, selected_index)

Correct the trajectories.

fit(X, y)

Initialize the correction for a run.

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

set_params(**params)

Set the parameters of this estimator.

conditional_mean(X, selected_index)[source]#

Mean of the process conditioned to the value observed.

Parameters:
  • X (FDataGrid) – Functions in the current iteration of the algorithm.

  • selected_index (int or tuple of int) – Index of the selected point in the data_matrix.

Return type:

FDataGrid

conditioned(*, X, T, t_0)[source]#

Return a correction object conditioned to the value of a point.

This method is necessary because after the RMH correction step, the functions follow a different model.

Parameters:
Return type:

Correction

correct(X, selected_index)[source]#

Correct the trajectories.

This method subtracts the influence of the selected point from the other points in the function.

Parameters:
  • X (FDataGrid) – Functions in the current iteration of the algorithm.

  • selected_index (Tuple[int, ...]) – Index of the selected point in the data_matrix.

Return type:

FDataGrid

fit(X, y)[source]#

Initialize the correction for a run.

The initial parameters of Recursive Maxima Hunting can be used there.

Parameters:
Return type:

None

get_metadata_routing()#

Get metadata routing of this object.

Please check User Guide on how the routing mechanism works.

Returns:

routing – A MetadataRequest encapsulating routing information.

Return type:

MetadataRequest

get_params(deep=True)#

Get parameters for this estimator.

Parameters:

deep (bool, default=True) – If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns:

params – Parameter names mapped to their values.

Return type:

dict

set_params(**params)#

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Parameters:

**params (dict) – Estimator parameters.

Returns:

self – Estimator instance.

Return type:

estimator instance