UnivariateStandardizer has human_name "single variable discretizer"

Open Beginner friendly
#117 1 comment 1 reaction 1 assignee View on GitHub

Maintainers usually reply within 1 day

@ablaom is already working on this.

Since Dec 3, 2026.

  • #118 by @ablaom — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
julia

Research direction

Open src/transformers/other_transformers/standardizer.jl at the metadata_model call for UnivariateStandardizer; the issue links the relevant lines. Change its human name to “single variable standardizer” and add the suggested MMI.human_name check for the transformer. Done when the check passes and the generated model description names a standardizer.

Written by the indexing model from the issue text.

Description

The metadata_model call for UnivariateStandardizer sets its human_name to "single variable discretizer". It looks like it was copied over from UnivariateDiscretizer and never changed:

https://github.com/JuliaAI/MLJTransforms.jl/blob/d3e3db3/src/transformers/other_transformers/standardizer.jl#L241-L245

metadata_model(UnivariateStandardizer,
    input_scitype   = AbstractVector{<:Infinite},
    output_scitype = AbstractVector{Continuous},
    human_name = "single variable discretizer",
    load_path    = "MLJTransforms.UnivariateStandardizer")

So the standardizer ends up with the same human name as the real discretizer (univariate_discretizer.jl#L96).

Minimal example
using MLJBase, MLJTransforms

@show MLJBase.human_name(UnivariateStandardizer)
@show MLJBase.human_name(UnivariateDiscretizer)
println(MLJBase.MLJModelInterface.doc_header(UnivariateStandardizer))

Output:

MLJBase.human_name(UnivariateStandardizer) = "single variable discretizer"
MLJBase.human_name(UnivariateDiscretizer) = "single variable discretizer"

and the generated doc header for UnivariateStandardizer says:

A model type for constructing a single variable discretizer, based on
[MLJTransforms.jl](https://github.com/JuliaAI/MLJTransforms.jl), and implementing the MLJ
model interface.

The wrong name has also been picked up by the MLJModels registry. On the current MLJModels dev branch, src/registry/Metadata.toml has:

[MLJTransforms.UnivariateStandardizer]
...
":human_name" = "single variable discretizer"

So anything that shows the registry metadata (for example info("UnivariateStandardizer") or docs generated from it) will describe the standardizer as a discretizer.

Expected

Something like human_name = "single variable standardizer". After that, the registry entry would need regenerating the next time MLJModels updates it.

As far as I can tell, no test checks human_name for the transformers, so this went unnoticed. A small check like @test MMI.human_name(UnivariateStandardizer) == "single variable standardizer" would catch it.

Versions
  • MLJTransforms 0.2.4, dev at d3e3db3
  • MLJBase 1.15.4
  • Julia 1.13.4 (Linux x86_64)
Dominant language
Julia
Stars
1
Forks
5
Avg merge
6h 44m
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaAI/MLJTransforms.jl

All issues in JuliaAI/MLJTransforms.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.