class_docstr: Class implements wrapper for sklearn components for feature extraction,
  feature selection, classification, regression etc.
  
  Args:
      model_class: string with full name of sklearn model to use, e.g. ``sklearn.linear_model:LogisticRegression``
      save_path: save path for model, e.g. full name ``model_path/model.pkl``             or prefix ``model_path/model`` (still model will be saved to ``model_path/model.pkl``)
      load_path: load path for model, e.g. full name ``model_path/model.pkl``             or prefix ``model_path/model`` (still model will be loaded from ``model_path/model.pkl``)
      infer_method: string name of class method to use for infering model,             e.g. ``predict``, ``predict_proba``, ``predict_log_proba``, ``transform``
      ensure_list_output: whether to ensure that output for each sample is iterable (but not string)
      kwargs: dictionary with parameters for the sklearn model
  
  Attributes:
      model: sklearn model instance
      model_class: string with full name of sklearn model to use, e.g. ``sklearn.linear_model:LogisticRegression``
      model_params: dictionary with parameters for the sklearn model without pipe parameters
      pipe_params: dictionary with parameters for pipe: ``in``, ``out``, ``fit_on``, ``main``, ``name``
      save_path: save path for model, e.g. full name ``model_path/model.pkl``             or prefix ``model_path/model`` (still model will be saved to ``model_path/model.pkl``)
      load_path: load path for model, e.g. full name ``model_path/model.pkl``             or prefix ``model_path/model`` (still model will be loaded from ``model_path/model.pkl``)
      infer_method: string name of class method to use for infering model,             e.g. ``predict``, ``predict_proba``, ``predict_log_proba``, ``transform``
      ensure_list_output: whether to ensure that output for each sample is iterable (but not string)
docstr: Initialize ``self.model`` as some sklearn model from saved re-initializing ``self.model_params`` parameters.             If in new given parameters ``warm_start`` is set to True and given model admits ``warm_start`` parameter,             model will be initilized from saved with opportunity to continue fitting.
  
  Args:
      fname: string name of path to model to load from
  
  Returns:
      None
docstr_tok: ["Initialize","``","self.model","``","as","some","sklearn","model","from","saved","re-initializing","``","self.model_params","``","parameters",".","If","in","new","given","parameters","``","warm_start","``","is","set","to","True","and","given","model","admits","``","warm_start","``","parameter",",","model","will","be","initilized","from","saved","with","opportunity","to","continue","fitting",".","Args",":","fname",":","string","name","of","path","to","model","to","load","from","Returns",":","None"]
code: def load(self, fname: str = None) -> None:
      """
          Initialize ``self.model`` as some sklearn model from saved re-initializing ``self.model_params`` parameters. \
              If in new given parameters ``warm_start`` is set to True and given model admits ``warm_start`` parameter, \
              model will be initilized from saved with opportunity to continue fitting.
  
          Args:
              fname: string name of path to model to load from
  
          Returns:
              None
          """
      if fname is None:
          fname = self.load_path
  
      fname = Path(fname).with_suffix(".pkl")
  
      if fname.exists():
          log.debug(
              "Loading model {} from {}".format(
                  self.model_class, str(fname)
              )
          )
          with open(fname, "rb") as f:
              self.model = pickle.load(f)
  
          warm_start = self.model_params.get("warm_start", None)
          self.model_params = {
              param: getattr(self.model, param)
              for param in self.get_class_attributes(self.model)
          }
          self.model_class = (
              self.model.__module__ + self.model.__class__.__name__
          )
          log.debug(
              "Model {} loaded  with parameters".format(
                  self.model_class
              )
          )
  
          if warm_start and "warm_start" in self.model_params.keys():
              self.model_params["warm_start"] = True
              log.debug(
                  "Fitting of loaded model can be continued because `warm_start` is set to True"
              )
          else:
              log.warning(
                  "Fitting of loaded model can not be continued. Model can be fitted from scratch."
                  "If one needs to continue fitting, please, look at `warm_start` parameter"
              )
      else:
          log.warning("Cannot load model from {}".format(str(fname)))
          self.init_from_scratch()
  
      return
  
imports: import inspect
  import pickle
  from logging import getLogger
  from pathlib import Path
  from typing import List, Tuple, Union, Callable
  import numpy
  from scipy.sparse import issparse, csr_matrix
  from scipy.sparse import spmatrix
  from scipy.sparse import vstack, hstack
  from deeppavlov.core.common.errors import ConfigError
  from deeppavlov.core.common.registry import register, cls_from_str
  from deeppavlov.core.models.estimator import Estimator
label_desc: Use image node_id 5 for calling the SklearnComponent obj's underlying member method code with example usage: obj.load(fname) without return types