  In this work, we consider the algorithm to the (nonlinear) regression
problems with $\ell_0$ penalty. The existing algorithms for $\ell_0$ based
optimization problem are often carried out with a fixed step size, and the
selection of an appropriate step size depends on the restricted strong
convexity and smoothness for the loss function, hence it is difficult to
compute in practical calculation. In sprite of the ideas of support detection
and root finding \cite{HJK2020}, we proposes a novel and efficient data-driven
line search rule to adaptively determine the appropriate step size. We prove
the $\ell_2$ error bound to the proposed algorithm without much restrictions
for the cost functional. A large number of numerical comparisons with
state-of-the-art algorithms in linear and logistic regression problems show the
stability, effectiveness and superiority of the proposed algorithms.
