Click or drag to resize
Accord.NET (logo)

IndependentComponentAnalysis Class

Independent Component Analysis (ICA).
Inheritance Hierarchy
SystemObject
  Accord.MachineLearningTransformBaseDouble, Double
    Accord.MachineLearningMultipleTransformBaseDouble, Double
      Accord.Statistics.AnalysisIndependentComponentAnalysis

Namespace:  Accord.Statistics.Analysis
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.6.0
Syntax
[SerializableAttribute]
public class IndependentComponentAnalysis : MultipleTransformBase<double[], double>, 
	IMultivariateAnalysis, IAnalysis, IParallel, ISupportsCancellation, IUnsupervisedLearning<MultivariateLinearRegression, double[], double[]>
Request Example View Source

The IndependentComponentAnalysis type exposes the following members.

Constructors
  NameDescription
Public methodIndependentComponentAnalysis(Double) Obsolete.
Constructs a new Independent Component Analysis.
Public methodIndependentComponentAnalysis(Double, AnalysisMethod) Obsolete.
Constructs a new Independent Component Analysis.
Public methodIndependentComponentAnalysis(Double, IndependentComponentAlgorithm) Obsolete.
Constructs a new Independent Component Analysis.
Public methodIndependentComponentAnalysis(AnalysisMethod, IndependentComponentAlgorithm)
Constructs a new Independent Component Analysis.
Public methodIndependentComponentAnalysis(Double, AnalysisMethod, IndependentComponentAlgorithm) Obsolete.
Constructs a new Independent Component Analysis.
Public methodIndependentComponentAnalysis(Double, AnalysisMethod, IndependentComponentAlgorithm) Obsolete.
Constructs a new Independent Component Analysis.
Top
Properties
  NameDescription
Public propertyAlgorithm
Gets or sets the FastICA algorithm used by the analysis.
Public propertyComponents
Gets the Independent Components in a object-oriented structure.
Public propertyContrast
Gets or sets the Contrast function to be used by the analysis.
Public propertyDemixingMatrix
Gets a matrix containing the demixing coefficients for the original source data being analyzed. Each column corresponds to an independent component.
Public propertyIterations
Gets or sets the maximum number of iterations to perform. If zero, the method will run until convergence.
Public propertyMeans
Gets the column means of the original data.
Public propertyMethod
Gets or sets the normalization method used for this analysis.
Public propertyMixingMatrix
Gets a matrix containing the mixing coefficients for the original source data being analyzed. Each column corresponds to an independent component.
Public propertyNumberOfInputs
Gets the number of inputs accepted by the model.
(Inherited from TransformBaseTInput, TOutput.)
Public propertyNumberOfOutputs
Gets the number of outputs generated by the model.
(Inherited from TransformBaseTInput, TOutput.)
Public propertyOverwrite
Gets or sets whether calculations will be performed overwriting data in the original source matrix, using less memory.
Public propertyParallelOptions
Gets or sets the parallelization options for this algorithm.
Public propertyResult Obsolete.
Gets the resulting projection of the source data given on the creation of the analysis into the space spawned by independent components.
Public propertySource Obsolete.
Source data used in the analysis.
Public propertyStandardDeviation
Gets the column standard deviations of the original data.
Public propertyToken
Gets or sets a cancellation token that can be used to cancel the algorithm while it is running.
Public propertyTolerance
Gets or sets the maximum absolute change in parameters between iterations that determine convergence.
Public propertyWhiteningMatrix
Gets the whitening matrix used to transform the original data to have unit variance.
Top
Methods
  NameDescription
Protected methodAdjust(Double, Boolean)
Obsolete
Protected methodAdjust(Single, Boolean)
Obsolete
Public methodCombine(Double) Obsolete.
Combines components into a single mixture (mixing).
Public methodCombine(Single) Obsolete.
Combines components into a single mixture (mixing).
Public methodCompute Obsolete.
Computes the Independent Component Analysis algorithm.
Public methodCompute(Int32) Obsolete.
Computes the Independent Component Analysis algorithm.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLearn
Learns a model that can map the given inputs to the desired outputs.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSeparate(Double) Obsolete.
Separates a mixture into its components (demixing).
Public methodSeparate(Single) Obsolete.
Separates a mixture into its components (demixing).
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTransform(TInput)
Applies the transformation to an input, producing an associated output.
(Inherited from MultipleTransformBaseTInput, TOutput.)
Public methodTransform(TInput)
Applies the transformation to a set of input vectors, producing an associated set of output vectors.
(Inherited from MultipleTransformBaseTInput, TOutput.)
Public methodTransform(TInput, TOutput)
Applies the transformation to an input, producing an associated output.
(Inherited from MultipleTransformBaseTInput, TOutput.)
Public methodTransform(Double, Double)
Applies the transformation to an input, producing an associated output.
(Overrides MultipleTransformBaseTInput, TOutputTransform(TInput, TOutput).)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodToT
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

Independent Component Analysis is a computational method for separating a multivariate signal (or mixture) into its additive subcomponents, supposing the mutual statistical independence of the non-Gaussian source signals.

When the independence assumption is correct, blind ICA separation of a mixed signal gives very good results. It is also used for signals that are not supposed to be generated by a mixing for analysis purposes.

A simple application of ICA is the "cocktail party problem", where the underlying speech signals are separated from a sample data consisting of people talking simultaneously in a room. Usually the problem is simplified by assuming no time delays or echoes.

An important note to consider is that if N sources are present, at least N observations (e.g. microphones) are needed to get the original signals.

References:

  • Hyvärinen, A (1999). Fast and Robust Fixed-Point Algorithms for Independent Component Analysis. IEEE Transactions on Neural Networks, 10(3),626-634. Available on: http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.50.4731
  • E. Bingham and A. Hyvärinen A fast fixed-point algorithm for independent component analysis of complex-valued signals. Int. J. of Neural Systems, 10(1):1-8, 2000.
  • FastICA: FastICA Algorithms to perform ICA and Projection Pursuit. Available on: http://cran.r-project.org/web/packages/fastICA/index.html
  • Wikipedia, The Free Encyclopedia. Independent component analysis. Available on: http://en.wikipedia.org/wiki/Independent_component_analysis

Examples
// Let's create a random dataset containing
// 5000 samples of two dimensional samples.
// 
double[][] source = Jagged.Random(5000, 2);

// Now, we will mix the samples the dimensions of the samples.
// A small amount of the second column will be applied to the
// first, and vice-versa. 
// 
double[][] mix =
{
    new double[] {  0.25, 0.25 },
    new double[] { -0.25, 0.75 },    
};

// mix the source data
double[][] input = source.Multiply(mix);

// Now, we can use ICA to identify any linear mixing between the variables, such
// as the matrix multiplication we did above. After it has identified it, we will
// be able to revert the process, retrieving our original samples again

// Create a new Independent Component Analysis
var ica = new IndependentComponentAnalysis()
{
    Algorithm = IndependentComponentAlgorithm.Parallel,
    Contrast = new Logcosh()
};

// Learn the demixing transformation from the data
MultivariateLinearRegression demix = ica.Learn(input);

// Now, we can retrieve the mixing and demixing matrices that were 
// used to alter the data. Note that the analysis was able to detect
// this information automatically:

double[][] mixingMatrix = ica.MixingMatrix; // same as the 'mix' matrix
double[][] revertMatrix = ica.DemixingMatrix; // inverse of the 'mix' matrix

// We can use the regression to recover the separate sources
double[][] result = demix.Transform(input);
See Also