class_docstr: Implements the cross-validation version of
  `~greykite.algo.common.partial_regularize_regression.PartialRegularizeRegression`.
  
  Attributes
  ----------
  l1_index : `list`[`int`, `str`], default None
      The index of columns that are to be penalized with L1 norm.
  l1_alphas : `list`[`float`], default None
      The L1 norm regularization parameters.
  n_l1_alphas : `int`, default 50.
      The number of L1 norm regularization parameters. Will not be used if `l1_alphas` is provided.
  l2_index : `list`[`int`, `str`], default None
      The index of columns that are to be penalized with L2 norm.
  l2_alphas : `list`[`float`], default (0.001, 0.1, 10)
      The L2 norm regularization parameter.
  cv : `int`, cross-validation generator, or iterable, default 5
      Determines the cross-validation splitting strategy. This is the same as the ``cv`` in `sklearn` modules.
      Possible inputs for cv are:
          - None, to use the default 5-fold cross validation,
          - integer, to specify the number of folds.
          - :term:`CV splitter`,
          - An iterable yielding (train, test) splits as arrays of indices.
  has_constant : `list`[`int`]
      A list of detected constant column indices by `intercept_checker`.
  constant_index : `list`[`int`]
      A list of constant column indices after preprocessing.
  non_penalize_index : `list`[`int`]
      A list of column indices whose corresponding regressors are not to be penalized.
  best_model : `~greykite.algo.common.partial_regularize_regression.PartialRegularizeRegression`
      The best model selected by cross validation.
  best_mse : `float`
      The best cross-validated test mse.
  l1_alpha_ : `float`
      The best L1 norm regularization parameter.
  l2_alpha_ : `float`
      The best L2 norm regularization parameter.
  intercept_ : `float`
      The fitted intercept.
  coef_ : `numpy.array`
      The fitted coefficients.
class_docstr_tok: ["Implements","the","cross-validation","version","of","`","~greykite.algo.common.partial_regularize_regression.PartialRegularizeRegression","`",".","Attributes","--","--","--","--","--","l1_index",":","`","list","`","[","`","int","`",",","`","str","`","]",",","default","None","The","index","of","columns","that","are","to","be","penalized","with","L1","norm",".","l1_alphas",":","`","list","`","[","`","float","`","]",",","default","None","The","L1","norm","regularization","parameters",".","n_l1_alphas",":","`","int","`",",","default","50",".","The","number","of","L1","norm","regularization","parameters",".","Will","not","be","used","if","`","l1_alphas","`","is","provided",".","l2_index",":","`","list","`","[","`","int","`",",","`","str","`","]",",","default","None","The","index","of","columns","that","are","to","be","penalized","with","L2","norm",".","l2_alphas",":","`","list","`","[","`","float","`","]",",","default","(","0.001",",","0.1",",","10",")","The","L2","norm","regularization","parameter",".","cv",":","`","int","`",",","cross-validation","generator",",","or","iterable",",","default","5","Determines","the","cross-validation","splitting","strategy",".","This","is","the","same","as","the","``","cv","``","in","`","sklearn","`","modules",".","Possible","inputs","for","cv","are",":","-","None",",","to","use","the","default","5-fold","cross","validation",",","-","integer",",","to","specify","the","number","of","folds",".","-",":","term",":","`","CV","splitter","`",",","-","An","iterable","yielding","(","train",",","test",")","splits","as","arrays","of","indices",".","has_constant",":","`","list","`","[","`","int","`","]","A","list","of","detected","constant","column","indices","by","`","intercept_checker","`",".","constant_index",":","`","list","`","[","`","int","`","]","A","list","of","constant","column","indices","after","preprocessing",".","non_penalize_index",":","`","list","`","[","`","int","`","]","A","list","of","column","indices","whose","corresponding","regressors","are","not","to","be","penalized",".","best_model",":","`","~greykite.algo.common.partial_regularize_regression.PartialRegularizeRegression","`","The","best","model","selected","by","cross","validation",".","best_mse",":","`","float","`","The","best","cross-validated","test","mse",".","l1_alpha_",":","`","float","`","The","best","L1","norm","regularization","parameter",".","l2_alpha_",":","`","float","`","The","best","L2","norm","regularization","parameter",".","intercept_",":","`","float","`","The","fitted","intercept",".","coef_",":","`","numpy.array","`","The","fitted","coefficients","."]
docstr: Predicts for new data.
  
  Parameters
  ----------
  x : `numpy.array` or `pandas.DataFrame`
      The new data matrix.
  
  Returns
  -------
  y_pred : `numpy.array`, `pandas.DataFrame` or `pandas.Series`
      The predicted values.
docstr_tok: ["Predicts","for","new","data",".","Parameters","--","--","--","--","--","x",":","`","numpy.array","`","or","`","pandas.DataFrame","`","The","new","data","matrix",".","Returns","--","--","--","-","y_pred",":","`","numpy.array","`",",","`","pandas.DataFrame","`","or","`","pandas.Series","`","The","predicted","values","."]
code: def predict(self, x):
      """Predicts for new data.
  
      Parameters
      ----------
      x : `numpy.array` or `pandas.DataFrame`
          The new data matrix.
  
      Returns
      -------
      y_pred : `numpy.array`, `pandas.DataFrame` or `pandas.Series`
          The predicted values.
      """
      pred = self.best_model.predict(x)
      return pred
  
imports: from typing import Union
  import numpy
  import pandas
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.linear_model import Lasso
  from sklearn.linear_model import LassoCV
  from sklearn.linear_model import LinearRegression
  from sklearn.linear_model import Ridge
  from sklearn.linear_model import RidgeCV
  from sklearn.linear_model._coordinate_descent import _alpha_grid
  from sklearn.model_selection import check_cv
  from greykite.common.python_utils import ignore_warnings
label_desc: Use image node_id 3 for calling the PartialRegularizeRegressionCV obj's underlying member method code with example usage: obj.predict(x) and returns: pred