예제 #1
0
        public void RunTests()
        {
            var stdMatrix = IrisMatrix.Standardize();

            var pca = new PrincipalComponentAnalyzer();

            pca.Compute(stdMatrix);
            var projectedMatrix = pca.ProjectMatrix(stdMatrix, 2);

            File.WriteAllText("G:\\testmat.txt", projectedMatrix.ToMatrixString(projectedMatrix.RowCount, projectedMatrix.ColumnCount));
            Console.WriteLine(projectedMatrix.ToMatrixString());
        }
예제 #2
0
        public void ProjectMatrix_CountOutOfRange_ThrowsException(int count)
        {
            pca.Compute(inputMatrix);

            Assert.Throws <ArgumentOutOfRangeException>(() => { pca.ProjectMatrix(inputMatrix, count); });
        }