class_docstr: Classifier for multivariate time series.
  
  It provides a convenient class to classify multivariate time series with
  classifier that can only deal with univariate time series. The labels are
  predicted in a hard voting fashion using the predictions for each feature.
  
  Parameters
  ----------
  estimator : estimator object or list thereof
      Classifier. If one estimator is provided, it is cloned and each clone
      performs prediction for one feature. If a list of estimators is
      provided, each estimator performs prediction for one feature.
  
  weights : array-like, shape = (n_classifiers,) or None (default=None)
      Sequence of weights (`float` or `int`) to weight the occurrences of
      predicted class labels. Uses uniform weights if None.
  
  Attributes
  ----------
  classes_ : array, shape = (n_classes,)
      An array of class labels known to the classifier.
  
  estimators_ : list of estimator objects
      The collection of fitted classifiers.
  
  Examples
  --------
  >>> from pyts.classification import BOSSVS
  >>> from pyts.datasets import load_basic_motions
  >>> from pyts.multivariate.classification import MultivariateClassifier
  >>> X_train, X_test, y_train, y_test = load_basic_motions(return_X_y=True)
  >>> clf = MultivariateClassifier(BOSSVS())
  >>> clf.fit(X_train, y_train)
  MultivariateClassifier(...)
  >>> clf.score(X_test, y_test)
  1.0
class_docstr_tok: ["Classifier","for","multivariate","time","series",".","It","provides","a","convenient","class","to","classify","multivariate","time","series","with","classifier","that","can","only","deal","with","univariate","time","series",".","The","labels","are","predicted","in","a","hard","voting","fashion","using","the","predictions","for","each","feature",".","Parameters","--","--","--","--","--","estimator",":","estimator","object","or","list","thereof","Classifier",".","If","one","estimator","is","provided",",","it","is","cloned","and","each","clone","performs","prediction","for","one","feature",".","If","a","list","of","estimators","is","provided",",","each","estimator","performs","prediction","for","one","feature",".","weights",":","array-like",",","shape","=","(","n_classifiers",",",")","or","None","(","default=None",")","Sequence","of","weights","(","`","float","`","or","`","int","`",")","to","weight","the","occurrences","of","predicted","class","labels",".","Uses","uniform","weights","if","None",".","Attributes","--","--","--","--","--","classes_",":","array",",","shape","=","(","n_classes",",",")","An","array","of","class","labels","known","to","the","classifier",".","estimators_",":","list","of","estimator","objects","The","collection","of","fitted","classifiers",".","Examples","--","--","--","--",">",">",">","from","pyts.classification","import","BOSSVS",">",">",">","from","pyts.datasets","import","load_basic_motions",">",">",">","from","pyts.multivariate.classification","import","MultivariateClassifier",">",">",">","X_train",",","X_test",",","y_train",",","y_test","=","load_basic_motions","(","return_X_y=True",")",">",">",">","clf","=","MultivariateClassifier","(","BOSSVS","(",")",")",">",">",">","clf.fit","(","X_train",",","y_train",")","MultivariateClassifier","(","...",")",">",">",">","clf.score","(","X_test",",","y_test",")","1.0"]
docstr: Check parameters.
docstr_tok: ["Check","parameters","."]
code: def _check_params(self, n_features):
      """Check parameters."""
      classifier = isinstance(
          self.estimator, BaseEstimator
      ) and hasattr(self.estimator, "predict")
      if classifier:
          self.estimators_ = [
              clone(self.estimator) for _ in range(n_features)
          ]
  
      elif isinstance(self.estimator, list):
          if len(self.estimator) != n_features:
              raise ValueError(
                  "If 'estimator' is a list, its length must be equal to "
                  "the number of features ({0} != {1})".format(
                      len(self.estimator), n_features
                  )
              )
          for i, estimator in enumerate(self.estimator):
              if not (
                  isinstance(estimator, BaseEstimator)
                  and hasattr(estimator, "predict")
              ):
                  raise ValueError(
                      "Estimator {} must be a classifier.".format(i)
                  )
          self.estimators_ = self.estimator
  
      else:
          raise TypeError(
              "'estimator' must be a classifier that inherits from "
              "sklearn.base.BaseEstimator or a list thereof."
          )
  
file_path: pyts/pyts/multivariate/classification/multivariate.py
imports: import numpy
  from numba import njit, prange
  from sklearn.base import BaseEstimator, clone
  from sklearn.preprocessing import LabelEncoder
  from sklearn.utils.validation import check_is_fitted
  from ...base import MultivariateClassifierMixin
  from ..utils import check_3d_array
label_desc: Use image node_id 4 for calling the MultivariateClassifier obj's underlying member method code with example usage: obj._check_params(n_features) without return types