/// <summary>Constructs a new Independent Component Analysis.</summary> public IndependentComponentAnalysis(double[,] data, AnalysisMethod method, IndependentComponentAlgorithm algorithm) { if (data == null) throw new ArgumentNullException("data"); this.sourceMatrix = data; this.algorithm = algorithm; this.analysisMethod = method; // Calculate common measures to speedup other calculations this.columnMeans = Accord.Statistics.Tools.Mean(sourceMatrix); this.columnStdDev = Accord.Statistics.Tools.StandardDeviation(sourceMatrix, columnMeans); }
/// <summary> /// Constructs a new Independent Component Analysis. /// </summary> /// /// <param name="data">The source data to perform analysis. The matrix should contain /// variables as columns and observations of each variable as rows.</param> /// <param name="method">The analysis method to perform. Default is /// <see cref="AnalysisMethod.Center"/>.</param> /// <param name="algorithm">The FastICA algorithm to be used in the analysis. Default /// is <see cref="IndependentComponentAlgorithm.Parallel"/>.</param> /// public IndependentComponentAnalysis(double[][] data, AnalysisMethod method = AnalysisMethod.Center, IndependentComponentAlgorithm algorithm = IndependentComponentAlgorithm.Parallel) { if (data == null) { throw new ArgumentNullException("data"); } this.sourceMatrix = data.ToMatrix(); this.algorithm = algorithm; this.analysisMethod = method; // Calculate common measures to speedup other calculations this.columnMeans = Measures.Mean(sourceMatrix); this.columnStdDev = Measures.StandardDeviation(sourceMatrix, columnMeans); }
public IndependentComponentAnalysis(double[,] data, AnalysisMethod method, IndependentComponentAlgorithm algorithm) { if (data == null) { throw new ArgumentNullException("data"); } this.sourceMatrix = data; this.algorithm = algorithm; this.analysisMethod = method; // Calculate common measures to speedup other calculations this.columnMeans = Measures.Mean(sourceMatrix, dimension: 0); this.columnStdDev = Measures.StandardDeviation(sourceMatrix, columnMeans); this.NumberOfInputs = data.Columns(); this.NumberOfOutputs = data.Columns(); }
/// <summary> /// Constructs a new Independent Component Analysis. /// </summary> /// public IndependentComponentAnalysis(AnalysisMethod method = AnalysisMethod.Center, IndependentComponentAlgorithm algorithm = IndependentComponentAlgorithm.Parallel) { this.algorithm = algorithm; this.analysisMethod = method; }
public IndependentComponentAnalysis(double[,] data, IndependentComponentAlgorithm algorithm) : this(data, AnalysisMethod.Center, algorithm) { }