pls_cox — Deviance-residual PLS-Cox regression

Group: Classification & GLM · Registry tolerance: 1e-06

Description

PLS-Cox (§5) — Cox PH on PLS scores

Registry note — Bastien 2008 deviance-residual PLS-Cox (NumPy port): scale X, deviance residuals from a null Cox PH, NIPALS PLS, Breslow Cox NR on the scores. pls4all’s default wrapper calls the same routine, so the gate is bit-for-bit. The native C++ kernel (legacy=True) runs the same algorithm. R plsRcox::coxsplsDR is the published counterpart; see _PlsCoxRReference for the archived adapter.

Parameters

Name

Type

Default

Notes

n_components

int

4

registry benchmark cell value

n_classes

int

2

registry benchmark cell value

Explanations

Bibliographic source

Bastien, P. (2008). Deviance residuals based PLS regression for censored data in high dimensional setting. Chemometrics and Intelligent Laboratory Systems 91(1), 78–86. DOI 10.1016/j.chemolab.2007.09.009.

Mathematical principle

The deviance residuals \(d_i\) of the null Cox model (Breslow cumulative hazard \(\hat H_0\), martingale residual \(m_i=\delta_i-\hat H_0(t_i)\)) summarize the censored response. PLS components \(\mathbf T=\mathbf X_s\mathbf W(\mathbf P^\top\mathbf W)^{-1}\) are extracted from the standardized predictors against \(d\), and a Cox model \(\lambda(t\mid\mathbf t)=\lambda_0(t)\exp(\mathbf t^\top\boldsymbol\beta)\) is fitted on the scores. The risk score of a new row is its linear predictor.

Appropriate uses

Risk scores for right-censored survival times from high-dimensional spectra, where a direct Cox model is not identifiable.

Limits and validation

Only the linear predictor is predicted; the Breslow baseline hazard is reported by the C function but not kept by the estimator state. Ties use Breslow risk sets, where plsRcox defaults to Efron.

Implementation

X is standardized with the population standard deviation, the null-model deviance residuals are centred and regressed on it by NIPALS PLS1, and the Breslow partial likelihood is maximized on the scores by Newton-Raphson (at most max_iter steps, tolerance tol). The estimator role takes Y = (time, event) and keeps input-scale coefficients and the X mean.

Sources and provenance

Current implementation: cpp/src/core/extra_pls.cpp.

API and bindings

C ABI (ABI 2): n4m_estimators_pls_cox_fit. Use the linked public header for the exact signature, configuration, and result handles.

Python: no current AST-verified public n4m re-export was found for this method. The linked C ABI above is the documented surface in this checkout.

R (source-verified): pls_cox_fit(X, n_components, survival_times, event_indicators).

The source signature has additional required inputs, so no example call is fabricated.

MATLAB / Octave (source-verified): pls_cox(X, n_components, survival_times, event_indicators).

The source signature has additional required inputs, so no example call is fabricated.

Registry parity references 📐

  • 📐 ref.python_numpy (python · python) — numpy in-tree · strict (rmse_rel ≤ 1e-06) — In-tree NumPy port of Bastien 2008 PLS-Cox (deviance residuals + NIPALS PLS + Breslow Cox PH). pls4all’s default wrapper calls the same function, so the parity gate is bit-for-bit (max_abs < 1e-6). R plsRcox::coxsplsDR is the published algorithmic counterpart but differs at the 1e-3 level due to Efron ties + scaling conventions; the native C++ kernel (legacy=True) runs the same algorithm.

Benchmarks

Archived measurement identity. Backend labels in this table are the raw IDs recorded when the benchmark ran (including historical pls4all.* IDs). They preserve measurement provenance and do not describe a current public Python, R, or MATLAB binding; use the source-verified API and bindings section above for current entry points.

Adaptive wall-clock per cell measured against full_matrix.csv. Only backends that implement this method are listed; libraries without the method are omitted.

Verdict  ·  ✓ ref / ≈ ref / ~ shape mark a reference-gate pass at strict / relaxed / qualitative tolerance  ·  ✓ bind = archived binding-harness result agrees with the C++ baseline  ·  ⇄ cross-check = documented by-design selector/RNG/model, noncanonical API/facade convention, or secondary oracle  ·  ✗ divergent  ·  ⚠ error  ·  — not run. The fastest backend per column is marked 🏆.

Reference gate: strict — numeric equivalence (rmse_rel_tol ≤ 1e-06).

Rows tagged with 📐 are the canonical parity references for this method (declared in parity_timing.registry). C++ and external rows show reference parity; archived language-harness rows show binding parity against the C++ backend. Hover the icon for role and tolerance band.

BackendParity200×30 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref1.79 ms
Python · archived pls4all benchmark
pls4all.python✓ bind1.75 ms🏆
pls4all.sklearn⇄ +2e+002.13 ms
R · archived pls4all benchmark
pls4all.R⇄ +2e+004.52 ms
pls4all.R.formula⇄ +2e+005.52 ms
pls4all.R.mdatools⇄ +2e+005.51 ms
pls4all.R.pls⇄ +2e+005.43 ms
Python · external
📐ref.python_numpysource2.03 ms
BackendParity200×30 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref1.92 ms
Python · archived pls4all benchmark
pls4all.python✓ bind1.97 ms
pls4all.sklearn⇄ +2e+001.45 ms🏆
R · archived pls4all benchmark
pls4all.R⇄ +2e+004.59 ms
pls4all.R.formula⇄ +2e+0020.3 ms
pls4all.R.mdatools⇄ +2e+0014.8 ms
pls4all.R.pls⇄ +2e+0014.0 ms
Python · external
📐ref.python_numpysource6.01 ms
BackendParity200×30 (ms)
C++ native · libn4m
pls4all.cpp.blas+omp✓ ref6.51 ms
Python · archived pls4all benchmark
pls4all.python✓ bind4.69 ms
pls4all.sklearn⇄ +2e+003.91 ms
R · archived pls4all benchmark
pls4all.R⇄ +2e+009.54 ms
pls4all.R.formula⇄ +2e+0017.4 ms
pls4all.R.mdatools⇄ +2e+0012.8 ms
pls4all.R.pls⇄ +2e+0017.2 ms
Python · external
📐ref.python_numpysource2.02 ms🏆

See also: benchmark overview · methods index · interactive dashboard