johannfaouzi / pyts

A Python package for time series classification
https://pyts.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.77k stars 165 forks source link

How do you use weasel to classify? #17

Open mugenZebra opened 5 years ago

mugenZebra commented 5 years ago

This is a question. My understanding is Weasel transforms original continuous-valued features to bag of pattern, then how to do classification after the transformation?

johannfaouzi commented 5 years ago

WEASEL extracts features from the set of time series: it will transform a set of continuous-valued time series into a "standard" input X with shape (n_samples, n_features). Each feature corresponds to a tuple (window_size, n_grams). Not every possible tuple (i.e. features) are kepts, but only the most relevant ones (i.e. the ones with a pvalue below a given threshold for an ANOVA test).

Here is an example taken from the documentation.

After the WEASEL transformation, you can use any "standard" classifier to perform classification (logistic regression, SVM, random forest, naive bayes, etc.). You can use Pipeline from scikit-learn with WEASEL as all the estimators in pyts are scikit-learn-compatible.

I hope that it answers your question.

mohataher commented 5 years ago

Hi @johannfaouzi, what's your policy with this repo issues?

Typically I see maintainers allow opening issues for bugs/feature related questions. Any usability questions are asked on Stackoverflow. What do you think?

johannfaouzi commented 5 years ago

Right now I think that having all usability questions as issues is the best for several reasons. The amount of isues is pretty low, which makes it easy to answer them here. Moreover, you need a certain amount of reputation to create a new tag on stackoverflow.

If this project gets much bigger than it is right now, the policy will change in the way you mentioned.