コード例 #1
0
        private void PrintPredictionResults(PokemonPrediction prediction)
        {
            Console.WriteLine();

            var legendaryString = prediction.Prediction ? "Legendary" : "Non-legendary";
            var correct         = prediction.Prediction == prediction.Legendary;

            Console.ForegroundColor = correct ? ConsoleColor.Green : ConsoleColor.Red;
            Console.WriteLine($"{prediction.Name}: {legendaryString} ({correct})");
        }
コード例 #2
0
        public void Predict()
        {
            ITransformer model = LoadModel();

            PredictionEngine <PokemonData, PokemonPrediction> predictionEngine = CreatePredictionEngine(model);

            PokemonPrediction prediction = RunPrediction(predictionEngine);

            PrintPredictionResults(prediction);
        }