Shapelet Pattern Classifier
Install and import#
npm install fintech-algorithmsimport { classify } from "fintech-algorithms/geometric-chart-patterns/pattern-matching/shapelet-pattern-classifier";Signature#
classify()Worked example#
executed This entry is a thin wrapper its test never calls directly, so it was invoked with the arguments its shared implementation received. Real output, not asserted against a published figure.
Input#
[99.870299, 100.065403, 100.108942, 100.094882, 100.306776, 100.33253]Showing 6 of 48 elements.
[0, 1, 3, 6, 8, 6]Showing 6 of 10 elements.
0.6024320464983021Call#
classify()Returns#
object with 6 fields: distance, best_start, profile, threshold, matched, predicted_label
{
"distance": 8.81773713357542e-15,
"best_start": 20,
"profile": [
4.4429515304009595,
4.021249553691412,
3.1883762365539186,
2.4542268418798887,
2.742051350159151,
2.8389981766588135
],
"threshold": 0.6024320464983021,
"matched": true,
"predicted_label": true
}Other exports#
This module also exports
train, distance. Every module additionally exports run as an alias of its
primary function, and a meta object carrying its catalog id, domain, family,
shape and article URL.
Diagrams#
How it works#
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References#
- Foundations of Technical Analysis — Andrew W. Lo, Harry Mamaysky, and Jiang Wang
- SciPy `find_peaks` — SciPy project
- The Probability of Backtest Overfitting — David H. Bailey, Jonathan M. Borwein, Marcos López de Prado, and Qiji Jim Zhu
- Time Series Shapelets: A New Primitive for Data Mining — Lexiang Ye and Eamonn Keogh
- Applicability decision