Arrange for feature importances of a wrapped model to pass through the `BalancedModel` wrapper

Open
#31 0 comments 0 reactions 1 assignee View on GitHub

@OkonSamuel is already working on this.

Since Apr 5, 2026.

Assessment

This issue has not been assessed yet.

Description

using MLJ
X, y = make_moons()

# this works:
model = (@load EvoTreeClassifier)()
mach = machine(model, X, y) |> fit!
feature_importances(mach)
# 2-element Vector{Pair{Symbol, Float64}}:
#  :x2 => 0.8189696086438946
#  :x1 => 0.18103039135610546

# this doesn't work as expected:
balancer = (@load SMOTE)()
balanced_model = BalancedModel(model; balancer)
mach = machine(balanced_model, X, y) |> fit!
feature_importances(mach) |> isnothing
# true

This commit at MLJIteration shows how feature importance support was added for the IteratedModel wrapper.

Dominant language
Julia
Stars
6
Forks
1
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/MLJBalancing.jl

All issues in JuliaAI/MLJBalancing.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.