Skip to content

Roadmap #27: optimize BaggingClassifier.decision_function #236

Closed as not planned

Description

@godofecht

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

Activity

  1. godofecht commented on Aug 18, 2026

    @godofecht
    OwnerAuthor

    Closing as a no-op. BaggingClassifier.decision_function 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
    

    A repo-wide search for decision_function returns no Bagging definition, and no caller anywhere. 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. The Python bindings under python/ do not expose one either.

    Why the issue exists anyway

    Rank 27 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 rather than from a measurement of flow-scikit.

    This row is doubly generated. In sklearn, BaggingClassifier.decision_function is an available_if property that only exists when the base estimator has a decision_function. flow-scikit's BaggingClassifier is hardcoded to DecisionTreeClassifier (bagging_classifier_fit calls decision_tree_classifier_fit directly), and decision trees have no decision_function in sklearn either. So even a faithful port would not have this method.

    There is no baseline to measure and no code to make faster. Nothing to implement here either, unless BaggingClassifier first grows support for a configurable base estimator, which would be a separate feature issue.

    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). #235 was closed for the same reason as this one.

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