Is it possible to specify the number of classes when coercing into `Multiclass`?

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

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia

Research direction

Start by reviewing the coerce API for Multiclass and how its class count is determined. Use the d1/d2 scenario in the issue to define how a target class count and class assignment should work, then verify that the resulting scitype remains compatible with downstream MLJ.Pipeline functionality.

Written by the indexing model from the issue text.

Description

As per title: let's say I have a dataset d1 with a variable X which is Multiclass{10}, but now I get another smaller dataset d2 in which X only has 7 of the 10 classes present in d1. If I just coerce(d2, :X => Multiclass) in then it will be a Multiclass{7} and then downstream transformations/functionality in things like the MLJ.Pipeline will break. Can I specify the number of classes in Multiclass when coercing, along with how to assign a class, such that X in d2 could be coerced to the same scitype as X in d1?

Dominant language
Julia
Stars
99
Forks
7
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/ScientificTypes.jl

All issues in JuliaAI/ScientificTypes.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.