class_docstr: The Elastic Ensemble (EE).
  
  EE as described in [1].
  
  Overview:
  
  - Input n series length m
  - EE is an ensemble of elastic nearest neighbor classifiers
  
  Parameters
  ----------
  distance_measures : list of strings, optional (default="all")
    A list of strings identifying which distance measures to include. Valid values
    are one or more of: euclidean, dtw, wdtw, ddtw, dwdtw, lcss, erp, msm
  proportion_of_param_options : float, optional (default=1)
    The proportion of the parameter grid space to search optional.
  proportion_train_in_param_finding : float, optional (default=1)
    The proportion of the train set to use in the parameter search optional.
  proportion_train_for_test : float, optional (default=1)
    The proportion of the train set to use in classifying new cases optional.
  n_jobs : int, optional (default=1)
    The number of jobs to run in parallel for both `fit` and `predict`.
    ``-1`` means using all processors.
  random_state : int, default=0
    The random seed.
  verbose : int, default=0
    If ``>0``, then prints out debug information.
  
  Attributes
  ----------
  estimators_ : list
    A list storing all classifiers
  train_accs_by_classifier : ndarray
    Store the train accuracies of the classifiers
  
  Notes
  -----
  ..[1] Jason Lines and Anthony Bagnall,
        "Time Series Classification with Ensembles of Elastic Distance Measures",
            Data Mining and Knowledge Discovery, 29(3), 2015.
  https://link.springer.com/article/10.1007/s10618-014-0361-2
  
  Examples
  --------
  >>> from sktime.classification.distance_based import ElasticEnsemble
  >>> from sktime.datasets import load_unit_test  # doctest: +SKIP
  >>> X_train, y_train = load_unit_test(split="train")  # doctest: +SKIP
  >>> X_test, y_test = load_unit_test(split="test")  # doctest: +SKIP
  >>> clf = ElasticEnsemble(
  ...     proportion_of_param_options=0.1,
  ...     proportion_train_for_test=0.1,
  ...     distance_measures = ["dtw","ddtw"],
  ...     majority_vote=True,
  ... )  # doctest: +SKIP
  >>> clf.fit(X_train, y_train)  # doctest: +SKIP
  ElasticEnsemble(...)
  >>> y_pred = clf.predict(X_test)  # doctest: +SKIP
class_docstr_tok: ["The","Elastic","Ensemble","(","EE",")",".","EE","as","described","in","[","1","]",".","Overview",":","-","Input","n","series","length","m","-","EE","is","an","ensemble","of","elastic","nearest","neighbor","classifiers","Parameters","--","--","--","--","--","distance_measures",":","list","of","strings",",","optional","(","default=","''","all","''",")","A","list","of","strings","identifying","which","distance","measures","to","include",".","Valid","values","are","one","or","more","of",":","euclidean",",","dtw",",","wdtw",",","ddtw",",","dwdtw",",","lcss",",","erp",",","msm","proportion_of_param_options",":","float",",","optional","(","default=1",")","The","proportion","of","the","parameter","grid","space","to","search","optional",".","proportion_train_in_param_finding",":","float",",","optional","(","default=1",")","The","proportion","of","the","train","set","to","use","in","the","parameter","search","optional",".","proportion_train_for_test",":","float",",","optional","(","default=1",")","The","proportion","of","the","train","set","to","use","in","classifying","new","cases","optional",".","n_jobs",":","int",",","optional","(","default=1",")","The","number","of","jobs","to","run","in","parallel","for","both","`","fit","`","and","`","predict","`",".","``","-1","``","means","using","all","processors",".","random_state",":","int",",","default=0","The","random","seed",".","verbose",":","int",",","default=0","If","``",">","0","``",",","then","prints","out","debug","information",".","Attributes","--","--","--","--","--","estimators_",":","list","A","list","storing","all","classifiers","train_accs_by_classifier",":","ndarray","Store","the","train","accuracies","of","the","classifiers","Notes","--","--","-","..","[","1","]","Jason","Lines","and","Anthony","Bagnall",",","``","Time","Series","Classification","with","Ensembles","of","Elastic","Distance","Measures","''",",","Data","Mining","and","Knowledge","Discovery",",","29","(","3",")",",","2015.","https",":","\/\/link.springer.com\/article\/10.1007\/s10618-014-0361-2","Examples","--","--","--","--",">",">",">","from","sktime.classification.distance_based","import","ElasticEnsemble",">",">",">","from","sktime.datasets","import","load_unit_test","#","doctest",":","+SKIP",">",">",">","X_train",",","y_train","=","load_unit_test","(","split=","''","train","''",")","#","doctest",":","+SKIP",">",">",">","X_test",",","y_test","=","load_unit_test","(","split=","''","test","''",")","#","doctest",":","+SKIP",">",">",">","clf","=","ElasticEnsemble","(","...","proportion_of_param_options=0.1",",","...","proportion_train_for_test=0.1",",","...","distance_measures","=","[","``","dtw","''",",","''","ddtw","''","]",",","...","majority_vote=True",",","...",")","#","doctest",":","+SKIP",">",">",">","clf.fit","(","X_train",",","y_train",")","#","doctest",":","+SKIP","ElasticEnsemble","(","...",")",">",">",">","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`.
      """
      if parameter_set == "results_comparison":
          return {
              "proportion_of_param_options": 0.1,
              "proportion_train_for_test": 0.1,
              "majority_vote": True,
              "distance_measures": ["dtw", "ddtw", "wdtw"],
          }
      else:
          return {
              "proportion_of_param_options": 0.01,
              "proportion_train_for_test": 0.1,
              "majority_vote": True,
              "distance_measures": ["dtw"],
          }
  
file_path: sktime/sktime/classification/distance_based/_elastic_ensemble.py
imports: import time
  from itertools import product
  import numpy
  import pandas
  from sklearn.metrics import accuracy_score
  from sklearn.model_selection import GridSearchCV, LeaveOneOut, RandomizedSearchCV, StratifiedShuffleSplit, cross_val_predict
  from sktime.classification.base import BaseClassifier
  from sktime.classification.distance_based._time_series_neighbors import KNeighborsTimeSeriesClassifier
  from sktime.datatypes._panel._convert import from_nested_to_3d_numpy
  from sktime.transformations.panel.summarize import DerivativeSlopeTransformer
label_desc: Use image node_id 7 for calling the ElasticEnsemble obj's underlying member method code with example usage: obj.get_test_params(cls, parameter_set) and returns: dict, dict