Sktime: [Question] Time Series Bag of Features (TSBF) is it possible to implement using SKTime ?

Created on 13 Jan 2021  路  2Comments  路  Source: alan-turing-institute/sktime

This is not really a bug, but rather a question

I read about Time Series Bag of Features (TSBF) in the The great time series classification bake off review paper and it seemed to perform as good as Time Series Forest (TSF)
So I was wondering if it could be implemented using the utilities that we have in SKTime right now, maybe using a pipeline or something.

@TonyBagnall , Do you have any suggestions regarding the feasibility of doing so ?

bug

All 2 comments

hmm, well I implemented it in Java in 2014 or so, and it was a bit tricky iirc. It starts off like TSF with added features, but then does some other stuff. I liased with the author but could not recreate results, so it may be buggy. It was much slower than TSF and not more accurate, so we left it as it is and didnt bother porting it over. Possible to do so, but dont think it would add a huge amount of value to sktime.

https://github.com/uea-machine-learning/tsml/blob/master/src/main/java/tsml/classifiers/interval_based/TSBF.java
my comments (written over 5 years ago ....)
PARAMETERS
minimum interval length: wmin=5;
bin size for codebook generation in phase 2: binsize=10
VARIABLES
number of intervals per subseries
numIntervals=(int)((zLevel*seriesLength)/wmin);
number of subseries:
numSub= (seriesLength/wmin)-numIntervals;

  1. Subsequences are sampled and partitioned into intervals for feature extraction.
    number of subseries numSub= floor(m/wmin)-d
    each subseries is of random length ls
    each subseries is split into d segments
    mean, variance and slope is extracted for each segment

For i=1 to number of subsequences
select start and end point s1 and s2
for each time series t in T
generate intervals on t_s1 and t_s2
generate features (mean, std dev and slope) from intervals
add to new features for t

nos of features per sub series=3*d+4
    nos features per series = numSub*(3*d+4)

This forms a new data set that is identical to TSF except for the global features.

  1. "Each subsequence feature set is labeled with the class of the time series and
    each time series forms the bag."
    I think it works by building a random forest on the labelled transformed subseries and use the
    class probability estimates from the forest.
  2. A classifier generates class probability estimates.
  3. Histograms of the class probability estimates are generated (and concatenated) to summarize the subsequence
    information.
  4. Global features are added.
  5. A final classifier is then trained on the new representation to assign each time series.

@TonyBagnall Thank you so much for the explanation and all the details. And of course for the very fast reply.

Well I think in this respect, I must agree it wouldn't make sense to have it implemented as it is no added value.

Was this page helpful?
0 / 5 - 0 ratings