class_docstr: The `Regression` mixer inherits from scikit-learn's `Ridge` class
  (https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.Ridge.html)
  
  This class performs Ordinary Least-squares Regression (OLS) under the hood; 
  this means it fits a set of coefficients (w_1, w_2, ..., w_N) for an N-length feature vector, that minimize the difference
  between the predicted target value and the observed true value.
  
  This mixer intakes featurized (encoded) data to predict the target. It deploys if the target data-type is considered numerical/integer.
class_docstr_tok: ["The","`","Regression","`","mixer","inherits","from","scikit-learn","'s","`","Ridge","`","class","(","https",":","\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.linear_model.Ridge.html",")","This","class","performs","Ordinary","Least-squares","Regression","(","OLS",")","under","the","hood",";","this","means","it","fits","a","set","of","coefficients","(","w_1",",","w_2",",","...",",","w_N",")","for","an","N-length","feature","vector",",","that","minimize","the","difference","between","the","predicted","target","value","and","the","observed","true","value",".","This","mixer","intakes","featurized","(","encoded",")","data","to","predict","the","target",".","It","deploys","if","the","target","data-type","is","considered","numerical\/integer","."]
docstr: Fits `Ridge` model on input feature data to provide predictions.
  
  :param train_data: Regression if fit on this
  :param dev_data: This just gets concatenated to the ``train_data``
docstr_tok: ["Fits","`","Ridge","`","model","on","input","feature","data","to","provide","predictions",".",":","param","train_data",":","Regression","if","fit","on","this",":","param","dev_data",":","This","just","gets","concatenated","to","the","``","train_data","``"]
code: def fit(self, train_data: EncodedDs, dev_data: EncodedDs) -> None:
      """
      Fits `Ridge` model on input feature data to provide predictions.
  
      :param train_data: Regression if fit on this
      :param dev_data: This just gets concatenated to the ``train_data``
      """
      if self.target_dtype not in (
          dtype.float,
          dtype.integer,
          dtype.quantity,
      ):
          raise Exception(
              f"Unspported {self.target_dtype} type for regression"
          )
  
      if self.stop_after < len(train_data) * len(self.dtype_dict) / pow(
          10, 3
      ):
          raise Exception(
              f"Insufficient time ({self.stop_after} seconds) to fit a linear regression on the data!"
          )
  
      log.info("Fitting Linear Regression model")
      X = []
      Y = []
      for x, y in ConcatedEncodedDs([train_data, dev_data]):
          X.append(x.tolist())
          Y.append(y.tolist())
  
      if self.supports_proba:
          self.label_map = self.target_encoder.rev_map
  
      self.model = Ridge().fit(X, Y)
      log.info(
          f"Regression based correlation of: {self.model.score(X, Y)}"
      )
  
file_path: lightwood/lightwood/mixer/regression.py
imports: from typing import Optional
  import torch
  import pandas
  from scipy.special import softmax
  from sklearn.linear_model import Ridge
  from lightwood.helpers.log import log
  from type_infer.dtype import dtype
  from lightwood.mixer import BaseMixer
  from lightwood.encoder.base import BaseEncoder
  from lightwood.api.types import PredictionArguments
  from lightwood.data.encoded_ds import ConcatedEncodedDs, EncodedDs
label_desc: Use image node_id 2 for calling the Regression obj's underlying member method code with example usage: obj.fit(train_data, dev_data) without return types