Closed fabian-sp closed 2 years ago
This is the plot of fpca.components_.data_matrix
when decomposing a Brownian motion with Fourier (which probably does not make a lot of sense).
Ok, I just realized that it always runs ._fit_grid
as I input a FDataGrid
and not a basis. So there is no way of doing a decomposition with respect to a previously chose basis?
So, just to be clear, what you are doing is to express the data in the first principal components. In that case, the input type (FDataGrid
or FDataBasis
) determines the type of the principal components.
If instead what you want is to express your data in a Fourier
basis, you just have to call the to_basis
method with the appropriate basis. You can also use BasisSmoother
for extra functionalities, such as penalizing the curvature or other linear transformation of the data.
Hi,
I have a question on your package. I want to do a Fourier decomposition of a signal defined on
(0,25)
and use the following codeIs this the coorect way? How can I access the basis functions? When I plot
fpca.components_.data_matrix
, I see that these are not always smooth, but I thought that these are the basis functions evaluated on my (time) grid. Also, do you sort the Fourier basis functions internally, or if I fit two different datasets are the coefficients wrt ot exactly the same basis?Thanks a lot!