code: def _daal4py_predict(self, X):
      X = make2d(X)
      _fptype = getFPType(self.coef_)
  
      ridge_palg = daal4py.ridge_regression_prediction(
          fptype=_fptype, method="defaultDense"
      )
      if self.n_features_in_ != X.shape[1]:
          raise ValueError(
              f"X has {X.shape[1]} features, "
              f"but Ridge is expecting {self.n_features_in_} features as input"
          )
      ridge_res = ridge_palg.compute(X, self.daal_model_)
  
      res = ridge_res.prediction
  
      if res.shape[1] == 1 and self.coef_.ndim == 1:
          res = np.ravel(res)
      return res
  
file_path: scikit-learn-intelex/daal4py/sklearn/linear_model/_ridge.py
imports: import logging
  import numbers
  import numpy
  from scipy import sparse
  from sklearn.linear_model._ridge import Ridge
  from sklearn.linear_model._ridge import _BaseRidge
  from sklearn.utils import check_array, check_X_y
  import daal4py
  from .._device_offload import support_usm_ndarray
  from .._utils import PatchingConditionsChain, control_n_jobs, get_patch_message, getFPType, make2d, run_with_n_jobs, sklearn_check_version
label_desc: Use image node_id 2 for calling a global function with example usage: _daal4py_predict(X) and returns: res