Fast Ridge Regression
Version 1.0.0 (4.59 KB) by
Hiroto Imamura
Fast Ridge regression with multiple ridge parameters and response variables.
ridge_fast is a high-performance MATLAB function designed to perform ridge regression with multiple response variables and multiple ridge penalty values—significantly faster than MATLAB’s built-in ridge function.
Key Features:
- Speed & Efficiency:Utilizes optimized linear algebra routines—Cholesky factorization for single (scalar) ridge penalties and a fully vectorized eigen-decomposition for multiple penalties—to deliver results in a fraction of the time required by the built-in function, especially when processing multiple ridge parameters.
- Versatility:Supports simultaneous processing of multiple response variables and multiple ridge penalty values. This removes the need for iterative loops and repetitive function calls, streamlining large-scale analyses.
- Accuracy:Produces highly accurate coefficient estimates, with the mean squared error (MSE) between ridge_fast and MATLAB’s ridge function (when properly scaled) on the order of 1e-30.
- GPU Compatibility:Accepts GPU arrays in single precision, which can further accelerate computations on large datasets when a supported GPU is available.
- Comprehensive Benchmarking:Includes example code to measure the speed and accuracy of the ridge regression, so you can easily compare performance and verify precision.
Cite As
Hiroto Imamura (2025). Fast Ridge Regression (https://www.mathworks.com/matlabcentral/fileexchange/<...>), MATLAB Central File Exchange. Retrieved February 10, 2025.
MATLAB Release Compatibility
Created with
R2022b
Compatible with R2020b and later releases
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
