118 references to Predict
Microsoft.Extensions.ML (1)
PredictionEnginePoolExtensions.cs (1)
48return predictionEngine.Predict(example);
Microsoft.Extensions.ML.Tests (1)
FileLoaderTests.cs (1)
54var prediction = engine.Predict(new SentimentData() { SentimentText = "This is great" });
Microsoft.ML.AutoML.Samples (7)
AutoFit\BinaryClassificationExperiment.cs (1)
55var prediction = predictionEngine.Predict(testSentimentIssue);
AutoFit\MulticlassClassificationExperiment.cs (1)
56var prediction = predictionEngine.Predict(testPixelData);
AutoFit\RankingExperiment.cs (2)
65var prediction = predictionEngine.Predict(testPage); 75prediction = predictionEngine.Predict(testPage);
AutoFit\RecommendationExperiment.cs (2)
68var prediction = predictionEngine.Predict(testMovie); 77prediction = predictionEngine.Predict(testMovie);
AutoFit\RegressionExperiment.cs (1)
61var prediction = predictionEngine.Predict(testTaxiTrip);
Microsoft.ML.Core.Tests (2)
UnitTests\TestCustomTypeRegister.cs (2)
207var superAlien = engine.Predict(alien); 230var superAlien = engine.Predict(alien);
Microsoft.ML.IntegrationTests (16)
ModelFiles.cs (4)
122var originalPrediction = originalPredictionEngine.Predict(row); 123var serializedPrediction = serializedPredictionEngine.Predict(row); 252var prediction = model.Predict(modelInput); 256var prediction2 = model2.Predict(modelInput);
ONNX.cs (6)
71var originalPrediction = originalPredictionEngine.Predict(row); 72var onnxPrediction = onnxPredictionEngine.Predict(row); 123var originalPrediction = originalPredictionEngine.Predict(row); 124var onnxPrediction = onnxPredictionEngine.Predict(row); 170var originalPrediction = originalPredictionEngine.Predict(row); 171var onnxPrediction = onnxPredictionEngine.Predict(row);
Prediction.cs (4)
58var pr = engine.Predict(new TweetSentiment() { SentimentText = "Good Bad job" }); 71pr = newEngine.Predict(new TweetSentiment() { SentimentText = "Good Bad job" }); 90var pr = engine.Predict(randomDataPoint); 95pr = newEngine.Predict(randomDataPoint);
SchemaDefinitionTests.cs (2)
52var prediction = engine1.Predict(new InputData() { Workclass = "Self-emp-not-inc", NumericFeatures = new float[6] }); 55prediction = engine2.Predict(new InputData() { Workclass = "Self-emp-not-inc", NumericFeatures = new float[6] });
Microsoft.ML.OnnxTransformerTest (1)
DnnImageFeaturizerTest.cs (1)
242ModelOutput result = predEngine.Predict(sample);
Microsoft.ML.PerformanceTests (5)
PredictionEngineBench.cs (3)
141_irisModel.Predict(_irisExample); 150_sentimentModel.Predict(_sentimentExample); 159_breastCancerModel.Predict(_breastCancerExample);
StochasticDualCoordinateAscentClassifierBench.cs (2)
128_consumer.Consume(_predictionEngine.Predict(_example)); 163public float[] PredictIris() => _predictionEngine.Predict(_example).PredictedLabels;
Microsoft.ML.Samples (27)
Dynamic\ModelOperations\SaveLoadModel.cs (1)
42var transformation = engine.Predict(new Data() { Value = "abc" });
Dynamic\ModelOperations\SaveLoadModelFile.cs (1)
41var transformation = engine.Predict(new Data() { Value = "abc" });
Dynamic\TensorFlow\TextClassification.cs (1)
123var prediction = engine.Predict(data[0]);
Dynamic\Trainers\BinaryClassification\FieldAwareFactorizationMachine.cs (1)
86var result = engine.Predict(dataPoint);
Dynamic\Trainers\BinaryClassification\FieldAwareFactorizationMachineWithOptions.cs (1)
97var result = engine.Predict(dataPoint);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
145var prediction = predictionEngine.Predict(imageToPredict);
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
171var prediction = predictionEngine.Predict(imageToPredict);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
166var prediction = predictionEngine.Predict(imageToPredict);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
154var prediction = predictionEngine.Predict(imageToPredict);
Dynamic\Transforms\CalculateFeatureContribution.cs (1)
66var prediction = predictionEngine.Predict(samples.First());
Dynamic\Transforms\CalculateFeatureContributionCalibrated.cs (1)
68var prediction = predictionEngine.Predict(samples.First());
Dynamic\Transforms\CustomMappingWithInMemoryCustomType.cs (1)
53var superAlien = engine.Predict(alien);
Dynamic\Transforms\Text\ApplyCustomWordEmbedding.cs (1)
67var prediction = predictionEngine.Predict(data);
Dynamic\Transforms\Text\ApplyWordEmbedding.cs (1)
57var prediction = predictionEngine.Predict(data);
Dynamic\Transforms\Text\FeaturizeText.cs (1)
65var prediction = predictionEngine.Predict(samples[0]);
Dynamic\Transforms\Text\FeaturizeTextWithOptions.cs (1)
83var prediction = predictionEngine.Predict(samples[0]);
Dynamic\Transforms\Text\LatentDirichletAllocation.cs (2)
59PrintLdaFeatures(predictionEngine.Predict(samples[0])); 60PrintLdaFeatures(predictionEngine.Predict(samples[1]));
Dynamic\Transforms\Text\NormalizeText.cs (1)
48var prediction = predictionEngine.Predict(data);
Dynamic\Transforms\Text\ProduceHashedNgrams.cs (1)
65var prediction = predictionEngine.Predict(samples[0]);
Dynamic\Transforms\Text\ProduceHashedWordBags.cs (1)
64var prediction = predictionEngine.Predict(samples[0]);
Dynamic\Transforms\Text\ProduceNgrams.cs (1)
73var prediction = predictionEngine.Predict(samples[0]);
Dynamic\Transforms\Text\ProduceWordBags.cs (1)
70var prediction = predictionEngine.Predict(samples[0]);
Dynamic\Transforms\Text\RemoveDefaultStopWords.cs (1)
52var prediction = predictionEngine.Predict(data);
Dynamic\Transforms\Text\RemoveStopWords.cs (1)
51var prediction = predictionEngine.Predict(data);
Dynamic\Transforms\Text\TokenizeIntoCharactersAsKeys.cs (1)
50var prediction = predictionEngine.Predict(data);
Dynamic\Transforms\Text\TokenizeIntoWords.cs (1)
48var prediction = predictionEngine.Predict(data);
Microsoft.ML.Samples.GPU (5)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\TextClassification.cs (1)
123var prediction = engine.Predict(data[0]);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
145var prediction = predictionEngine.Predict(imageToPredict);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
171var prediction = predictionEngine.Predict(imageToPredict);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
166var prediction = predictionEngine.Predict(imageToPredict);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
154var prediction = predictionEngine.Predict(imageToPredict);
Microsoft.ML.TensorFlow.Tests (20)
TensorflowTests.cs (20)
165var prediction = predictFunction.Predict(new CifarData() 173prediction = predictFunction.Predict(new CifarData() 684var onePrediction = predictFunction.Predict(oneSample); 735var onePrediction = predictionFunction.Predict(oneSample); 860var prediction = predictFunction.Predict(oneSample); 910var onePrediction = predictFunction.Predict(oneSample); 1178predictFunction.Predict(new CifarData() { ImagePath = GetDataPath("images/banana.jpg") }), 1179predictFunction.Predict(new CifarData() { ImagePath = GetDataPath("images/hotdog.jpg") }), 1180predictFunction.Predict(new CifarData() { ImagePath = GetDataPath("images/tomato.jpg") }) 1199testPredictFunction.Predict(new CifarData() { ImagePath = GetDataPath("images/banana.jpg") }), 1200testPredictFunction.Predict(new CifarData() { ImagePath = GetDataPath("images/hotdog.jpg") }), 1201testPredictFunction.Predict(new CifarData() { ImagePath = GetDataPath("images/tomato.jpg") }) 1294var processedData = dataPipe.Predict(data[0]); 1296var prediction = tfEnginePipe.Predict(processedData); 1359var textOutput = transformer.Predict(input); 1390var primitiveOutput = transformer.Predict(input); 1571var predictionFirst = predictionEngine.Predict(firstImageToPredict); 1572var predictionSecond = predictionEngine.Predict(secondImageToPredict); 1730var predictionFirst = predictionEngine.Predict(firstImageToPredict); 1731var predictionSecond = predictionEngine.Predict(secondImageToPredict);
Microsoft.ML.Tests (33)
DatabaseLoaderTests.cs (10)
77Assert.Equal(0, engine.Predict(new IrisData() 85Assert.Equal(1, engine.Predict(new IrisData() 113Assert.Equal(0, engine.Predict(new IrisData() 121Assert.Equal(1, engine.Predict(new IrisData() 149Assert.Equal(0, engine.Predict(new IrisVectorData() 155Assert.Equal(1, engine.Predict(new IrisVectorData() 181Assert.Equal(0, engine.Predict(new IrisVectorData() 187Assert.Equal(1, engine.Predict(new IrisVectorData() 213Assert.Equal(0, engine.Predict(new IrisData() 221Assert.Equal(1, engine.Predict(new IrisData()
ImagesTests.cs (2)
278var transformedSingleImage = engine.Predict(singleImage); 1198var prediction = predEngine.Predict(dataObjects[i]);
OnnxSequenceTypeWithAttributesTest.cs (1)
63var output = predictor.Predict(input);
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (1)
284var prediction = predictionFunc.Predict(new IrisInput
Scenarios\Api\Estimators\DecomposableTrainAndPredict.cs (1)
46var prediction = engine.Predict(input);
Scenarios\Api\Estimators\Extensibility.cs (1)
55var prediction = engine.Predict(input);
Scenarios\Api\Estimators\MultithreadedPrediction.cs (1)
50var prediction = engine.Predict(input);
Scenarios\Api\Estimators\PredictAndMetadata.cs (1)
64var prediction = engine.Predict(input);
Scenarios\Api\Estimators\SimpleTrainAndPredict.cs (2)
45var prediction = engine.Predict(input); 84var prediction = engine.Predict(input);
Scenarios\ClusteringTests.cs (1)
77var scores = predictFunction.Predict(clusters[i]);
Scenarios\IrisPlantClassificationTests.cs (3)
50IrisPrediction prediction = predictFunction.Predict(new IrisData() 62prediction = predictFunction.Predict(new IrisData() 74prediction = predictFunction.Predict(new IrisData()
Scenarios\IrisPlantClassificationWithStringLabelTests.cs (3)
49IrisPredictionWithStringLabel prediction = predictFunction.Predict(new IrisDataWithStringLabel() 62prediction = predictFunction.Predict(new IrisDataWithStringLabel() 75prediction = predictFunction.Predict(new IrisDataWithStringLabel()
Scenarios\WordBagTest.cs (2)
40var prediction = predictionEngine.Predict(samples[0]); 75var prediction = predictionEngine.Predict(samples[0]);
ScenariosWithDirectInstantiation\IrisPlantClassificationTests.cs (3)
56IrisPrediction prediction = model.Predict(new IrisData() 68prediction = model.Predict(new IrisData() 80prediction = model.Predict(new IrisData()
Transformers\TextFeaturizerTests.cs (1)
766var prediction = engine.Predict(input);