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