コード例 #1
0
ファイル: Program.cs プロジェクト: voltaiaj/DigitRecall
        static void Main(string[] args)
        {
            var distance = new ManhattanDistance();
            var classifier = new BasicClassifier(distance);

            var trainingPath = @"C:\Users\Alexander\Downloads\trainingsample.csv";
            var training = DataReader.ReadObservations(trainingPath);
            classifier.Train(training);

            var validationaPath = @"C:\Users\Alexander\Downloads\validationsample.csv";
            var validation = DataReader.ReadObservations(validationaPath);

            var correct = Evaluator.Correct(validation, classifier);
            Console.WriteLine("Correctly classified: {0:P2}", correct);

            Console.ReadLine();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            var distance   = new ManhattanDistance();
            var classifier = new BasicClassifier(distance);

            var trainingPath = @"C:\Users\Alexander\Downloads\trainingsample.csv";
            var training     = DataReader.ReadObservations(trainingPath);

            classifier.Train(training);

            var validationaPath = @"C:\Users\Alexander\Downloads\validationsample.csv";
            var validation      = DataReader.ReadObservations(validationaPath);

            var correct = Evaluator.Correct(validation, classifier);

            Console.WriteLine("Correctly classified: {0:P2}", correct);

            Console.ReadLine();
        }