Comments (5)
I am personally not familiar enough wit this pacage to answer your question, sorry. Someone else might!
from scikit-fda.
Looking that the source code, it seems like _weights variable seems to play important role in cholesky decomposition (error described above).
When not given, fPCA will initialize it to list of zeros with length of a function. I simply put ones instead of zeros when initializing FPCA.
Seems like it is working as expected, since increasing q (=components to keep in PCA) gives smaller error.
q = 5
function_len = train_data[0].data_matrix.squeeze().shape
fpca_clean = FPCA(n_components=q, _weights=np.ones(function_len))
fpca_clean.fit(train_data)
from scikit-fda.
I believe that at the moment, even for FDataGrid
, the package doesn't provide out of the box FPCA for
from scikit-fda.
@eliegoudout
thank you for your reply.
That's a bad news.... :(
Could any other libraries work? (ex. https://fdasrsf-python.readthedocs.io/en/latest/fPCA.html)
At least if it works for regular grid, I think I can process the data with interpolation
from scikit-fda.
As eliegoudout referenced, I'm trying out a method explained in #512 where I can do fPCA with single dimension function (R -> R) and then add up all errors on other dimensions.
However, I'm facing an error "numpy.linalg.LinAlgError: Matrix is not positive definite" when doing
q = 2
fpca_clean = FPCA(n_components=q)
fpca_clean.fit(fd)
it seems like an error while doing inverse transform for PCA. When does it work and when does it not work?
from scikit-fda.
Related Issues (20)
- Change ddof argument to correction in var and cov
- Review and refactor hat matrix code
- AttributeError: SmoothingParameterSearch object has no attribute param_name HOT 7
- Default correction=0 for cov, var
- Add infrastructure for performance/benchmark tests
- Shifting domain
- `FDataGrid.copy` argument `sample _names` default behaviour HOT 2
- Expose the complete API of `AgglomerativeClustering`
- How to deal with unequally spaced data points? HOT 1
- `hat_matrix_` not available for BasisSmoother
- Change covariance function and smoothing kernel nomenclature
- Make squared l2 distance? HOT 1
- Multivariate FPCA not working HOT 1
- fda_kmeans.fit_predict(X) HOT 1
- Default `random_state` for `KMeans` and `FuzzyCMeans` should be `None`
- TypeError: 'ABCMeta' object is not subscriptable HOT 1
- Add explicit validation in scoring functions
- Operations between FData objects and other callables
- Scores for `FDataIrregular` objects HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scikit-fda.