class_docstr: The RidgeRegression class is used to fit ridge models against one or more labels optimized over a provided list of
  ridge alpha parameters.  It is similar in function to RidgeReduction except that whereas RidgeReduction attempts to
  reduce a starting matrix X to a block matrix of smaller dimension, RidgeRegression is intended to find an optimal
  model of the form Y_hat ~ XB, where Y_hat is a matrix of one or more predicted labels and B is a matrix of
  coefficients.  The optimal ridge alpha value is chosen for each label by maximizing the average out of fold r2
  score.
class_docstr_tok: ["The","RidgeRegression","class","is","used","to","fit","ridge","models","against","one","or","more","labels","optimized","over","a","provided","list","of","ridge","alpha","parameters",".","It","is","similar","in","function","to","RidgeReduction","except","that","whereas","RidgeReduction","attempts","to","reduce","a","starting","matrix","X","to","a","block","matrix","of","smaller","dimension",",","RidgeRegression","is","intended","to","find","an","optimal","model","of","the","form","Y_hat","~","XB",",","where","Y_hat","is","a","matrix","of","one","or","more","predicted","labels","and","B","is","a","matrix","of","coefficients",".","The","optimal","ridge","alpha","value","is","chosen","for","each","label","by","maximizing","the","average","out","of","fold","r2","score","."]
docstr: Fits a ridge regression model, then transforms the matrix using the model.
  
  Returns:
      Pandas DataFrame containing prediction y_hat values. The shape and order match labeldf such that the
      rows are indexed by sample ID and the columns by label. The column types are float64.
docstr_tok: ["Fits","a","ridge","regression","model",",","then","transforms","the","matrix","using","the","model",".","Returns",":","Pandas","DataFrame","containing","prediction","y_hat","values",".","The","shape","and","order","match","labeldf","such","that","the","rows","are","indexed","by","sample","ID","and","the","columns","by","label",".","The","column","types","are","float64","."]
code: def fit_transform(self) -> pd.DataFrame:
      """
      Fits a ridge regression model, then transforms the matrix using the model.
  
      Returns:
          Pandas DataFrame containing prediction y_hat values. The shape and order match labeldf such that the
          rows are indexed by sample ID and the columns by label. The column types are float64.
      """
      self.fit()
      return self.transform()
  
imports: from .ridge_udfs import *
  from .ridge_reduction import RidgeReduction
  from .model_functions import _prepare_labels_and_warn, _prepare_covariates, _check_model, _check_cv
  from nptyping import Float, NDArray
  import pandas
  from pyspark.sql import DataFrame, Row
  from pyspark.sql.functions import pandas_udf, PandasUDFType
  import pyspark.sql.functions
  from typeguard import typechecked
  from typing import Any, Dict, List, Union
  from glow.logging import record_hls_event
  import warnings
label_desc: Use image node_id 15 for calling the RidgeRegression obj's underlying member method code with example usage: obj.fit_transform() and returns: self