def _objective_func(f, x_full, k_params, alpha, *args):
 x_params = x_full[:k_params]
 x_added = x_full[k_params:]
 return (f(x_params, *args) + (alpha * x_added).sum())

def _objective_func ( f , x_full , k_params , alpha , * args ) : x_params = x_full [ : k_params ] x_added = x_full [ k_params : ] return ( f ( x_params , * args ) + ( alpha * x_added ) . sum ( ) )
the regularized objective function .