time series dataset labeling around positive instance

wessel
wessel New Altair Community Member
edited November 5 in Community Q&A
Hello,

I have an animal dataset which contains a time series.
At some point in time an animal is flagged ill.
But an animal is also ill before and after this time point.

What filter can I use to add a positive label to instances before and after time points flagged ill?

Regards,

Wessel

Answers

  • TobiasMalbrecht
    TobiasMalbrecht New Altair Community Member
    Hello Wessel,

    well, this one is not trival though. Is the flag indicating illness a nominal attribute?

    A first (potentially working ;-)) solution to that problem might be to define the illness incident as a peak of a time series (e.g. by marking that point as 1 in contrast to a series of zeros) and to extract the index of that peak using the series extension. You could then define this index as a macro and use this one to set the illness flag using the [tt]Set Data[/tt] operator around that index.

    A second solution should be to write a script to extract the same index and to set illness flag of the examples around that index.

    Hope that gives you a hint,
    Tobias