I performed a PCA on my epoched data and now would like to create a scree plot from the components. For this, I am trying to follow this tutorial. For this, I need to run the follwing line of code to access the % of variance explained by each component:
no need to share the data. Just use a public dataset from mne.datasets and share a full script one can just execute. By doing this effort you allow us to answer more user support questions.
Hi @tempMEG
The error tells you that .explained_variance_ratio_ is not available for UnsupervisedSpatialFilter class. This is because it is an attribute of sklearn PCA object that is stored somewhere inside the UnsupervisedSpatialFilter class.
Based on the docs I would suggest to use .get_params() method to get the attributes of the PCA object.
get_params() gives you the hyperparameters of a sklearn model as passed in the init constructor.
It does not return the fit attributes that end with a trailing _