Skip to content

Scrubbing learners (Meta issue) #2613

Closed
@Ivanidzo4ka

Description

@Ivanidzo4ka

We need to clean our API for learners.
This includes following things:

  1. No protected fields/members/method in public classes. Only private protected.

  2. Learner class is sealed.

  3. The trainer name types should follow the names used in the contexts (see The trainer name types should follow the names used in the contexts #2172)

  4. ModelPameters for this Learner is also clean. (sealed, public documentation, no public constructor)

  5. Options cleaning:

  • They should be named Options, and all their base classes (except LearnerInputBase*)
  • Option should have meaning and proper way it initialize it self. We shouldn't accept int if in reality we use enum (FastTree EarlyStoppingMetric is an int but only accepts specific values #2521) or accept array of ints as a string separated by comma public string CustomGains = "0,3,7,15,31";
  • No short names.
  • Standard names like:
    /// <param name="labelColumnName">The name of the label column.</param>
    /// <param name="featureColumnName">The name of the feature column.</param>
    NumberOfIterations, NumberOfThreads, LearningRate,L2Regularization, L1Regularization
    no (MaxIterations,NumIterations, NumThreads, L2Weight, L1Weight)
  1. If we communicate with user (exceptions, channel messages), don't use DataKind values. No R4, U4, and so on, it should be float, uint, etc.

ignore for now:

  1. Everything public has proper documentation.

  2. We have samples of how use base call to trainer (no options) and call with options.

  3. We have baseline tests for learner.

https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/general-naming-conventions#using-abbreviations-and-acronyms

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIIssues pertaining the friendly API

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions