class_docstr: Bagging ensemble of time series classifiers.
  
  Fits ``n_estimators`` clones of a classifier on
  datasets which are instance sub-samples and/or variable sub-samples.
  
  On ``predict_proba``, the mean average of probabilistic predictions is returned.
  For a deterministic classifier, this results in majority vote for ``predict``.
  
  The estimator allows to choose sample sizes fir instances, variables,
  and whether sampling is with or without replacement.
  
  Direct generalization of ``sklearn``'s ``BaggingClassifier``
  to the time series classification task.
  
  Note: if n_features=1, BaggingClassifier turns a univariate classifier into
  a multivariate classifier (as slices seen by ``estimator`` are all univariate).
  
  Parameters
  ----------
  estimator : sktime classifier, descendant of BaseClassifier
      classifier to use in the bagging estimator
  n_estimators : int, default=10
      number of estimators in the sample for bagging
  n_samples : int or float, default=1.0
      The number of instances drawn from ``X`` in ``fit`` to train each clone
      If int, then indicates number of instances precisely
      If float, interpreted as a fraction, and rounded by ``ceil``
  n_features : int or float, default=1.0
      The number of features/variables drawn from ``X`` in ``fit`` to train each clone
      If int, then indicates number of instances precisely
      If float, interpreted as a fraction, and rounded by ``ceil``
      Note: if n_features=1, BaggingClassifier turns a univariate classifier into
      a multivariate classifier (as slices seen by ``estimator`` are all univariate).
  bootstrap : boolean, default=True
      whether samples/instances are drawn with replacement (True) or not (False)
  bootstrap_features : boolean, default=False
      whether features/variables are drawn with replacement (True) or not (False)
  random_state : int, RandomState instance or None, optional (default=None)
      If int, ``random_state`` is the seed used by the random number generator;
      If ``RandomState`` instance, ``random_state`` is the random number generator;
      If None, the random number generator is the ``RandomState`` instance used
      by ``np.random``.
  
  Attributes
  ----------
  estimators_ : list of of sktime classifiers
      clones of classifier in `estimator` fitted in the ensemble
  
  Examples
  --------
  >>> from sktime.classification.ensemble import BaggingClassifier
  >>> from sktime.classification.kernel_based import RocketClassifier
  >>> from sktime.datasets import load_unit_test
  >>> X_train, y_train = load_unit_test(split="train") # doctest: +SKIP
  >>> X_test, y_test = load_unit_test(split="test") # doctest: +SKIP
  >>> clf = BaggingClassifier(
  ...     RocketClassifier(num_kernels=100),
  ...     n_estimators=10,
  ... ) # doctest: +SKIP
  >>> clf.fit(X_train, y_train) # doctest: +SKIP
  BaggingClassifier(...)
  >>> y_pred = clf.predict(X_test) # doctest: +SKIP
