PredictionEnginePoolExtensions.Predict Method

Definition

Overloads

Predict<TData,TPrediction>(PredictionEnginePool<TData,TPrediction>, TData)

Run prediction pipeline on one example using a PredictionEngine from the pool.

Predict<TData,TPrediction>(PredictionEnginePool<TData,TPrediction>, String, TData)

Run prediction pipeline on one example using a PredictionEngine from the pool.

Predict<TData,TPrediction>(PredictionEnginePool<TData,TPrediction>, TData)

Source:
PredictionEnginePoolExtensions.cs
Source:
PredictionEnginePoolExtensions.cs
Source:
PredictionEnginePoolExtensions.cs

Run prediction pipeline on one example using a PredictionEngine from the pool.

C#
public static TPrediction Predict<TData,TPrediction>(this Microsoft.Extensions.ML.PredictionEnginePool<TData,TPrediction> predictionEnginePool, TData example) where TData : class where TPrediction : class, new();

Type Parameters

TData
TPrediction

Parameters

predictionEnginePool
PredictionEnginePool<TData,TPrediction>

The pool of PredictionEngine instances to get the PredictionEngine.

example
TData

The example to run on.

Returns

TPrediction

The result of prediction. A new object is created for every call.

Applies to

ML.NET 4.0.0 and other versions
Product Versions
ML.NET 1.4.0, 1.5.0, 1.6.0, 1.7.0, 2.0.0, 3.0.0, Preview, 4.0.0

Predict<TData,TPrediction>(PredictionEnginePool<TData,TPrediction>, String, TData)

Source:
PredictionEnginePoolExtensions.cs
Source:
PredictionEnginePoolExtensions.cs
Source:
PredictionEnginePoolExtensions.cs

Run prediction pipeline on one example using a PredictionEngine from the pool.

C#
public static TPrediction Predict<TData,TPrediction>(this Microsoft.Extensions.ML.PredictionEnginePool<TData,TPrediction> predictionEnginePool, string modelName, TData example) where TData : class where TPrediction : class, new();

Type Parameters

TData
TPrediction

Parameters

predictionEnginePool
PredictionEnginePool<TData,TPrediction>

The pool of PredictionEngine instances to get the PredictionEngine.

modelName
String

The name of the model. Used when there are multiple models with the same input/output.

example
TData

The example to run on.

Returns

TPrediction

The result of prediction. A new object is created for every call.

Applies to

ML.NET 4.0.0 and other versions
Product Versions
ML.NET 1.4.0, 1.5.0, 1.6.0, 1.7.0, 2.0.0, 3.0.0, Preview, 4.0.0