class_docstr: Base class to implement randomized linear models for feature selection
  
  This implements the strategy by Meinshausen and Buhlman:
  stability selection with randomized sampling, and random re-weighting of
  the penalty.
docstr: Fit the model using X, y as training data.
  
  Parameters
  ----------
  X : array-like, shape = [n_samples, n_features]
      Training data.
  
  y : array-like, shape = [n_samples]
      Target values.
  
  Returns
  -------
  self : object
      Returns an instance of self.
code: def fit(self, X, y):
      """Fit the model using X, y as training data.
  
      Parameters
      ----------
      X : array-like, shape = [n_samples, n_features]
          Training data.
  
      y : array-like, shape = [n_samples]
          Target values.
  
      Returns
      -------
      self : object
          Returns an instance of self.
      """
      X, y = check_X_y(
          X,
          y,
          ["csr", "csc"],
          y_numeric=True,
          ensure_min_samples=2,
          estimator=self,
      )
      X = as_float_array(X, copy=False)
      n_samples, n_features = X.shape
  
      X, y, X_offset, y_offset, X_scale = self._preprocess_data(
          X, y, self.fit_intercept, self.normalize
      )
  
      estimator_func, params = self._make_estimator_and_params(X, y)
      memory = self.memory
      if isinstance(memory, six.string_types):
          memory = Memory(cachedir=memory)
  
      scores_ = memory.cache(
          _resample_model, ignore=["verbose", "n_jobs", "pre_dispatch"]
      )(
          estimator_func,
          X,
          y,
          scaling=self.scaling,
          n_resampling=self.n_resampling,
          n_jobs=self.n_jobs,
          verbose=self.verbose,
          pre_dispatch=self.pre_dispatch,
          random_state=self.random_state,
          sample_fraction=self.sample_fraction,
          **params,
      )
  
      if scores_.ndim == 1:
          scores_ = scores_[:, np.newaxis]
      self.all_scores_ = scores_
      self.scores_ = np.max(self.all_scores_, axis=1)
      return self
  
imports: import itertools
  from abc import ABCMeta, abstractmethod
  import warnings
  import numpy
  from scipy.sparse import issparse
  from scipy import sparse
  from scipy.interpolate import interp1d
  from .base import _preprocess_data
  from ..base import BaseEstimator, TransformerMixin
  from ..externals import six
  from ..externals.joblib import Memory, Parallel, delayed
  from ..utils import as_float_array, check_random_state, check_X_y, check_array, safe_mask
  from ..utils.validation import check_is_fitted
  from .least_angle import lars_path, LassoLarsIC
  from .logistic import LogisticRegression
  from ..exceptions import ConvergenceWarning
label_desc: Use image node_id 2 for calling the BaseRandomizedLinearModel obj's underlying member method code with example usage: obj.fit(X, y) and returns: self