class_docstr_tok: ["Bagging","ensemble","of","time","series","classifiers",".","Fits","``","n_estimators","``","clones","of","a","classifier","on","datasets","which","are","instance","sub-samples","and\/or","variable","sub-samples",".","On","``","predict_proba","``",",","the","mean","average","of","probabilistic","predictions","is","returned",".","For","a","deterministic","classifier",",","this","results","in","majority","vote","for","``","predict","``",".","The","estimator","allows","to","choose","sample","sizes","fir","instances",",","variables",",","and","whether","sampling","is","with","or","without","replacement",".","Direct","generalization","of","``","sklearn","``","'s","``","BaggingClassifier","``","to","the","time","series","classification","task",".","Note",":","if","n_features=1",",","BaggingClassifier","turns","a","univariate","classifier","into","a","multivariate","classifier","(","as","slices","seen","by","``","estimator","``","are","all","univariate",")",".","Parameters","--","--","--","--","--","estimator",":","sktime","classifier",",","descendant","of","BaseClassifier","classifier","to","use","in","the","bagging","estimator","n_estimators",":","int",",","default=10","number","of","estimators","in","the","sample","for","bagging","n_samples",":","int","or","float",",","default=1.0","The","number","of","instances","drawn","from","``","X","``","in","``","fit","``","to","train","each","clone","If","int",",","then","indicates","number","of","instances","precisely","If","float",",","interpreted","as","a","fraction",",","and","rounded","by","``","ceil","``","n_features",":","int","or","float",",","default=1.0","The","number","of","features\/variables","drawn","from","``","X","``","in","``","fit","``","to","train","each","clone","If","int",",","then","indicates","number","of","instances","precisely","If","float",",","interpreted","as","a","fraction",",","and","rounded","by","``","ceil","``","Note",":","if","n_features=1",",","BaggingClassifier","turns","a","univariate","classifier","into","a","multivariate","classifier","(","as","slices","seen","by","``","estimator","``","are","all","univariate",")",".","bootstrap",":","boolean",",","default=True","whether","samples\/instances","are","drawn","with","replacement","(","True",")","or","not","(","False",")","bootstrap_features",":","boolean",",","default=False","whether","features\/variables","are","drawn","with","replacement","(","True",")","or","not","(","False",")","random_state",":","int",",","RandomState","instance","or","None",",","optional","(","default=None",")","If","int",",","``","random_state","``","is","the","seed","used","by","the","random","number","generator",";","If","``","RandomState","``","instance",",","``","random_state","``","is","the","random","number","generator",";","If","None",",","the","random","number","generator","is","the","``","RandomState","``","instance","used","by","``","np.random","``",".","Attributes","--","--","--","--","--","estimators_",":","list","of","of","sktime","classifiers","clones","of","classifier","in","`","estimator","`","fitted","in","the","ensemble","Examples","--","--","--","--",">",">",">","from","sktime.classification.ensemble","import","BaggingClassifier",">",">",">","from","sktime.classification.kernel_based","import","RocketClassifier",">",">",">","from","sktime.datasets","import","load_unit_test",">",">",">","X_train",",","y_train","=","load_unit_test","(","split=","''","train","''",")","#","doctest",":","+SKIP",">",">",">","X_test",",","y_test","=","load_unit_test","(","split=","''","test","''",")","#","doctest",":","+SKIP",">",">",">","clf","=","BaggingClassifier","(","...","RocketClassifier","(","num_kernels=100",")",",","...","n_estimators=10",",","...",")","#","doctest",":","+SKIP",">",">",">","clf.fit","(","X_train",",","y_train",")","#","doctest",":","+SKIP","BaggingClassifier","(","...",")",">",">",">","y_pred","=","clf.predict","(","X_test",")","#","doctest",":","+SKIP"]
docstr: Return testing parameter settings for the estimator.
  
  Parameters
  ----------
  parameter_set : str, default="default"
      Name of the set of test parameters to return, for use in tests. If no
      special parameters are defined for a value, will return `"default"` set.
      For classifiers, a "default" set of parameters should be provided for
      general testing, and a "results_comparison" set for comparing against
      previously recorded results if the general set does not produce suitable
      probabilities to compare against.
  
  Returns
  -------
  params : dict or list of dict, default={}
      Parameters to create testing instances of the class.
      Each dict are parameters to construct an "interesting" test instance, i.e.,
      `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
      `create_test_instance` uses the first (or only) dictionary in `params`.
docstr_tok: ["Return","testing","parameter","settings","for","the","estimator",".","Parameters","--","--","--","--","--","parameter_set",":","str",",","default=","''","default","''","Name","of","the","set","of","test","parameters","to","return",",","for","use","in","tests",".","If","no","special","parameters","are","defined","for","a","value",",","will","return","`","``","default","''","`","set",".","For","classifiers",",","a","``","default","''","set","of","parameters","should","be","provided","for","general","testing",",","and","a","``","results_comparison","''","set","for","comparing","against","previously","recorded","results","if","the","general","set","does","not","produce","suitable","probabilities","to","compare","against",".","Returns","--","--","--","-","params",":","dict","or","list","of","dict",",","default=","{","}","Parameters","to","create","testing","instances","of","the","class",".","Each","dict","are","parameters","to","construct","an","``","interesting","''","test","instance",",","i.e.",",","`","MyClass","(","*","*","params",")","`","or","`","MyClass","(","*","*","params","[","i","]",")","`","creates","a","valid","test","instance",".","`","create_test_instance","`","uses","the","first","(","or","only",")","dictionary","in","`","params","`","."]
code: def get_test_params(cls, parameter_set="default"):
      """Return testing parameter settings for the estimator.
  
      Parameters
      ----------
      parameter_set : str, default="default"
          Name of the set of test parameters to return, for use in tests. If no
          special parameters are defined for a value, will return `"default"` set.
          For classifiers, a "default" set of parameters should be provided for
          general testing, and a "results_comparison" set for comparing against
          previously recorded results if the general set does not produce suitable
          probabilities to compare against.
  
      Returns
      -------
      params : dict or list of dict, default={}
          Parameters to create testing instances of the class.
          Each dict are parameters to construct an "interesting" test instance, i.e.,
          `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
          `create_test_instance` uses the first (or only) dictionary in `params`.
      """
      from sktime.classification.dummy import DummyClassifier
  
      params1 = {"estimator": DummyClassifier()}
      params2 = {
          "estimator": DummyClassifier(),
          "n_samples": 0.5,
          "n_features": 0.5,
      }
      params3 = {
          "estimator": DummyClassifier(),
          "n_samples": 7,
          "n_features": 2,
          "bootstrap": False,
          "bootstrap_features": True,
      }
  
      # force-create a classifier that cannot handle multivariate
      univariate_dummy = DummyClassifier()
      univariate_dummy.set_tags(**{"capability:multivariate": False})
      # this should still result in a multivariate classifier
      params4 = {
          "estimator": univariate_dummy,
          "n_features": 1,
      }
  
      return [params1, params2, params3, params4]
  
file_path: sktime/sktime/classification/ensemble/_bagging.py
imports: from math import ceil
  import numpy
  import pandas
  from sktime.classification.base import BaseClassifier
label_desc: Use image node_id 4 for calling the BaggingClassifier obj's underlying member method code with example usage: obj.get_test_params(cls, parameter_set) and returns: list