Closed
Description
From your IRIS classifier example, I guessed that the default column name for features is "Features" and for the label is "Label" and they can be changed using "LabelColumn" and "FeatureColumn" properties of the classifier class. Is it correct?
(it would be better to call the second one "FeaturesColumn" by the way)
Then I tried to change the column name for the output data structure. I used
public class IrisPrediction {
[ColumnName("PredictedIris")]
public string PredictedIris;
}
and then
pipeline.Add(new PredictedLabelColumnOriginalValueConverter() { PredictedLabelColumn = "PredictedIris" });
but it throws an exception saying "Column not found: PredictedIris"
What am I doing wrong?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: e855e630-1a30-d138-4ac6-bfeefebf9aae
- Version Independent ID: afc0a7d1-d3c2-acf2-d4ea-d2565e22b237
- Content: ML.NET tutorials
- Content Source: docs/machine-learning/tutorials/index.md
- Service: unspecified
- Product: dotnet-ml
- GitHub Login: @JRAlexander
- Microsoft Alias: johalex
Activity
mairaw commentedon May 29, 2018
@aditidugar can you take a look at this question? It's about the Iris tutorial.
aditidugar-zz commentedon May 30, 2018
@codemzs will be able to help you here!
codemzs commentedon May 31, 2018
@korzh PredictedLabel is the default name of the column that Scorer produces after a predictor has been trained. This name can be suffixed with a string by setting the properties of the scorer. Unfortunately at the moment we are not exposing the scorer to be configured. You might wonder what is a scorer? It is the component that produces Score, Probability and PredictedLabel columns from a predictor and we automatically attach a scorer in front of a predictor by default because without the scorer the predictor is of little use. I will open an issue for the scorer to be configured and make sure this is addressed in the next one month, hopefully until then you are able to work with the default names?
korzh commentedon May 31, 2018
@codemzs Thank you for so detailed explanation. Of course, I can totally work with the default names.
I just thought that
PredictedLabelColumn
property actually makes the necessary configuring.Will look forward to the next updates which allow to configure the scorer as well.
JRAlexander commentedon May 31, 2018
Thanks, @aditidugar, and @codemzs for the answers. I think we can close this.