GPmix.Projector
- class GPmix.Projector(basis_type, n_proj=3, basis_params={})[source]
Bases:
objectTransform functional data to a set of univariate data by projection onto specified projection functions.
- Parameters:
basis_type (str) – Specifies the type of projection function. Supported types include: - ‘fourier’: Fourier basis functions. - ‘fpc’: Eigenfunctions from functional principal component analysis. - ‘wavelet’: Discrete wavelet basis. - ‘bspline’: B-spline basis functions. - ‘ou’: Ornstein-Uhlenbeck process realizations. - ‘rl-fpc’: Random linear combinations of eigenfunctions.
n_proj (int, default=3) – Number of projection functions to use (i.e., number of univariate projections).
basis_params (dict, optional) – Dictionary of hyperparameters for basis generation. Supported keys: - ‘period’: Period for Fourier basis. - ‘order’: Order for B-spline basis. - ‘wv_name’: Name of the wavelet (for wavelet basis). - ‘resolution’: Base resolution for wavelet basis.
- basis
The projection functions used.
- Type:
skfda.FDataGrid
- coefficients
Projection coefficients for N samples.
- Type:
ndarray of shape (n_proj, N)
Notes
The class supports orthogonalization of basis functions and can handle several types of bases.
- dilate_translate_signal(signal, n_trans)[source]
Generate dilated and translated versions of a signal over the domain.
- fit(fdata)[source]
Compute the projection coefficients of sample functions.
- Parameters:
fdata (skfda.FDataGrid) – Functional data to project.
- Returns:
Projection coefficients.
- Return type:
ndarray
- get_wavelet_basis(wavelet_name, n)[source]
Construct a wavelet basis using scaling and wavelet functions.
- get_wavelet_signal(wavelet_name)[source]
Retrieve the scaling and wavelet functions for a given discrete wavelet.
- Parameters:
wavelet_name (str) – Name of the discrete wavelet.
- Returns:
scaling_function (ndarray) – The scaling (father) wavelet function.
wavelet_function (ndarray) – The wavelet (mother) function.
- Raises:
ValueError – If the wavelet is not discrete or is unknown.