Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Classification notebook tidy #698

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
299 changes: 174 additions & 125 deletions examples/classification/classification.ipynb

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletions examples/classification/deep_learning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Deep learning based time series classification in aeon\n",
"# Deep learning time series classification (TSC)\n",
"\n",
"There are a range of deep learning based classification algorithms in the toolkit.\n",
"There are a range of deep learning classification algorithms in the toolkit.\n",
"The networks that are common to classification, regression and clustering are in the\n",
"`networks` module. Our deep learning classifiers are based those used in deep\n",
"`networks` module. Our deep learning classifiers are based on those used in deep\n",
"learning bake off [1] and recent experimentation [2]. [3] provides an extensive recent\n",
"review of related deep learning work.\n",
"review of related deep learning work."
Expand Down Expand Up @@ -110,23 +110,22 @@
{
"cell_type": "markdown",
"source": [
"### Classifier Details\n",
"### InceptionTime and ResNet\n",
"\n",
"The deep learning bake off [1] found that the Residual Network (ResNet) was the best\n",
"performing architecture for TSC. ResNet has the following network structure.\n",
"\n",
"performing architecture for TSC. The aeon `ResNetClassifier` has the following network structure.\n",
"\n",
"<img src=\"./img/resnet.png\" width=\"600\" alt=\"ROCKET.\">\n",
"\n",
"The InceptionTime deep learning algorithm Subsequent to [1],\n",
"InceptionTime is an ensemble of five SingleInceptionTime deep learning\n",
"The Inception Time deep learning algorithm was proposed after this bakeof.,\n",
"The aeon `InceptionTimeClassifier` is an ensemble of five `SingleInceptionTime` deep learning\n",
"classifiers. Each base classifier shares the same architecture based on\n",
"Inception modules. Diversity is achieved through randomly intialising weights.\n",
"A SingleInceptionTimeClassifier has the following structure.\n",
"A `SingleInceptionTimeClassifier` consists of Inception modules.\n",
"\n",
"<img src=\"./img/inception_module.png\" width=\"600\" alt=\"ROCKET.\">\n",
"\n",
"A SingleInceptionTimeClassifier is structured as follows.\n",
"A `SingleInceptionTimeClassifier` is structured as follows.\n",
"\n",
"<img src=\"./img/inception.png\" width=\"600\" alt=\"ROCKET.\">"
],
Expand Down
88 changes: 40 additions & 48 deletions examples/classification/distance_based.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/classification/early_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"cell_type": "markdown",
"source": [
"# Early time series classification with aeon\n",
"# Early time series classification (TSC)\n",
"\n",
"Early time series classification (eTSC) is the problem of classifying a time series after as few measurements as possible with the highest possible accuracy. The most critical issue of any eTSC method is to decide when enough data of a time series has been seen to take a decision: Waiting for more data points usually makes the classification problem easier but delays the time in which a classification is made; in contrast, earlier classification has to cope with less input data, often leading to inferior accuracy.\n",
"\n",
Expand Down
9 changes: 4 additions & 5 deletions examples/classification/feature_based.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"collapsed": false
},
"source": [
"\n",
"# Feature based time series classification in aeon\n",
"# Feature based time series classification (TSC)\n",
"\n",
"Feature based classifiers are a popular recent theme in TSC. The feature\n",
"based classifiers we provide are simply pipelines of transform and classifier. They\n",
Expand Down Expand Up @@ -348,20 +347,20 @@
"source": [
"## References\n",
"\n",
"[1]htsc repo https://github.com/benfulcher/hctsa\n",
"[1] htsc repo https://github.com/benfulcher/hctsa\n",
"\n",
"[2] Christ, et al. (2018) \"Time series feature extraction on basis of scalable\n",
"hypothesis tests (tsfresh–a python package).\" Neurocomputing 307: 72-77.\n",
" https://www.sciencedirect.com/science/article/pii/S0925231218304843\n",
"\n",
" \n",
"[3] Midddlehurst and Bagnall (2022) \"The FreshPRINCE: A Simple Transformation Based\n",
"Pipeline Time Series Classifier\" https://arxiv.org/abs/2201.12048\n",
"\n",
"[4] Rodriguez et al. (2006) \"Rotation Forest: A New Classifier Ensemble Method\" IEEE\n",
"Transactions on Pattern Analysis and Machine Intelligence, 28(10): 1619--1630.\n",
"\n",
"[5] Morrill et al. (2020) \"A generalised signature method for multivariate time series\n",
"feature extraction\" https://arxiv.org/abs/2006.00873\n"
"feature extraction\" https://arxiv.org/abs/2006.00873"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion examples/classification/hybrid.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Hybrid time series classification in aeon\n",
"# Hybrid time series classification (TSC)\n",
"\n",
"The nature of the data and the problem dictate which category of algorithm is most appropriate. The most accurate algorithms on average, with no apriori knowledge of the best approach, combine multiple transformation types in a hybrid algorithm. We define a hybrid algorithm as one which by design encompasses or ensembles multiple of the discriminatory representations we have previously described. Some algorithms will naturally include multiple transformation characteristics, but are not classified as hybrid approaches. For example, many interval approaches extract unsupervised summary statistics from the intervals they select, but as the focus of the algorithm is on generating features from intervals we would not consider it a hybrid.\n"
]
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion examples/classification/interval_based.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Interval based time series classification in aeon\n",
"# Interval based time series classification (TSC)\n",
"\n",
"Interval based approaches look at phase dependant intervals of the full series, calculating summary statistics from selected subseries to be used in classification.\n",
"\n",
Expand Down
8 changes: 6 additions & 2 deletions examples/classification/shapelet_based.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
{
"cell_type": "markdown",
"source": [
"# Shapelet based time series machine learning\n",
"# Shapelet based time series classification (TSC)\n",
"\n",
"Shapelets a subsections of times series taken from the train data that are a useful for time series machine learning. They were first proposed ia primitive for machine learning [1][2] and were embedded in a decision tree for classification. The Shapelet Transform Classifier (STC)[3,4] is a pipeline classifier which searches the training data for shapelets, transforms series to vectors of distances to a filtered set of selected shapelets based on information gain, then builds a classifier on the latter.\n",
"Shapelets are subseries of times series taken from the train data that are useful for time series machine learning. They were first proposed as a primitive for machine learning [1][2] and were embedded in a decision tree for classification. \n",
"\n",
"<img src=\"./img/shapelet.png\" width=\"800\" alt=\"Shapelets.\">\n",
"\n",
"The Shapelet Transform Classifier (STC) [3,4] is a pipeline classifier which searches the training data for shapelets, transforms series to vectors of distances to a filtered set of selected shapelets based on information gain, then builds a classifier on the latter.\n",
"\n",
"Finding shapelets involves selecting and evaluating shapelets. The original shapelet tree and STC performed a full enumeration of all possible shapelets before keeping the best ones. This is computationally inefficient, and modern shapelet based machine learning algorithms randomise the search."
],
Expand Down
Binary file removed examples/img/tsc.png
Binary file not shown.
Loading