a5e0d49ea4234a6692f3504f24d558902f9a91c2,tslearn/datasets.py,UCR_UEA_datasets,load_dataset,#UCR_UEA_datasets#Any#,179
Before Change
if os.path.exists(os.path.join(full_path, fname)):
os.remove(os.path.join(full_path, fname))
extract_from_zip_url(url, target_dir=self._data_dir, verbose=False)
data_train = numpy.loadtxt(os.path.join(full_path, fname_train), delimiter=",")
data_test = numpy.loadtxt(os.path.join(full_path, fname_test), delimiter=",")
X_train = to_time_series_dataset(data_train[:, 1:])
y_train = data_train[:, 0].astype(numpy.int)
X_test = to_time_series_dataset(data_test[:, 1:])
After Change
full_path = os.path.join(self._data_dir, dataset_name)
fname_train = self._filenames.get(dataset_name, dataset_name) + "_TRAIN.txt"
fname_test = self._filenames.get(dataset_name, dataset_name) + "_TEST.txt"
if not os.path.exists(os.path.join(full_path, fname_train)) or \
not os.path.exists(os.path.join(full_path, fname_test)):
url = "http://www.timeseriesclassification.com/Downloads/%s.zip" % dataset_name
for fname in [fname_train, fname_test]:
if os.path.exists(os.path.join(full_path, fname)):
os.remove(os.path.join(full_path, fname))
extract_from_zip_url(url, target_dir=self._data_dir, verbose=False)
try:
data_train = numpy.loadtxt(os.path.join(full_path, fname_train), delimiter=",")
data_test = numpy.loadtxt(os.path.join(full_path, fname_test), delimiter=",")
except:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: rtavenar/tslearn
Commit Name: a5e0d49ea4234a6692f3504f24d558902f9a91c2
Time: 2018-05-21
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/datasets.py
Class Name: UCR_UEA_datasets
Method Name: load_dataset
Project Name: nipy/dipy
Commit Name: 3a07a2952a118adfba640cf6aeb6c63721d79648
Time: 2014-11-19
Author: garyfallidis@gmail.com
File Name: dipy/core/optimize.py
Class Name: Optimizer
Method Name: evolution
Project Name: nipy/dipy
Commit Name: 3d8011f9ce1dba31df7c83f07dcf481a65926aa4
Time: 2014-11-21
Author: garyfallidis@gmail.com
File Name: dipy/core/optimize.py
Class Name: Optimizer
Method Name: evolution
Project Name: tensorflow/datasets
Commit Name: c28a63fa9d9fb9ba3cced7052ea243e8884f9bf1
Time: 2019-11-21
Author: supertux90@googlemail.com
File Name: tensorflow_datasets/image/deep_weeds.py
Class Name: DeepWeeds
Method Name: _generate_examples