Skip to content

More trainer related naming alignment #2938

Closed
@sfilipi

Description

@sfilipi

Take another pass over the trainers and the model parameter types, and align them, because now we have:

LogisticRegressionMulticlassClassificationTrainer but MulticlassLogisticRegressionModelParameters.

I think following the same principles on the ModelParams might make them more relatable; so change MulticlassLogisticRegressionModelParameters to LogisticRegressionMulticlassModelParameters

Activity

sfilipi

sfilipi commented on Mar 13, 2019

@sfilipi
MemberAuthor

@shauheen would this be a candidate for Project 13?

added
APIIssues pertaining the friendly API
on Mar 13, 2019
self-assigned this
on Mar 14, 2019
abgoswam

abgoswam commented on Mar 14, 2019

@abgoswam
Member

In general, it seems there isn't a 1:1 mapping between trainer and model parameter types.

  • SdcaNonCalibratedBinaryClassificationTrainer uses LinearBinaryModelParameters
  • SdcaCalibratedBinaryClassificationTrainer uses CalibratedModelParametersBase as type of the model parameter.

However, there are some discrepancies that exists. Whenever possible we should align the trainer and model parameter types.

Listing some of the trainers where we can fix this :

  • MulticlassLogisticRegressionModelParameters
  • BinaryClassificationGamModelParameters
  • RegressionGamModelParameters
  • MultiClassNaiveBayesModelParameters
  • PrincipleComponentModelParameters
  • OrdinaryLeastSquaresRegressionModelParameters
  • FastForestClassificationModelParameters
added this to the 0319 milestone on Mar 14, 2019
abgoswam

abgoswam commented on Mar 18, 2019

@abgoswam
Member

Update:

  • To keep consistency between Class names of Trainers and ModelParameters, we will not use the word "Classification" in either the Trainer class or the ModelParameter class

  • We feel its OK to drop the word "Classification" for 2 main reasons :

    • we have sufficient context to just use suffix : BinaryTrainer , BinaryModelParameters etc. without using the word "Classification"
    • adding the word "Classification" leads to long names

Here is a summary of the Trainer and ModelParameter class names

Updated Trainer Class Name
FastTreeBinaryTrainer
FastTreeRegressionTrainer
FastTreeRankingTrainer
FastTreeTweedieTrainer
FastForestRegressionTrainer
FastForestBinaryTrainer
MatrixFactorizationTrainer
GamBinaryTrainer
GamRegressionTrainer
LogisticRegressionBinaryTrainer
LogisticRegressionMulticlassTrainer (see comment below by @wschin )
AveragedPerceptronTrainer
OnlineGradientDescentTrainer
PoissonRegressionTrainer
KMeansTrainer
OlsTrainer
PriorTrainer
PairwiseCouplingTrainer
OneVersusAllTrainer
NaiveBayesMulticlassTrainer
SgdCalibratedTrainer
SgdNonCalibratedTrainer
FieldAwareFactorizationMachineTrainer
SymbolicSgdTrainer
LightGbmRegressionTrainer
LightGbmBinaryTrainer
LightGbmRankingTrainer
LightGbmMulticlassTrainer
LinearSvmTrainer
RandomizedPcaTrainer
SdcaCalibratedBinaryTrainer
SdcaNonCalibratedBinaryTrainer
SdcaMulticlassTrainer
SdcaRegressionTrainer
SdcaTrainerBase
LbfgsTrainerBase
GamTrainerBase
Updated ModelParameter Class Name
GamBinaryModelParameters
GamRegressionModelParameters
LightGbmBinaryModelParameters
LightGbmRankingModelParameters
LightGbmRegressionModelParameters
FastTreeBinaryModelParameters
FastTreeRegressionModelParameters
FastTreeRankingModelParameters
FastTreeTweedieModelParameters
FastForestBinaryModelParameters
FastForestRegressionModelParameters
NaiveBayesMulticlassModelParameters
OlsModelParameters
PcaModelParameters
FieldAwareFactorizationMachineModelParameters
KMeansModelParameters
PoissonRegressionModelParameters
MatrixFactorizationModelParameters
OneVersusAllModelParameters
PairwiseCouplingModelParameters
PriorModelParameters
LinearRegressionModelParameters
RegressionModelParameters
LinearBinaryModelParameters
CalibratedModelParametersBase
GamModelParametersBase
TreeEnsembleModelParameters
TreeEnsembleModelParametersBasedOnQuantileRegressionTree
TreeEnsembleModelParametersBasedOnRegressionTree
wschin

wschin commented on Mar 18, 2019

@wschin
Member

For multi-class LR trainer and its model, we will different names in #2976. Looks like they don't need multiclass.

  • (rename) LogisticRegressionMulticlassClassificationTrainer ---> LbfgsMaximumEntropyTrainer
  • (rename) MulticlassLogisticRegressionModelParameters ---> MaximumEntropyModelParameters

We can NOT have LogisticRegressionMulticlass because LogisticRegression is binary classification only.

ghost locked as resolved and limited conversation to collaborators on Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

APIIssues pertaining the friendly API

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @shauheen@wschin@abgoswam@sfilipi

    Issue actions

      More trainer related naming alignment · Issue #2938 · dotnet/machinelearning