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: Save ``self.model`` to the file from ``fname`` or, if not given, ``self.save_path``.             If ``self.save_path`` does not have ``.pkl`` extension, then it will be replaced             to ``str(Path(self.save_path).stem) + ".pkl"``
  
  Args:
      fname:  string name of path to model to save to
  
  Returns:
      None
docstr_tok: ["Save","``","self.model","``","to","the","file","from","``","fname","``","or",",","if","not","given",",","``","self.save_path","``",".","If","``","self.save_path","``","does","not","have","``",".pkl","``","extension",",","then","it","will","be","replaced","to","``","str","(","Path","(","self.save_path",")",".stem",")","+","``",".pkl","''","``","Args",":","fname",":","string","name","of","path","to","model","to","save","to","Returns",":","None"]
code: def save(self, fname: str = None) -> None:
      """
          Save ``self.model`` to the file from ``fname`` or, if not given, ``self.save_path``. \
              If ``self.save_path`` does not have ``.pkl`` extension, then it will be replaced \
              to ``str(Path(self.save_path).stem) + ".pkl"``
  
          Args:
              fname:  string name of path to model to save to
  
          Returns:
              None
          """
      if fname is None:
          fname = self.save_path
  
      fname = Path(fname).with_suffix(".pkl")
  
      log.info("Saving model to {}".format(str(fname)))
      with open(fname, "wb") as f:
          pickle.dump(self.model, f, protocol=4)
      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 6 for calling the SklearnComponent obj's underlying member method code with example usage: obj.save(fname) without return types