dotnet / dotnet/machinelearning

Predict expects the Label as input

Open
#3,063 5 comments 0 reactions 1 assignee Claimed by @svick View on GitHub
area-Core enhancement Priority:2
Dominant language
C#
Stars
9.4k
Forks
2k
Avg merge
2d 20h
Merged PRs (30d)
11

Description

## Issue
When calling Predict, our Predict method will take in the same input as what is used for the training pipeline. This is a bit "odd" as we force the user to define a "Label" variable that does nothing nor is it needed for the output.

Using the example from #3037, we have something like this:
```
let predictor = mlContext.Model.CreatePredictionEngine(transformer)
let prediction:Prediction = predictor.Predict({Area=0; Price = 209000})
```

Where Area is our "Label", because this is required by the pipeline, we have to add this in as part of the input.

Could our pipeline change to only consume the data that is needed to do the prediction? And ideally have something like this:
```
let prediction:Prediction = predictor.Predict(209000)
```
cc @glebuk for any additional comments.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.