project¶
-
seas.ica.project(vector: numpy.ndarray, shape: Tuple[int, int, int], roimask: Optional[numpy.ndarray] = None, n_components: Optional[int] = None, svd_multiplier: float = 5, calc_residuals: bool = True)[source]¶ Apply an ica decomposition to the first axis of the input vector. If a roimask is provided, the flattened roimask will be used to crop the vector before decomposition.
If n_components is not set, an adaptive svd threshold is used (see approximate_svd_linearity_transition), with the hyperparameter svd_mutliplier.
Residuals lost in the ICA projection are captured if calc_residuals == True. This represents the signal lost by ICA compression.
- Parameters
vector – The (x*y, t) vector to be spatially ICA projected.
shape – The shape of the original movie (t,x,y).
roimask – The roimask to crop the vectorized movie (x,y).
n_components – Manually request a set number of ICA components.
svd_multiplier – The hyperparameter for svd adaptive thresholding.
calc_residuals – Whether to calculate spatial and temporal residuals of projection compression.
- Returns
A dictionary containing all the results, metadata, and information regarding the filter applied.
- mean:
the original video mean
- roimask:
the mask applied to the video before decomposing
- shape:
the original shape of the movie array
- eig_mix:
the ICA mixing matrix
- timecourses:
the ICA component time series
- eig_vec:
the eigenvectors
- n_components:
the number of components in eig_vec (reduced to only have 25% of total components as noise)
- project_meta:
The metadata for the ica projection
- expmeta:
All metadata created for this class
- lag1:
the lag-1 autocorrelation
- noise_components:
a vector (n components long) to store binary representation of which components were detected as noise
- cutoff:
the signal-noise cutoff value
if the n_components was automatically set, the following additional keys are also returned in components
- svd_cutoff:
the number of components originally decomposed
- lag1_full:
the lag-1 autocorrelation of the full set of components decomposed before cropping to only 25% noise components
- svd_multiplier:
the svd multiplier value used to determine cutoff
- Return type
components