Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add transformer defined by R-style formula

Open
#48 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
julia

Research direction

Start by reading the StatsModels formula documentation and MLJ's Static transformer documentation, then inspect the related FeatureSelection.jl and MLJGLMInterface.jl issues. Clarify the one-sided formula behavior, table-to-table output, categorical encoding, and informative column names before defining completion criteria.

Written by the indexing model from the issue text.

Description

I think it would be useful (especially to R users) to have an MLJ formula-based transformer that can be inserted anywhere in an MLJ pipeline (or other composite model). Here "formula" means "one-side formula"; I don't think two-sided formulas make much sense in the MLJ context because the target and features are treated separately, like in sklearn.

StatsModels.@formula apparatus appears to provide most of what is needed here already - check out the docs. So this is hopefully just wrapping that.

This transformer would probably be a Static model with a one-sided StatsModels formula as parameter. Ideally, and for consistency, it would perform a table-to-table transformation, rather than a table-to-matrix transformation, which is what StatsModels does. This does cause problems for very-high cardinality categorical features (which get one-hot encoded when you apply StatsBase formula??) but does have the advantage that new columns would come with informative names for interpretation downstream of the transformer. Actually, it probably makes sense not to force one-hot encoding anyway, as not all supervised models need this and we already have transformers to do one-hot encoding which generate the new column names.

I recall slack discussions with @kleinschmidt about this (now lost to the ether). Perhaps he would care to chime in.

See also https://github.com/JuliaAI/FeatureSelection.jl/issues/29 and https://github.com/JuliaAI/MLJGLMInterface.jl/issues/13

Dominant language
Julia
Stars
1
Forks
2
Avg merge
9d 22h
Merged PRs (30d)
2

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.