Background: The generator coordinate method (GCM) is an important tool of choice for modeling large-amplitude collective motion in atomic nuclei. Recently, it has attracted increasing interest as it can be exploited to extend ab initio methods to the collective excitations of medium-mass and heavy deformed nuclei, as well as the nuclear matrix elements (NME) of candidates for neutrinoless double-beta ($0\ensuremath{\nu}\ensuremath{\beta}\ensuremath{\beta}$) decay.Purpose: The computational complexity of the GCM increases rapidly with the number of collective coordinates. It imposes a strong restriction on the applicability of the method. We aim to exploit statistical machine-learning (ML) algorithms to speed up GCM calculations and ultimately provide a more efficient description of nuclear energy spectra and other observables such as the NME of $0\ensuremath{\nu}\ensuremath{\beta}\ensuremath{\beta}$ decay without loss of accuracy.Method: In this work, we propose a subspace-reduction algorithm that employs optimal statistical ML models as surrogates for exact quantum-number projection calculations for norm and Hamiltonian kernels. The model space of the original GCM is reduced to a subspace relevant for nuclear low energy spectra and the NME of ground state to ground state $0\ensuremath{\nu}\ensuremath{\beta}\ensuremath{\beta}$ decay based on the orthogonality condition (OC) and the energy-transition-orthogonality procedure (ENTROP), respectively. Nuclear energy spectra are determined by the GCM through the configuration mixing within this subspace. For simplicity, the polynomial ridge regression (RR) algorithm is used to learn the norm and Hamiltonian kernels of axially deformed configurations. The efficiency and accuracy of this algorithm are illustrated for $^{76}\mathrm{Ge}$ and $^{76}\mathrm{Se}$ by comparing results obtained using the optimal RR models to direct GCM calculations. The nonrelativistic Gogny force D1S and relativistic energy density functional PC-PK1, a valence-space shell-model Hamiltonian, and a modern nuclear interaction derived from chiral effective field theory are employed.Results: The low-lying energy spectra of $^{76}\mathrm{Ge}$ and $^{76}\mathrm{Se}$, as well as the $0\ensuremath{\nu}\ensuremath{\beta}\ensuremath{\beta}$-decay NME between their ground states, are computed. The results show that the performance of the $\mathrm{GCM}+\text{OC/ENTROP}+\mathrm{RR}$ is more robust than that of the $\mathrm{GCM}+\mathrm{RR}$ alone, and the former can reproduce the results of the original GCM calculation accurately with a significantly reduced computational cost.Conclusions: Statistical ML algorithms, when implemented properly, can accelerate GCM calculations without loss of accuracy. In applications with axially deformed states, the computation time can be reduced by a factor of three to nine for energy spectra and NMEs, respectively. This factor is expected to increase significantly with the number of employed generator coordinates.