Skip to content

Commit

Permalink
aeon
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickzib committed May 8, 2023
1 parent 73be897 commit 63633ee
Show file tree
Hide file tree
Showing 2 changed files with 173 additions and 40 deletions.
54 changes: 43 additions & 11 deletions notebooks/classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,25 @@
{
"cell_type": "markdown",
"id": "554f23a6",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"# Univariate time series classification with WEASEL 2.0\n",
"\n",
"WEASEL 2.0 is build upon the sktime/sklearn-APIs."
"WEASEL 2.0 is build upon the aeon/sklearn-APIs."
]
},
{
"cell_type": "markdown",
"id": "4abb5608",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"First, we import the requires libraries"
]
Expand All @@ -22,19 +30,27 @@
"cell_type": "code",
"execution_count": 4,
"id": "323d16ec",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"import time\n",
"import numpy as np\n",
"from sktime.datasets import load_arrow_head\n",
"from aeon.datasets import load_arrow_head\n",
"from weasel.classification.dictionary_based import WEASEL_V2"
]
},
{
"cell_type": "markdown",
"id": "3dea8779",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"Next, we load the arrow-head dataset"
]
Expand All @@ -43,7 +59,11 @@
"cell_type": "code",
"execution_count": 2,
"id": "307b08a3",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": [
"X_train, y_train = load_arrow_head(split=\"train\", return_type=\"numpy3d\")\n",
Expand All @@ -53,7 +73,11 @@
{
"cell_type": "markdown",
"id": "e39e62b0",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"Finally, we fit a WEASEL 2.0 model and do some predictions"
]
Expand All @@ -62,7 +86,11 @@
"cell_type": "code",
"execution_count": 3,
"id": "e7b739ac",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -97,7 +125,11 @@
"cell_type": "code",
"execution_count": null,
"id": "7fd7c935",
"metadata": {},
"metadata": {
"pycharm": {
"name": "#%%\n"
}
},
"outputs": [],
"source": []
}
Expand All @@ -123,4 +155,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
Loading

0 comments on commit 63633ee

Please sign in to comment.