Skip to content

Commit 4824f42

Browse files
author
Shahab Moradi
authored
XML for MLContext.Model (root) (#3451)
* Added xml for the exotic overload of CreatePredictionEngine. This is P4 API, and we rarely use it even in our codebase. So we don't have samples for it. * More refinement
1 parent 83a92ad commit 4824f42

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Microsoft.ML.Data/Model/ModelOperationsCatalog.cs

+10-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public ITransformer LoadWithDataLoader(string filePath, out IDataLoader<IMultiSt
292292
}
293293

294294
/// <summary>
295-
/// Create a prediction engine for one-time prediction.
295+
/// Create a prediction engine for one-time prediction (default usage).
296296
/// </summary>
297297
/// <typeparam name="TSrc">The class that defines the input data.</typeparam>
298298
/// <typeparam name="TDst">The class that defines the output data.</typeparam>
@@ -317,6 +317,15 @@ public PredictionEngine<TSrc, TDst> CreatePredictionEngine<TSrc, TDst>(ITransfor
317317
return transformer.CreatePredictionEngine<TSrc, TDst>(_env, ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition);
318318
}
319319

320+
/// <summary>
321+
/// Create a prediction engine for one-time prediction.
322+
/// It's mainly used in conjunction with <see cref="Load(Stream, out DataViewSchema)"/>,
323+
/// where input schema is extracted during loading the model.
324+
/// </summary>
325+
/// <typeparam name="TSrc">The class that defines the input data.</typeparam>
326+
/// <typeparam name="TDst">The class that defines the output data.</typeparam>
327+
/// <param name="transformer">The transformer to use for prediction.</param>
328+
/// <param name="inputSchema">Input schema.</param>
320329
public PredictionEngine<TSrc, TDst> CreatePredictionEngine<TSrc, TDst>(ITransformer transformer, DataViewSchema inputSchema)
321330
where TSrc : class
322331
where TDst : class, new()

0 commit comments

Comments
 (0)