mlnet-predict
1.1.0
dotnet tool install --global mlnet-predict --version 1.1.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local mlnet-predict --version 1.1.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=mlnet-predict&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package mlnet-predict --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MLNetPredict
MLNetPredict is a command-line tool for making predictions using trained ML.NET models. It supports various machine learning scenarios and provides a simple interface for batch predictions.
Features
- Supports multiple ML.NET scenarios:
- Classification (binary and multi-class)
- Regression
- Forecasting
- Recommendation
- Text Classification
- Image Classification
- Object Detection
- Automatic handling of model dependencies
- Flexible input/output options
- Support for different data formats (CSV, TSV)
- Header detection and delimiter customization
- Verbose mode for detailed logging and troubleshooting
Installation
To install MLNetPredict, you can use the .NET CLI:
dotnet tool install --global mlnet-predict
Usage
Basic syntax:
mlnet-predict <model-path> <input-path> [options]
Required Arguments
model-path
: Path to the directory containing the .mlnet model fileinput-path
: Path to the input file or directory (for image-based tasks)
Options
-o, --output-path
: Path to the output file or directory (optional)--has-header
: Specify if dataset file(s) have header row [true|false]--separator
: Specify the separator character used in the dataset file(s)-v, --verbose
: Enable verbose logging for debugging and troubleshooting
Examples
- Basic Classification:
mlnet-predict "models/sentiment" "data/input.csv" --has-header true
- Image Classification with Custom Output:
mlnet-predict "models/image_classifier" "images/test" -o "results/predictions.csv"
- Forecasting with TSV Input:
mlnet-predict "models/forecast" "data/timeseries.tsv" --separator "\t"
- Running with Verbose Mode for Troubleshooting:
mlnet-predict "models/classifier" "data/test.csv" -v
Input Data Format
Text-based Tasks (Classification, Regression, etc.)
- Supported formats: CSV, TSV
- Files should contain the required features as columns
- Headers can be included or excluded (use --has-header option)
Image-based Tasks
- Supported formats: JPG, JPEG, PNG, BMP, GIF
- Input should be a directory containing image files
- Output will be a CSV file with predictions for each image
Output Format
The output format varies depending on the machine learning task:
Classification
PredictedLabel,Score
For multi-class classification:
Top1,Top1Score,Top2,Top2Score,Top3,Top3Score
Regression/Recommendation
Score
Forecasting
PredictedValue,LowerBound,UpperBound
Image Classification
ImagePath,PredictedLabel,Score
Object Detection
ImagePath,PredictedLabels,BoundingBoxes,Scores
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.