Quantum algorithms for ridge regression
Chao‐Hua Yu, Fei Gao, Qiaoyan Wen · arXiv (Cornell University) · 2017
Ridge regression (RR), also called regularized linear regression, is an important machine learning technique which introduces a regularization hyperparameter to ordinary multiple linear regression for analyzing data suffering from multicollinearity. Here we provide an efficient quantum algorithm for RR. Specifically, by giving the technique of parallel Hamiltonian simulation that can simulate a number of Hermitian matrices in parallel, we develop a quantum version of $K$-fold cross-validation approach that can efficiently estimate the predictive performance of RR. Our algorithm involves two phases: (1) we first use the quantum $K$-fold cross-validation to efficiently determine an approximately optimal regularization hyperparameter for RR with which RR can achieve very good predictive performance, and (2) then generate a quantum state encoding the optimal fitting parameters of RR with such hyperparameter, which can be further utilized to predict new data. Our algorithm can handle nonsparse data matrices, and is exponentially faster than the classical algorithm for (low-rank) design matrices with relatively small elements and low condition numbers.