Skip to main content

FastICA

Converter
DashAI.back.converters.scikit_learn.FastICA

Decompose features into statistically independent components using FastICA.

Independent Component Analysis (ICA) models the observed data X as a linear mixture X = A S of latent source signals S that are assumed to be mutually statistically independent and non-Gaussian. FastICA recovers the unmixing matrix W = A^{-1} by maximising the non-Gaussianity of the projected components, using the fixed-point iteration algorithm of Hyvärinen & Oja.

Typical applications include blind source separation (e.g. recovering individual audio signals from a mixture of microphone recordings), removal of artefacts from EEG/fMRI signals, and feature extraction for image processing where latent factors are expected to be non-Gaussian.

Key properties:

  • Unsupervised: does not require labels.
  • The algorithm parameter selects between a fully parallel update (faster) and a sequential deflation strategy (more stable for some data).
  • The contrast function fun (logcosh, exp, or cube) controls the approximation to negentropy used as the independence criterion.
  • Data are whitened before ICA unless whiten=False; the whiten_solver parameter selects between an eigenvalue decomposition and SVD.
  • Component signs and ordering are arbitrary and may differ between runs.

Wraps scikit-learn's FastICA.

References

Parameters

n_components, default=None
Number of components to extract.
algorithm : string, default=parallel
Apply parallel or deflational algorithm for FastICA.
whiten, default=unit-variance
If True, the data is whitened.
fun : string, default=logcosh
Functional form of the G function used in the approximation to neg-entropy.
fun_args, default=None
Arguments to the G function.
max_iter : integer, default=200
Maximum number of iterations to perform.
tol : number, default=0.0001
Tolerance on update at each iteration.
w_init, default=None
Initial guess for the unmixing matrix.
whiten_solver : string, default=svd
The solver to use for whitening.
random_state, default=None
Used to initialize w_init when not specified, with a normal distribution. Pass an int for reproducible results.

Methods

get_output_type(self, column_name: str = None) -> DashAI.back.types.dashai_data_type.DashAIDataType

Defined on FastICA

Return the DashAI data type produced by this converter for a column.

Parameters

column_name : str, optional
Not used; all output columns share the same type. Defaults to None.

Returns

DashAIDataType
A Float type backed by pyarrow.float64().

changes_row_count(self) -> 'bool'

Defined on BaseConverter

Indicate whether this converter changes the number of dataset rows.

Returns

bool
True if the converter may add or remove rows, False otherwise.

fit(self, x: 'DashAIDataset', y: Optional[ForwardRef('DashAIDataset')] = None) -> DashAI.back.converters.base_converter.BaseConverter

Defined on SklearnWrapper

Fit the scikit-learn transformer to the data.

Parameters

x : DashAIDataset
The input dataset to fit the transformer on.
y : DashAIDataset, optional
Target values for supervised transformers. Defaults to None.

Returns

BaseConverter
The fitted transformer instance (self).

get_metadata(cls) -> 'Dict[str, Any]'

Defined on BaseConverter

Get metadata for the converter, used by the DashAI frontend.

Parameters

cls : type
The converter class (injected automatically by Python for classmethods).

Returns

Dict[str, Any]
Dictionary containing display name, short description, image preview path, category, icon, color, and whether the converter is supervised.

get_schema(cls) -> dict

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

transform(self, x: 'DashAIDataset', y: Optional[ForwardRef('DashAIDataset')] = None) -> 'DashAIDataset'

Defined on SklearnWrapper

Transform the data using the fitted scikit-learn transformer.

Parameters

x : DashAIDataset
The input dataset to transform.
y : DashAIDataset, optional
Not used. Present for API consistency. Defaults to None.

Returns

DashAIDataset
The transformed dataset with updated DashAI column types.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.

Parameters

raw_data : dict
A dictionary with the data provided by the user to initialize the model.

Returns

dict
A validated dictionary with the necessary objects.