Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a href='https://github.com/WenjieDu/TSDB'><img src="https://raw.githubusercontent.com/PyPOTS/pypots.github.io/main/static/figs/pypots_logos/TSDB_logo_FFBG.svg?sanitize=truee" align='right' width='235'/></a>
<a href='https://github.com/WenjieDu/TSDB'><img src="https://pypots.com/figs/pypots_logos/TSDB_logo_FFBG.svg?sanitize=truee" align='right' width='235'/></a>

# <p align='center'>Welcome to TSDB</p>
**<p align='center'>A Python Toolbox to Ease Loading Open-Source Time-Series Datasets</p>**
Expand All @@ -23,16 +23,16 @@
<img alt='Coveralls report' src='https://img.shields.io/coverallsCoverage/github/WenjieDu/TSDB?branch=main&logo=coveralls&color=75C1C4&label=Coverage'>
</a>
<a href="https://anaconda.org/conda-forge/tsdb">
<img alt="Conda downloads" src="https://img.shields.io/conda/dn/conda-forge/tsdb?label=Conda%20Downloads&color=AED0ED&logo=anaconda&logoColor=white">
<img alt="Conda downloads" src="https://img.shields.io/endpoint?url=https://pypots.com/figs/downloads_badges/conda_tsdb_downloads.json">
</a>
<a href='https://pepy.tech/project/tsdb'>
<img alt='PyPI download number' src='https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FWenjieDu%2FWenjieDu%2Fmain%2Ffigs%2Fprojects%2Ftsdb_downloads.json'>
<img alt='PyPI downloads' src='https://img.shields.io/endpoint?url=https://pypots.com/figs/downloads_badges/pypi_tsdb_downloads.json'>
</a>
</p>

> 📣 TSDB now supports a total of 1️⃣6️⃣8️⃣ time-series datasets ‼️

<a href='https://github.com/WenjieDu/PyPOTS'><img src='https://raw.githubusercontent.com/PyPOTS/pypots.github.io/main/static/figs/pypots_logos/PyPOTS_logo_FFBG.svg?sanitize=true' width='160' align='left' /></a>
<a href='https://github.com/WenjieDu/PyPOTS'><img src='https://pypots.com/figs/pypots_logos/PyPOTS_logo_FFBG.svg?sanitize=true' width='160' align='left' /></a>
TSDB is a part of [PyPOTS project](https://github.com/WenjieDu/PyPOTS) (a Python toolbox for data mining on Partially-Observed Time Series), and was separated from PyPOTS for decoupling datasets from learning algorithms.

TSDB is created to help researchers and engineers get rid of data collecting and downloading, and focus back on data processing details. TSDB provides all-in-one-stop convenience for downloading and loading open-source time-series datasets (available datasets listed [below](https://github.com/WenjieDu/TSDB#-list-of-available-datasets)).
Expand Down
19 changes: 19 additions & 0 deletions tsdb/data_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,25 @@ def delete_cached_data(dataset_name=None):
purge_given_path(dir_to_delete)


def load(dataset_name, use_cache=True):
"""Load dataset with given name. Work the same with the func `load_dataset()` but with a short name.

Parameters
----------
dataset_name : str,
The name of the specific dataset in database.DATABASE.

use_cache : bool,
Whether to use cache (including data downloading and processing)

Returns
-------
pandas.DataFrame,
Loaded dataset.
"""
return load_dataset(dataset_name, use_cache)


def load_dataset(dataset_name, use_cache=True):
"""Load dataset with given name.

Expand Down
4 changes: 2 additions & 2 deletions tsdb/loading_funcs/ucr_uea_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def load_ucr_uea_dataset(local_path, dataset_name):

data = {
"X_train": X_train,
"y_train": y_train,
"y_train": y_train.astype(float),
"X_test": X_test,
"y_test": y_test,
"y_test": y_test.astype(float),
}

return data
Expand Down