PredictionEnginePool<TData,TPrediction> Class

Definition

Provides a pool of PredictionEngine<TSrc,TDst> objects that can be used to make predictions.

public class PredictionEnginePool<TData,TPrediction> where TData : class where TPrediction : class, new()
type PredictionEnginePool<'Data, 'Prediction (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))> = class
Public Class PredictionEnginePool(Of TData, TPrediction)

Type Parameters

TData
TPrediction
Inheritance
PredictionEnginePool<TData,TPrediction>

Constructors

PredictionEnginePool<TData,TPrediction>(IServiceProvider, IOptions<MLOptions>, IOptionsFactory<PredictionEnginePoolOptions<TData,TPrediction>>)

Methods

GetModel()

Get the Model used to create the pooled PredictionEngine.

GetModel(String)

Get the Model used to create the pooled PredictionEngine.

GetPredictionEngine()

Gets a PredictionEngine that can be used to make predictions using TData and TPrediction.

GetPredictionEngine(String)

Gets a PredictionEngine for a named model.

ReturnPredictionEngine(PredictionEngine<TData,TPrediction>)

Returns a rented PredictionEngine to the pool.

ReturnPredictionEngine(String, PredictionEngine<TData,TPrediction>)

Returns a rented PredictionEngine to the pool.

Extension Methods

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.

Applies to