Accord.Tests.Statistics.PrincipalComponentAnalysisTest.transform_more_columns_than_samples_new_interface C# (CSharp) Method

transform_more_columns_than_samples_new_interface() private method

private transform_more_columns_than_samples_new_interface ( ) : void
return void
        public void transform_more_columns_than_samples_new_interface()
        {
            // Lindsay's tutorial data
            var datat = data.Transpose().ToJagged();

            var target = new PrincipalComponentAnalysis();

            // Compute
            var regression = target.Learn(datat);

            // Transform
            double[][] actual = target.Transform(datat);

            // Assert the scores equals the transformation of the input
            Assert.IsNull(target.Result);

            double[,] expected = 
            {
                {  0.50497524691810358, -0.00000000000000044408920985006262 },
                { -0.504975246918104,   -0.00000000000000035735303605122226 }
            };

            Assert.IsTrue(Matrix.IsEqual(expected, actual, 0.01));

            actual = target.Transform(datat);
            Assert.IsTrue(Matrix.IsEqual(expected, actual, 0.01));
        }