Missing Categorical feature supports for HistgradientBoost

Open
#74 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
julia, scikit-learn

Research direction

Start with the HistGradientBoostingClassifier meta declaration shown in the issue and compare it with Scikit-learn's categorical-support documentation. Determine which MLJ table scitypes allow categorical columns while preserving the existing target and weights constraints, then verify that categorical features can be passed without preprocessing.

Written by the indexing model from the issue text.

Description

enhancement

HistgradientBoost methods from Scikit-learn support native categorical features, meaning no preprocessing is needed, as shown here:
https://scikit-learn.org/stable/modules/ensemble.html#categorical-support-gbdt

However, the MLJ interface seems to enforce the input to be continuous tables, as seen in the source code:

meta(HistGradientBoostingClassifier,
    input   = Table(Continuous),
    target  = AbstractVector{<:Finite},
    weights = false
    )

Since MLJ enforces the scitype schema, the categorical feature columns should be auto-inferred. I hope this can be addressed, thanks.

On second thoughts, since scikit-learn will auto-infer categorical features based on dtype, maybe relaxing the Table type to some union type would suffice.

Dominant language
Julia
Stars
14
Forks
8
PR merge metrics
No merged PRs in 30d

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/MLJScikitLearnInterface.jl

All issues in JuliaAI/MLJScikitLearnInterface.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.