Skip to content

Commit

Permalink
improve ds tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderVNikitin committed Jun 15, 2024
1 parent b91cf21 commit 3b09e33
Show file tree
Hide file tree
Showing 4 changed files with 305 additions and 59 deletions.
1 change: 0 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ def test_mmd_3_test():
"Coffee",
"ECG200",
"ElectricDevices",
"GunPoint",
"MixedShapesRegularTrain",
"StarLightCurves",
"Wafer"
Expand Down
2 changes: 1 addition & 1 deletion tsgm/utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def get_physionet2012() -> T.Tuple[TensorLike, TensorLike, TensorLike, TensorLik
This function downloads and retrieves the Physionet 2012 dataset, which consists of physiological data
and corresponding outcomes. It returns the training, testing, and validation datasets along with their labels.
:return: A tuple containing the training, testing, and validation datasets along with their labels.
:return: A tuple containing the training, testing, and validation datasets along with their labels. (train_X, train_y, test_X, test_y, val_X, val_y)
:rtype: tuple[TensorLike, TensorLike, TensorLike, TensorLike, TensorLike, TensorLike]
"""
download_physionet2012()
Expand Down
353 changes: 299 additions & 54 deletions tutorials/Datasets.ipynb

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions tutorials/Model Selection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"metadata": {},
"source": [
"## Model selection.\n",
"This is a minimal example of model selection via hyperparameters optimization."
"This is a simple example of model selection through hyperparameter optimization."
]
},
{
Expand Down Expand Up @@ -36,7 +36,9 @@
"id": "0290b339",
"metadata": {},
"source": [
"#### 0. Install optuna"
"#### 0. Install optuna\n",
"\n",
"Let's first install Optuna."
]
},
{
Expand Down Expand Up @@ -66,7 +68,7 @@
"metadata": {},
"source": [
"#### 1. Load data\n",
"We are working with a toy dataset, and use `tsgm` utility called `tsgm.utils.gen_sine_dataset` to generate the data. We define a function that generates the dataset and then featurewise scale it using `tsgm.utils.TSFeatureWiseScaler`, so that each feature is in $[0, 1]$."
"We are using a small dataset generated by the `tsgm.utils.gen_sine_dataset` function. We scale the features using `tsgm.utils.TSFeatureWiseScaler` to ensure each feature falls within the range of $[0, 1]$."
]
},
{
Expand Down

0 comments on commit 3b09e33

Please sign in to comment.