Skip to content

Roadmap #26: optimize BaggingClassifier.predict_proba #235

Closed as not planned

Description

@godofecht

Tracks rank 26 in benchmarks/OPTIMIZATION_ROADMAP.md: BaggingClassifier.predict_proba. Complete the roadmap optimization hypothesis with sklearn-parity-gated benchmark evidence, then update the roadmap evidence/disposition before closing.

Activity

  1. godofecht commented on Aug 18, 2026

    @godofecht
    OwnerAuthor

    Closing as a no-op. BaggingClassifier.predict_proba does not exist in flow-scikit, so there is nothing to optimize.

    What I checked

    lib/scikit/ensemble.flow defines exactly four bagging_classifier_* symbols:

    310: export struct BaggingClassifier
    319: export function bagging_classifier_fit
    371: export function bagging_classifier_predict
    409: export function bagging_classifier_free
    

    There is no predict_proba on the struct or anywhere else. A repo-wide search for predict_proba returns 11 definitions, none of them Bagging:

    lib/scikit/dummy.flow:124            dummy_classifier_predict_proba
    lib/scikit/neighbors.flow:56         knn_classifier_predict_proba
    lib/scikit/semi_supervised.flow:173  label_propagation_predict_proba
    lib/scikit/pipeline.flow:197         pipeline_predict_proba
    lib/scikit/mixture.flow:257          gaussian_mixture_predict_proba
    lib/scikit/linear.flow:773           logistic_predict_proba
    lib/scikit/ensemble.flow:139         random_forest_classifier_predict_proba
    lib/scikit/ensemble.flow:614         gradient_boosting_classifier_predict_proba
    lib/scikit/naive_bayes.flow:206      gaussian_nb_predict_proba
    lib/scikit/naive_bayes.flow:367      multinomial_nb_predict_proba
    

    The only files that reference Bagging at all are lib/scikit/ensemble.flow, tests/test_estimators.flow, tests/test_new_features.flow and examples/ensemble_comparison.flow. None of them calls a Bagging predict_proba. The Python bindings under python/ do not expose one either.

    Why the issue exists anyway

    Rank 26 sits in the 21-100 band of benchmarks/OPTIMIZATION_ROADMAP.md, where all 80 rows are tied at score 46.5 with a blank measured-speedup column and one templated hypothesis string ("remove Python control/validation and specialize the complete operation"). Those rows are generated from sklearn's API surface, so the row exists because sklearn's BaggingClassifier has a predict_proba, not because flow-scikit has one that was measured as hot.

    There is no baseline to measure and no code to make faster. Implementing predict_proba from scratch would be a new feature, not a roadmap optimization, and it should get its own issue if it is wanted. If it is implemented later it should reuse the tree-major shape of rf_clf_vote_counts from #334.

    Related work from the same campaign, all in lib/scikit/ensemble.flow: #387 (BaggingRegressor.predict, 577x), #388 (AdaBoostRegressor.predict), #389 (BaggingClassifier.fit), #390 (BaggingRegressor.fit).

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