Accord.Tests.Statistics.IndependentComponentAnalysisTest.CombineTest C# (CSharp) Method

CombineTest() private method

private CombineTest ( ) : void
return void
        public void CombineTest()
        {
            Accord.Math.Tools.SetupGenerator(0);

            double[,] S = Matrix.Random(5000, 2);

            double[,] A =
            {
                {  0.25, 0.25 },
                { -0.25, 0.75 },    
            };

            double[,] X = S.Multiply(A);

            var ica = new IndependentComponentAnalysis(X);


            ica.Compute(2);

            var result = ica.Result;

            var expected = Accord.Statistics.Tools.ZScores(X);
            var actual = Accord.Statistics.Tools.ZScores(ica.Combine(result));
            Assert.IsTrue(expected.IsEqual(actual, 1e-4));

            expected = X;
            actual = ica.Combine(result);
            Assert.IsTrue(expected.IsEqual(actual, 1e-4));
        }