class_docstr: A sklearn style wrapper class for statsmodels' OLS.
class_docstr_tok: ["A","sklearn","style","wrapper","class","for","statsmodels","'","OLS","."]
docstr: Fit OLS.
  Args:
      X (np.matrix): a feature matrix
      y (np.array): a label vector
docstr_tok: ["Fit","OLS",".","Args",":","X","(","np.matrix",")",":","a","feature","matrix","y","(","np.array",")",":","a","label","vector"]
code: def fit(self, X, y):
      """Fit OLS.
      Args:
          X (np.matrix): a feature matrix
          y (np.array): a label vector
      """
      # Append ones. The first column is for the treatment indicator.
      X = sm.add_constant(X, prepend=False, has_constant="add")
      self.model = sm.OLS(y, X).fit(cov_type=self.cov_type)
      self.coefficients = self.model.params
      self.conf_ints = self.model.conf_int(alpha=self.alpha)
  
imports: import logging
  import numpy
  from tqdm import tqdm
  from scipy.stats import norm
  from sklearn.dummy import DummyRegressor
  import statsmodels.api
  from copy import deepcopy
  from causalml.inference.meta.base import BaseLearner
  from causalml.inference.meta.utils import check_treatment_vector, convert_pd_to_np
  from causalml.metrics import regression_metrics, classification_metrics
label_desc: Use image node_id 2 for calling the StatsmodelsOLS obj's underlying member method code with example usage: obj.fit(X, y) without return types