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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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