Design Goals#
calfcv provides a mathematically faithful Python implementation of the Coarse Approximation Linear Function (CALF) algorithm ([Jeffries2022]) while enforcing modern Scikit-Learn engineering contracts.
Core Mathematical Lineage#
Coarse Integer Weighting: Unlike standard linear models that optimize continuous floating-point coefficients, CALF restricts weights to discrete coarse values.
calfcvevaluates candidate grid vectors \(w \in \{-1, +1\}\) at each iterative step, generating interpretable integer combinations.Greedy Forward Selection: At iteration \(k\),
calfcvscans all unselected features to identify the single predictor and weight candidate that maximizes the rank-sum Area Under the Receiver Operating Characteristic Curve (AUC) on normalized inputs. Iteration terminates when candidate additions fail to exceed the convergence thresholdauc_tol.Collinearity Filtering: Linearly dependent or redundant features produce marginal AUC gains equal to or lower than the current composite score. The rank-sum objective inherently excludes redundant predictors, selecting only the primary informative feature.
Architectural Modernization & Guardrails#
Standardization Contract: CALF requires zero-mean, unit-variance input features for valid coarse weighting.
calfcvintegrates directly with Scikit-Learn’s preprocessing API, ensuring data standardization is performed inside cross-validation folds viaPipelineandCalfCVto eliminate data leakage.
References#
Jeffries, C.D., Ford, J.R., Tilson, J.L. et al. (2022). A greedy regression algorithm with coarse weights offers novel advantages. Sci Rep 12, 5440. https://doi.org/10.1038/s41598-022-09415-2