Skip to content

KernelSVC per-pair intercepts differ from sklearn by a sign convention; iris max_iter declared 200 vs 1000 #471

Description

@godofecht

From the substantive-disparity survey. Two entangled items on the KernelSVC rows:

  1. intercept_per_pair_max_relative_diff is 1.99 on iris and 2.0 on digits. A relative difference of ~2 on max-normalisation is the signature of a sign flip: |a - (-a)| / |a| = 2. Dual-coefficient sums match to 6.5e-5 (iris), so the models agree; the per-pair intercept convention differs — almost certainly which class of the (i,j) pair is treated as positive. Predictions compose correctly on both sides. Determine the convention difference and either align Flow's or transform at emission so the diagnostic compares like with like. Do not change decision values.

  2. Configuration: iris declares max_iter 200 vs sklearn 1000 (digits declares 1000). Established on Close the Digits KernelSVC quality gap and isolate the libsvm performance deficit #206/SMO working-set selection: 98.4% of _smo_step calls make no progress, and the solver is 96% of KernelSVC fit #412: the solver converges in ~26 outer sweeps, so the cap is a backstop on both, but the declared configs should match or the difference should be shown to be inert (verify iris converges well under 200 sweeps, then align the declared value).

svm.flow is 76KB and the known victim of compiler bug #469: after any edit run tests/test_multiclass_svm.flow and tests/test_multiclass_kernel_svm.flow and diff printed accuracies against main.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions