Skip to content

Roadmap #38: optimize Birch.transform #247

Closed as not planned
Closed as not planned

Description

@godofecht

Tracks rank 38 in benchmarks/OPTIMIZATION_ROADMAP.md: Birch.transform. 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: there is nothing to optimize, because Birch.transform has no Flow implementation.

    What I checked

    lib/scikit/cluster.flow defines exactly three Birch entry points:

    935:export struct Birch {
    945:export function birch_fit(X: Matrix, threshold: f32, branching_factor: i32) -> Birch {
    1002:export function birch_predict(model: Birch, X: Matrix) -> ptr<i32> {
    1026:export function birch_free(model: Birch) -> void {
    

    There is no birch_transform. A repository-wide search for birch outside the generated benchmark evidence returns only lib/scikit/cluster.flow, tests/test_new_modules_v2.flow, benchmarks/bench_comprehensive.flow and benchmarks/bench_comprehensive.py, and none of them calls a transform. The Python package under python/ has no Birch binding at all. benchmarks/parity_contract.json has no Birch row; the only clustering row in the canonical 19 is KMeans.

    Why the roadmap row exists anyway

    Rank 38 comes from benchmarks/sklearn_execution_inventory.json, which enumerates sklearn's own public methods. Every row from rank 21 down carries the same tied score of 46.5, a blank observed-speedup column and one templated hypothesis string. This row records that sklearn has a Birch.transform that is python-bound. It is not evidence that flow-scikit has one.

    Implementing birch_transform from scratch would be new API surface, not an optimization, and there is no before number to measure it against. That belongs in a feature issue if it is wanted.

    Where the Birch work went instead

    The two Birch methods that do exist were measured and optimized:

    Both are bit-identical in labels and centroids.

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