← Back to all sparks
C

collinear

ANALYTICS
Velocity0.0

R package collinear by blasbenito — release notes from GitHub.

collinear has broken its API twice to stop making the user pick thresholds.

multicollinearityvariable selectionvifbreaking changesspatial modellingr package
Current state
collinear removes multicollinearity from predictor sets through pairwise correlation and VIF filtering, with a preference order deciding which variable survives each conflict. Two major versions in thirteen months each rewrote the interface: 2.0.0 extended every function to any combination of categorical and numeric responses and predictors, and 3.0.0 moved to multiple responses, restructured the output into classed objects, and made both filtering thresholds adaptive by default. Version 3.0.1 is the first release since that is purely repair.
Where it's heading
The through-line is removing decisions the user was never well placed to make. Preference-order functions were renamed twice — first onto a metric-and-model scheme in 2.0.0, then onto a response-type scheme in 3.0.0 — and f_auto() picks one when none is given; target encoding went from automatic to opt-in; max_cor and max_vif now default to NULL and trigger a data-driven threshold derived from the 75th percentile of pairwise correlations through a sigmoid and a fitted correlation-to-VIF mapping. Each change is defensible and each one broke callers, which is the cost of this approach.
Prediction
3.0.1 moved the example datasets out into a separate spatialData package and fixed four crashes rather than adding anything, so the next release is most likely more consolidation on the 3.0 surface than a fourth interface.

Recent moves

  1. 3mo ago

    Namespace, NA and sf fixes; example data moves to spatialData

    Four crash and correctness fixes on the 3.0 surface: namespace-qualified preference functions are recognised instead of being labelled custom, NA responses are dropped rather than propagated, model_formula() no longer fails on sf spatial data frames, and score_auc() handles NA inputs. Example datasets move out to the spatialData package.

    View source ↗
  2. 8mo ago

    Adaptive thresholds, multi-response support and a new output class

    ⚡ SPARK

    The second interface rewrite in a year: response becomes responses for multi-response support, output becomes a classed collinear_output structure, the identify_ and f_ function families are renamed again, and both max_cor and max_vif default to NULL so thresholds are derived from the data. Target encoding also flips from automatic to opt-in.

    View source ↗
  3. 1y ago

    Categorical responses, f_auto() defaults and future-based parallelism

    ⚡ SPARK

    The first major rewrite, extending collinear() and preference_order() from numeric-only responses to any combination of categorical and numeric responses and predictors, with multiple responses returning named lists. f_auto() selects an appropriate preference function when none is given, parallelism moves to future::plan(), and a warn_limit check flags predictors suspiciously associated with the response.

    View source ↗