dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
9.04k stars 1.89k forks source link

OvaModelParameters is not strongly-typed #2467

Open wschin opened 5 years ago

wschin commented 5 years ago

In the constructor of 'OvaModelParameters`,

        using TScalarPredictor = IPredictorProducing<float>;
        ...
        internal static OvaModelParameters Create(IHost host,  OutputFormula outputFormula, TScalarPredictor[] predictors)
        {
        ...
        }

we remove the type information of predictors by forcing them to be IPredictorProducing<float>. To make all multi-class classifiers' outputting strongly-typed models. We need to make OvaModelParameters strongly-typed.

wschin commented 5 years ago

Without strongly-typed OVA, user can't access the trained models because variable can be accessed when type is known.