Skip to content

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

@dom-linkevicius

Description

@dom-linkevicius

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions