Skip to content

predict_proba with River models: ch axis labels fall back to np.arange instead of actual class labels #17

Description

@cboulay

Follow-up from #15.

When predict_method="predict_proba" is used with a River classifier, the output ch axis is labeled with np.arange(n_classes) because River models don't expose classes_. However, predict_proba_many returns a DataFrame whose columns are the actual class labels, so if the classes aren't 0..n-1 the output channels are mislabeled.

Suggested fix: capture df.columns in the predict_proba_many branch of SklearnModelProcessor._process and use those values for the ch CoordinateAxis instead of falling back to np.arange.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions