private NeuralNetworkPredictionsReport MakePredictionRecordingResult( NeuralNetworkPredictionsReport report, BankTransaction transaction) { logger.LogInformation($"Predicting new transaction. Current report: {report}"); var networkPrediction = networkAccessor.TargetNetwork .PredictionFor(transaction.ToNetworkInputData(), ParallelOptionsExtensions.UnrestrictedMultiThreadedOptions); if (IsCorrectPrediction(networkPrediction, transaction.Class)) { return(NeuralNetworkPredictionsReport.UpdateFor( report, transaction.Class, predictionWasCorrect: true)); } return(NeuralNetworkPredictionsReport.UpdateFor( report, transaction.Class, predictionWasCorrect: false)); }
public NeuralNetworkPredictionsReport RunPredictions() { return(dataProvider.TestingData .Aggregate(NeuralNetworkPredictionsReport.EmptyReport(), MakePredictionRecordingResult)); }