docs icon indicating copy to clipboard operation
docs copied to clipboard

Default column names

Open korzh opened this issue 8 years ago • 5 comments

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.

korzh avatar May 28 '18 06:05 korzh

@aditidugar can you take a look at this question? It's about the Iris tutorial.

mairaw avatar May 29 '18 20:05 mairaw

@codemzs will be able to help you here!

aditidugar-zz avatar May 30 '18 22:05 aditidugar-zz

@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?

codemzs avatar May 31 '18 05:05 codemzs

@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.

korzh avatar May 31 '18 06:05 korzh

Thanks, @aditidugar, and @codemzs for the answers. I think we can close this.

JRAlexander avatar May 31 '18 19:05 JRAlexander