Skip to content

Model produced by SdcaBinaryTrainer is not and can not be strongly-typed #2469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wschin opened this issue Feb 7, 2019 · 0 comments · Fixed by #2506
Closed

Model produced by SdcaBinaryTrainer is not and can not be strongly-typed #2469

wschin opened this issue Feb 7, 2019 · 0 comments · Fixed by #2506
Assignees
Labels
API Issues pertaining the friendly API
Milestone

Comments

@wschin
Copy link
Member

wschin commented Feb 7, 2019

The CreatePredictor function,

        using TScalarPredictor = IPredictorWithFeatureWeights<float>;
        ...
        protected override TScalarPredictor CreatePredictor(VBuffer<float>[] weights, float[] bias)
        {
            ...
            var predictor = new LinearBinaryModelParameters(Host, in maybeSparseWeights, bias[0]);
            if (Info.NeedCalibration)
                return predictor;
            return new ParameterMixingCalibratedPredictor(Host, predictor, new PlattCalibrator(Host, -1, 0));
        }

in SdcaBinaryTrainer can produce two different types depending on the specified loss function. To generate model in a type-safe manner, we need two trainers for the two possible model types. cc @TomFinley for visibility.

@wschin wschin self-assigned this Feb 7, 2019
@shauheen shauheen added the API Issues pertaining the friendly API label Feb 11, 2019
@shauheen shauheen added this to the 0219 milestone Feb 12, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API Issues pertaining the friendly API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants