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()); }
public void ProjectMatrix_CountOutOfRange_ThrowsException(int count) { pca.Compute(inputMatrix); Assert.Throws <ArgumentOutOfRangeException>(() => { pca.ProjectMatrix(inputMatrix, count); }); }