MLJModels.jl
MLJModels.jl copied to clipboard
Improve/standarize the form of `fitted_params` for transformers
fitted_params(model, fitresult) should return a named tuple with informative keys. Ideally, the user should not need to look up documentation to grep the results. Here's an example of a poor implementation from this package:
model = Standardizer()
X, y = make_regression()
mach = machine(model, X) |> fit!
julia> fitted_params(mach)
Dict{Symbol, Tuple{Float64, Float64}} with 2 entries:
:x2 => (0.14288, 0.858847)
:x1 => (-0.0392576, 0.977905)
The complete list of bad transformers needing attention are:
- UnivariateDiscretizer
- Standardizer
- OneHotEncoder
The "Fitted parameters" section of each docstring will need to be updated at the same time.