コード例 #1
0
        private async void GoButton_Click(object sender, RoutedEventArgs e)
        {
            LeftPanel.Children.Clear();
            RightPanel.Children.Clear();

            string fileName = AppDomain.CurrentDomain.BaseDirectory + "train.csv";

            int offset      = int.Parse(Offset.Text);
            int recordCount = int.Parse(RecordCount.Text);

            string[] rawTrain = await Task.Run(() => Loader.trainingReader(fileName, offset, recordCount));

            string[] rawValidation = await Task.Run(() => Loader.validationReader(fileName, offset, recordCount));

            var manhattanClassifier = Recognizers.manhattanClassifier(rawTrain);

            var manhattanRecognizer = new RecognizerControl(
                "Manhattan Classifier", manhattanClassifier,
                rawValidation);

            LeftPanel.Children.Add(manhattanRecognizer);

            var euclideanClassifier = Recognizers.euclideanClassifier(rawTrain);

            var euclideanRecognizer = new RecognizerControl(
                "Euclidean Classifier", euclideanClassifier,
                rawValidation);

            RightPanel.Children.Add(euclideanRecognizer);
        }
コード例 #2
0
        private void GoButton_Click(object sender, RoutedEventArgs e)
        {
            LeftPanel.Children.Clear();
            RightPanel.Children.Clear();

            string[] rawData = FileLoader.LoadDataStrings();

            var manhattanRecognizer = new RecognizerControl(
                "Manhattan Classifier", Recognizer.manhattanClassifier,
                rawData);

            LeftPanel.Children.Add(manhattanRecognizer);

            var euclideanRecognizer = new RecognizerControl(
                "Euclidean Classifier", Recognizer.euclideanClassifier,
                rawData);

            RightPanel.Children.Add(euclideanRecognizer);
        }
コード例 #3
0
        private void GoButton_Click(object sender, RoutedEventArgs e)
        {
            LeftPanel.Children.Clear();
            RightPanel.Children.Clear();

            int recordCount = int.Parse(RecordCount.Text);
            int offset = int.Parse(Offset.Text);

            string[] rawData = FileLoader.LoadDataStrings(recordCount, offset);

            var manhattanRecognier = new RecognizerControl(
                "Manhattan Classifier", Recognizer.manhattanClassifier,
                rawData);
            LeftPanel.Children.Add(manhattanRecognier);

            var euclideanRecognizer = new RecognizerControl(
                "Euclidean Classifier", Recognizer.euclideanClassifier,
                rawData);
            RightPanel.Children.Add(euclideanRecognizer);
        }