class_docstr: A convenience class to access UCR/UEA time series datasets.
  
  When using one (or several) of these datasets in research projects, please
  cite [1]_.
  
  This class will attempt to recover from some known misnamed files, like the
  `StarLightCurves` dataset being provided in `StarlightCurves.zip` and
  alike.
  
  Parameters
  ----------
  use_cache : bool (default: True)
      Whether a cached version of the dataset should be used in
      :meth:`~load_dataset`, if one is found.
      Datasets are always cached upon loading, and this parameter only
      determines whether the cached version shall be refreshed upon loading.
  
  Notes
  -----
      Downloading dataset files can be time-consuming, it is recommended
      using `use_cache=True` (default) in order to only experience
      downloading time once per dataset and work on a cached version of the
      datasets afterward.
  
  See Also
  --------
  CachedDatasets : Provides pre-selected datasets for offline use.
  
  References
  ----------
  .. [1] A. Bagnall, J. Lines, W. Vickers and E. Keogh, The UEA & UCR Time
     Series Classification Repository, www.timeseriesclassification.com
class_docstr_tok: ["A","convenience","class","to","access","UCR\/UEA","time","series","datasets",".","When","using","one","(","or","several",")","of","these","datasets","in","research","projects",",","please","cite","[","1","]","_",".","This","class","will","attempt","to","recover","from","some","known","misnamed","files",",","like","the","`","StarLightCurves","`","dataset","being","provided","in","`","StarlightCurves.zip","`","and","alike",".","Parameters","--","--","--","--","--","use_cache",":","bool","(","default",":","True",")","Whether","a","cached","version","of","the","dataset","should","be","used","in",":","meth",":","`","~load_dataset","`",",","if","one","is","found",".","Datasets","are","always","cached","upon","loading",",","and","this","parameter","only","determines","whether","the","cached","version","shall","be","refreshed","upon","loading",".","Notes","--","--","-","Downloading","dataset","files","can","be","time-consuming",",","it","is","recommended","using","`","use_cache=True","`","(","default",")","in","order","to","only","experience","downloading","time","once","per","dataset","and","work","on","a","cached","version","of","the","datasets","afterward",".","See","Also","--","--","--","--","CachedDatasets",":","Provides","pre-selected","datasets","for","offline","use",".","References","--","--","--","--","--","..","[","1","]","A.","Bagnall",",","J",".","Lines",",","W.","Vickers","and","E.","Keogh",",","The","UEA","&","UCR","Time","Series","Classification","Repository",",","www.timeseriesclassification.com"]
code: def __init__(self, use_cache=True):
      self.use_cache = use_cache
      self._data_dir = os.path.expanduser(
          os.path.join("~", ".tslearn", "datasets", "UCR_UEA")
      )
      os.makedirs(self._data_dir, exist_ok=True)
  
      try:
          url_multivariate = (
              "http://www.timeseriesclassification.com/aeon-toolkit/Archives/"
              "summaryMultivariate.csv"
          )
          self._list_multivariate_filename = os.path.join(
              self._data_dir, os.path.basename(url_multivariate)
          )
          urlretrieve(
              url_multivariate, self._list_multivariate_filename
          )
          url_baseline = "http://www.timeseriesclassification.com/singleTrainTest.csv"
          self._baseline_scores_filename = os.path.join(
              self._data_dir, os.path.basename(url_baseline)
          )
          urlretrieve(url_baseline, self._baseline_scores_filename)
  
          # fix typos in that CSV to match with the name in the download link
          in_file_string_replace(
              self._baseline_scores_filename,
              "CinCECGtorso",
              "CinCECGTorso",
          )
          in_file_string_replace(
              self._baseline_scores_filename,
              "StarlightCurves",
              "StarLightCurves",
          )
      except Exception:
          self._baseline_scores_filename = None
  
      self._ignore_list = ["Data Descriptions"]
      # File names for datasets for which it is not obvious
      # key: from timeseriesclassification.com, value: right dataset name
      self._filenames = {
          "AtrialFibrillation": "AtrialFibrilation",
          "CinCECGtorso": "CinCECGTorso",
          "MixedShapes": "MixedShapesRegularTrain",
          "NonInvasiveFetalECGThorax1": "NonInvasiveFatalECGThorax1",
          "NonInvasiveFetalECGThorax2": "NonInvasiveFatalECGThorax2",
          "StarlightCurves": "StarLightCurves",
      }
  
file_path: tslearn/tslearn/datasets/ucr_uea.py
imports: import os
  import warnings
  import csv
  import shutil
  from urllib.request import urlretrieve
  from tslearn.utils import _load_arff_uea, _load_txt_uea
  from .datasets import in_file_string_replace, extract_from_zip_url
label_desc: Use image node_id 1 to create a new UCR_UEA_datasets object  with example: obj = UCR_UEA_datasets(use_cache)