Skip to content

Public constructors for GamModelParameters #1948

@najeeb-kazmi

Description

@najeeb-kazmi

Part of #1698

Right now, in BinaryClassificationGamModelParameters and RegressionGamModelParameters we have constructors that look like the following;

internal BinaryClassificationGamModelParameters(IHostEnvironment env, int inputLength, Dataset trainset,
            double meanEffect, double[][] binEffects, int[] featureMap)
            : base(env, LoaderSignature, inputLength, trainset, meanEffect, binEffects, featureMap) { }

We want to make public constructors for all ModelParameters (previously predictors). However, for GAMs, this requires the user to pass in a training set, which is a Dataset object in Microsoft.ML.FastTree.Internal. This is not something we should expect the end user of the API to be aware of, so the constructor was not made public. Currently, Dataset is needed in GamModelParametersBase to map features to flocks and get bin upper bounds. We should rewrite GAMs so that this information is passed on from the Trainer rather than be computed when constructing the GamModelParameters.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions