Fast Ica Class
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.5
public sealed class FastIca : TransformationModel<double>
- Inheritance
- Object → Model → TransformationModel<Double> → FastIca
Remarks
Independent Component Analysis (ICA) is a computational method for separating a multivariate signal into additive subcomponents that are statistically independent and non-Gaussian. ICA is widely used in signal processing, data analysis, and machine learning for tasks such as blind source separation, feature extraction, and noise reduction.
This class provides an implementation of the FastICA algorithm, which is an efficient and popular method for performing ICA. FastICA can extract independent components from observed data by maximizing non-Gaussianity using fixed-point iteration. The algorithm supports both parallel (symmetric) and deflation (sequential) extraction modes.
Features of this implementation include:
- Support for multiple contrast (nonlinearity) functions: LogCosh, Exponential, and Cubic.
- Configurable number of components to extract.
- Flexible whitening options: skip, arbitrary variance, and unit variance (matching scikit-learn semantics).
- Sign correction to ensure consistent orientation of components.
- Access to mixing and unmixing matrices, source estimates, whitening matrices, and convergence reports.
- API compatibility with common ICA libraries and test suites.
Usage:
var ica = new FastIca(dataFrame);
ica.NumberOfComponents = 3;
ica.ContrastFunction = FastIcaContrastFunction.LogCosh;
ica.Fit();
var sources = ica.Sources;
var mixing = ica.MixingMatrix;
References:
- Hyvärinen, A., & Oja, E. (2000). Independent component analysis: algorithms and applications. Neural Networks, 13(4-5), 411-430.
- Scikit-learn: https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.FastICA.html
Constructors
Fast | Initializes a new instance of the IndependentComponentAnalysis class. |
Fast | Initializes a new instance of the IndependentComponentAnalysis class. |
Fast | Initializes a new instance of the IndependentComponentAnalysis class. |
Fast | Initializes a new instance of the IndependentComponentAnalysis class. |
Fast | Initializes a new instance of the IndependentComponentAnalysis class. |
Fast | Initializes a new instance of the IndependentComponentAnalysis class. |
Properties
Apply | If true, apply sign correction to make the largest absolute value in each column of the mixing matrix positive. Default is true to match common implementations. |
Base |
Gets an index containing the keys of the columns
that are required inputs to the model.
(Inherited from Model) |
Components | Gets the estimated unmixing matrix (components_) with dimensions (nComponents × nFeatures). |
Computed |
Gets whether the model has been computed.
(Inherited from Model) Obsolete. |
Contrast | Gets or sets the contrast (nonlinearity) function used in the FastICA fixed-point iteration. |
Data |
Gets an object that contains all the data used as input to the model.
(Inherited from Model) |
Dewhitening | Gets the dewhitening matrix (inverse of the whitening matrix). |
Features |
Gets a matrix that contains the features.
(Inherited from TransformationModel<T>) |
Fit | Gets the final fit status (converged or iteration limit exceeded). |
Fitted |
Gets whether the model has been computed.
(Inherited from Model) |
Initial | Gets or sets the initial unmixing matrix for warm-start initialization. |
Input |
Gets the schema for the features used for fitting the model.
(Inherited from Model) |
Iterations | Gets the number of iterations performed by the algorithm (n_iter_). |
Log | Gets or sets the alpha parameter for the LogCosh contrast function. |
Max |
Gets or sets the maximum degree of parallelism enabled by this instance.
(Inherited from Model) |
Max | Gets or sets the maximum number of iterations for the FastICA algorithm. |
Means | Gets the feature-wise means computed from the training data. |
Method | Gets or sets the extraction method (parallel or deflation mode). |
Mixing | Gets the estimated mixing matrix (M) with dimensions (nFeatures × nComponents). |
Model |
Gets the collection of variables used in the model.
(Inherited from Model) |
Number | Gets or sets the number of independent components to extract. |
Number |
Gets the number of observations the model is based on.
(Inherited from Model) |
Random | Gets or sets the random number generator used for initialization. |
Solution | Gets the solution report containing convergence information. |
Sources | Gets the estimated source matrix (nSamples × nComponents) if computed during fitting. |
Status |
Gets the status of the model, which determines which information is available.
(Inherited from Model) |
Supports |
Indicates whether the model supports case weights.
(Inherited from Model) |
Tolerance | Gets or sets the convergence tolerance for the FastICA algorithm. |
Unmixing | Gets the unmixing matrix (W_full) whose rows are component weight vectors. |
Weights |
Gets or sets the actual weights.
(Inherited from Model) |
Whiten | Gets or sets the whitening (pre-processing) mode. |
Whitening | Gets the whitening matrix (K) used during preprocessing. |
Methods
Compute() |
Computes the model.
(Inherited from Model) Obsolete. |
Compute( |
Computes the model.
(Inherited from Model) Obsolete. |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
Fit() |
Fits the model to the data.
(Inherited from Model) |
Fit( |
Fits the model to the data.
(Inherited from Model) |
Get | Serves as the default hash function. (Inherited from Object) |
Get | Gets the Type of the current instance. (Inherited from Object) |
Inverse |
Applies the inverse transformation to a set of observations.
(Inherited from TransformationModel<T>) |
Inverse |
Applies the inverse transformation to a set of observations.
(Inherited from TransformationModel<T>) |
Inverse |
Applies the inverse transformation to a matrix.
(Overrides TransformationModel<T>.InverseTransformInto(Matrix<Double>, Matrix<Double>)) |
Inverse |
Applies the inverse transformation to a vector.
(Overrides TransformationModel<T>.InverseTransformInto(Vector<Double>, Vector<Double>)) |
Reset |
Clears all fitted model parameters.
(Inherited from Model) Obsolete. |
Reset |
Clears all fitted model parameters.
(Inherited from Model) |
Set |
Uses the specified data frame as the source for all input variables.
(Inherited from Model) |
Summarize() |
Returns a string containing a human-readable summary of the object using default options.
(Inherited from Model) |
Summarize( |
Returns a string containing a human-readable summary of the object using the specified options.
(Inherited from Model) |
ToString | Returns a string that represents the current object. (Inherited from Model) |
Transform( |
Applies the transformation to a set of observations.
(Inherited from TransformationModel<T>) |
Transform( |
Applies the transformation to a single observation.
(Inherited from TransformationModel<T>) |
Transform |
Applies the transformation to a matrix.
(Overrides TransformationModel<T>.TransformInto(Matrix<Double>, Matrix<Double>)) |
Transform |
Applies the transformation to a vector.
(Overrides TransformationModel<T>.TransformInto(Vector<Double>, Vector<Double>)) |