Skip to content

Constructing categorical vector of pure "missing" with prescribed levels #362

@ablaom

Description

@ablaom

It would be nice if the following worked, instead of throwing an error:

categorical(fill(missing, 4), levels=["inlier", "outlier"], ordered=true) 

edit corrected as pointed out in next comment

My use case is a machine learning model (an outlier detector) that is semi-supervised. The features are paired with labels indicating outlier/inlier, with possibly some or all labels missing. Even in the case all labels are missing (unsupervised) I still want to extract from the categorical vector the labels to get the user's preference for these labels.

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