class_docstr: Partial Least Squares (PLS)
  
  This class implements the generic PLS algorithm.
  
  Main ref: Wegelin, a survey of Partial Least Squares (PLS) methods,
  with emphasis on the two-block case
  https://stat.uw.edu/sites/default/files/files/reports/2000/tr371.pdf
class_docstr_tok: ["Partial","Least","Squares","(","PLS",")","This","class","implements","the","generic","PLS","algorithm",".","Main","ref",":","Wegelin",",","a","survey","of","Partial","Least","Squares","(","PLS",")","methods",",","with","emphasis","on","the","two-block","case","https",":","\/\/stat.uw.edu\/sites\/default\/files\/files\/reports\/2000\/tr371.pdf"]
code: def __init__(
      self,
      n_components=2,
      *,
      scale=True,
      deflation_mode="regression",
      mode="A",
      algorithm="nipals",
      max_iter=500,
      tol=1e-06,
      copy=True,
  ):
      self.n_components = n_components
      self.deflation_mode = deflation_mode
      self.mode = mode
      self.scale = scale
      self.algorithm = algorithm
      self.max_iter = max_iter
      self.tol = tol
      self.copy = copy
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  from numbers import Integral, Real
  import numpy
  from scipy.linalg import svd
  from ..base import BaseEstimator, ClassNamePrefixFeaturesOutMixin, MultiOutputMixin, RegressorMixin, TransformerMixin, _fit_context
  from ..exceptions import ConvergenceWarning
  from ..utils import check_array, check_consistent_length
  from ..utils._param_validation import Interval, StrOptions
  from ..utils.extmath import svd_flip
  from ..utils.fixes import parse_version, sp_version
  from ..utils.validation import FLOAT_DTYPES, check_is_fitted
label_desc: Use image node_id 1 to create a new _PLS object from inherited base classes: ClassNamePrefixFeaturesOutMixin, TransformerMixin, RegressorMixin, MultiOutputMixin, BaseEstimator with example: obj = _PLS(n_components)