benfulcher / hctsa

Highly comparative time-series analysis

Home Page:https://time-series-features.gitbook.io/hctsa-manual/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple group assignment TS_LabelGroups

AvisP opened this issue · comments

commented

I am getting an error when I am trying to do multiple group assignment. I have assigned two set of labels to each timeSeriesdata. I have a total of 160 timeseries with 96 of them with a label of 'dir' and 64 with label of 'undir'. The same dataset also has 40 separate labels of 'a','b''c','d'. I want to take out the time series that has 'dir' and 'a'. But it is giving the following error

Error using TS_LabelGroups (line 138)
24 time series have multiple group assignments:

I used the code groupindices_songtype = TS_LabelGroups('HCTSA_blkorng_new_syllable.mat',{'dir','a'}); and have uploaded the hctsa file here

Kindly suggest how to approach this issue.

Hi @AvisP, thanks for your question and interest in our software. Looks like a fun dataset.
TS_LabelGroups assumes that you can uniquely label all data in the datafile according to the keywords provided. In this case, not all data have a keyword that is either 'dir' or 'a' so you get the error (and it seems like some have both 'dir' and 'a' so it doesn't know what to do for these).
A solution is to first use TS_FilterData to generate a new HCTSA file that only includes the relevant time series you're interested in (you can use TS_GetIDs to feed the IDs of time series you want to keep into this function) and then do your group labeling using TS_LabelGroups on this new data subset.
Good luck!