7eda0ba9f842e7b125f397182abd513d5d22b17d,tslearn/datasets.py,UCR_UEA_datasets,load_dataset,#UCR_UEA_datasets#Any#,166
Before Change
full_path = os.path.join(self._data_dir, dataset_name)
if os.path.isdir(full_path) and dataset_name not in self._ignore_list:
if os.path.exists(os.path.join(full_path, self._filenames.get(dataset_name, dataset_name) + "_TRAIN.txt")):
fname_train = self._filenames.get(dataset_name, dataset_name) + "_TRAIN.txt"
fname_test = self._filenames.get(dataset_name, dataset_name) + "_TEST.txt"
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:])
y_test = data_test[:, 0].astype(numpy.int)
return X_train, y_train, X_test, y_test
return None, None, None, None
class CachedDatasets(object):
After Change
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)
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:])
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: rtavenar/tslearn
Commit Name: 7eda0ba9f842e7b125f397182abd513d5d22b17d
Time: 2018-04-21
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/datasets.py
Class Name: UCR_UEA_datasets
Method Name: load_dataset
Project Name: ray-project/ray
Commit Name: 4cef1ee591648f289a4e6f00d70e03625e252594
Time: 2020-06-01
Author: xmo@berkeley.edu
File Name: python/ray/serve/router.py
Class Name: Router
Method Name: remove_worker
Project Name: biolab/orange3
Commit Name: fc5caa1e1d716607f1f5c4e0b0be265c23280fa0
Time: 2016-09-21
Author: tankovesna@hotmail.com
File Name: Orange/widgets/data/owrank.py
Class Name: OWRank
Method Name: measuresSelectionChanged
Project Name: facebookresearch/ParlAI
Commit Name: 9ad1d2da68aa4acf817562502340bf319276b283
Time: 2019-05-14
Author: jju@fb.com
File Name: parlai/mturk/core/dev/socket_manager.py
Class Name: SocketManager
Method Name: close_channel