Skip to content

Default column names #5640

Closed
Closed
@korzh

Description

@korzh

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.

Activity

mairaw

mairaw commented on May 29, 2018

@mairaw
Contributor

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

aditidugar-zz

aditidugar-zz commented on May 30, 2018

@aditidugar-zz
Contributor

@codemzs will be able to help you here!

codemzs

codemzs commented on May 31, 2018

@codemzs
Member

@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

korzh commented on May 31, 2018

@korzh
Author

@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

JRAlexander commented on May 31, 2018

@JRAlexander
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @BillWagner@korzh@codemzs@JRAlexander@mairaw

        Issue actions

          Default column names · Issue #5640 · dotnet/docs