-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Estimators that are instantiated through MAML without specifying a weightcolumn are instead created with default weightcolumn named "Weights".
More details:
The constructor for estimator objects that is used by MAML takes an Arguments object, which has a weight column name that defaults to "Weights". To be precise it defaults to an Optional with implicit value of "Weights".
When we instantiate the estimator through that constructor, we need to pass a SchemaShape.Column object to the base class TrainerEstimatorBase. This column is in most cases constructed with a method that takes the column name as specified in the Arguments object. As the default value in the Arguments object is not null, it is "Weights", this method does not return null, but returns a new SchemaShape.Column named Weights.
The rational:
The new API's rational is as follows:
- the user needs to specify a weight column name, if the name is not null we check the presence of the column
- if the user does not define a weight column name (it is null), we assume there is no weight column
The old MAML's rational:
- same as above
- if the user does not specify a weight column name:
- if there is a column named "Weights" it will be taken as the weights column automatically
- if there is no column name "Weights", we assume that there is no weight column
What we have to do:
We have to fix the current instantiation of estimators through MAML, and decide if we want to continue using a different behavior for the command line and the C# API.