Skip to content

GAM parameter names are non-standard #2857

Closed

Description

@rogancarr

The trained Generalized Additive Models (aka GAMs) methods for obtaining trained model parameters have non-standard names and various inconsistencies.

These are the properties:

var shapeFunctionsBins = gamModel.GetBinUpperBounds();
var shapeFunctionsValues = gamModel.GetBinEffects();
var numShapeFunctions = gamModel.NumShapeFunctions;
var intercept = gamModel.Intercept;

There are a few issues here:

  1. Nonstandard names
    I propose BinUpperBounds and BinEffects be renamed ShapeFunctionsBins and ShapeFunctionsBinValues.
  2. Inconsistent names
    Sometimes we say ShapeFunctions, sometimes we done. Same solution proposed as No. 1.
  3. Inconsistency in Get methods vs. properties
    e.g. Intercept vs. GetBinUpperBounds.
    I propose we move all the methods to be properties.
    e.g. model.ShapeFunctionsBins.
  4. Names leak implementation
    BinUpperBounds vs. Bins.
    Question: should we just say Bins rather than BinUpperBounds and say that they are the upper bounds for the bin in the documentation? BinUpperBounds is very verbose, and speaks to how we bin.

Activity

  1. self-assigned this
    on Mar 5, 2019
  2. Ivanidzo4ka commented on Mar 5, 2019

    @Ivanidzo4ka
    Contributor

    #2753 You can tell this to @wschin since he is doing scrubbing of fast tree learners.

  3. rogancarr commented on Mar 5, 2019

    @rogancarr
    ContributorAuthor

    @wschin Re-assigned this to you!

  4. wschin commented on Mar 5, 2019

    @wschin
    Contributor

    The trained Generalized Additive Models (aka GAMs) methods for obtaining trained model parameters have non-standard names and various inconsistencies.
    These are the properties:
    var shapeFunctionsBins = gamModel.GetBinUpperBounds();
    var shapeFunctionsValues = gamModel.GetBinEffects();
    var numShapeFunctions = gamModel.NumShapeFunctions;
    var intercept = gamModel.Intercept;
    There are a few issues here:

    Nonstandard names
    I propose BinUpperBounds and BinEffects be renamed ShapeFunctionsBins and ShapeFunctionsBinValues.

    They look a bit long and the name GamModelParameters.ShapeFunctionBins doesn't look more informative than GamModelParameters.BinUpperBounds because ShapeFunction is rarely used elsewhere.

    Inconsistent names
    Sometimes we say ShapeFunctions, sometimes we done. Same solution proposed as No. 1.
    Inconsistency in Get methods vs. properties
    e.g. Intercept vs. GetBinUpperBounds.
    I propose we move all the methods to be properties.
    e.g. model.ShapeFunctionsBins.

    It's consistent. For jagged 2-D array, we already return IReadOnlyList over one of its slice in FastTree's APIs.

    Names leak implementation
    BinUpperBounds vs. Bins.
    Question: should we just say Bins rather than BinUpperBounds and say that they are the upper bounds for the bin in the documentation? BinUpperBounds is very verbose, and speaks to how we bin.

    I am hesitating to have

    var bound = Bins[5];

    while the following looks clearer.

    var bound = BinUpperBounds[5];

    Cleaning of GAM family is also a part of #2753.

  5. added this to the 0319 milestone on Mar 6, 2019
  6. added a commit that references this issue on Mar 11, 2021
  7. 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

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions