PredictionEngine<TSrc,TDst> Class

Definition

Class for making single predictions on a previously trained model (and preceding transform pipeline).

public sealed class PredictionEngine<TSrc,TDst> : Microsoft.ML.PredictionEngineBase<TSrc,TDst> where TSrc : class where TDst : class, new()

Type Parameters

TSrc
TDst
Inheritance
PredictionEngine<TSrc,TDst>

Remarks

This class can also be used with trained pipelines that do not end with a predictor: in this case, the 'prediction' will be just the outcome of all the transformations.

The PredictionEngine is NOT thread safe. Using it in a threaded environment can cause unexpected issues.

Properties

OutputSchema

Provides output schema.

(Inherited from PredictionEngineBase<TSrc,TDst>)

Methods

Dispose() (Inherited from PredictionEngineBase<TSrc,TDst>)
Predict(TSrc, TDst)

Run prediction pipeline on one example.

Predict(TSrc)

Run prediction pipeline on one example.

(Inherited from PredictionEngineBase<TSrc,TDst>)

Applies to

Product Versions
ML.NET 1.0.0, 1.1.0, 1.2.0, 1.3.1, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 2.0.0, 3.0.0