コード例 #1
0
        public int GetAverageProbability()
        {
            var model       = BuildAndTrainModel(mlContext);
            var probability = new ReadAndWriteCommentsProbability(productId);

            return(probability.GetAverageProbabilityMark());
        }
コード例 #2
0
        public async Task <int> UpdateDataAndGetAverageProbability(string sentiment)
        {
            var model = BuildAndTrainModel(mlContext);
            var statementProbability = PredictStatementProbability(mlContext, model, sentiment);
            var probability          = new ReadAndWriteCommentsProbability(productId);
            await probability.WriteProbabilityData(statementProbability);

            return(probability.GetAverageProbabilityMark());
        }