8
$\begingroup$

I have a data set of time series data. I'm looking for an annotation (or labeling) tool to visualize it and to be able to interactively add labels on it, in order to get annotated data that I can use for supervised ML.

E.g. the input data is a csv-file and the output is another csv-file of the format timestamp,label.

Therefore I need something like this:

  1. to visualize data
  2. to select a specific area
  3. output the labels with timestamps

As an example:

An example

Building such a tool in python will not take too long, however I was just wondering how other people solve this problem and maybe there are already nice OS tools for doing this. Thank you!

$\endgroup$
  • $\begingroup$ If you're plotting in python, chances are your best bet is to annotate in python, not in the OS. $\endgroup$ – Adrian Keister Sep 13 '18 at 15:56
  • $\begingroup$ @AdrianKeister When I wrote OS, I meant an open source project. $\endgroup$ – mibrl12 Sep 14 '18 at 11:31
  • $\begingroup$ I was about to ask the exactly same question before i found yours. I also need such a tool to annotate data for my thesis. Did you solve the problem yet? I was about to use django and write my own data labeleler. $\endgroup$ – dataddicted Mar 3 '19 at 10:06
  • $\begingroup$ @dataddicted I started writing the tool, however due to the small amount of data, I just labeled it manually and forgot about it for now ^^ please share the link to your github if you start doing it seriously ;) $\endgroup$ – mibrl12 Mar 5 '19 at 16:45
5
$\begingroup$

We had this same problem again and again at Geocene, so we came up with this open-source web app called TRAINSET. You can use TRAINSET to brush labels onto time series data. You import data in a defined CSV format, then label the data, and export a labeled CSV. You can also import a pre-labeled CSV if you're really just trying to refine labels. You can use the hosted version of TRAINSET at https://trainset.geocene.com or you can deploy it yourself by following the readme at https://github.com/geocene/trainset

Brushing and labeling time series data with TRAINSET to create a training set for machine learning.

| improve this answer | |
$\endgroup$
  • $\begingroup$ It is awesome! Thank you for sharing and thank you for even hosting it with an example! $\endgroup$ – mibrl12 Jan 14 at 13:24
2
$\begingroup$

I am currently developing a set of tools to annotate and detect patterns in time series data: https://github.com/avenix/WDK

check the AnnotationApp in 1-Annotation

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank for your answer. However I would prefer a stand alone app, since Matlab is.. well.. Matlab :) $\endgroup$ – mibrl12 Mar 22 '19 at 13:00
  • $\begingroup$ I dont know what you mean with Matlab is... Matlab? Have you found a standalone annotation tool yet? If not, paying a Matlab licence and installing Matlab might be more cost- efficient than building your own tool. $\endgroup$ – Juan Haladjian Mar 25 '19 at 10:12
1
$\begingroup$

I also need such a tool to annotate data but did not found any suitable tool. Therefore, i wrote a small python app by myself, just abused matplotlib for this task.

I used matplotlib.use('TkAgg') and SpanSelector with my own onselect(xmin, xmax) method called for this task. Check this code example: https://matplotlib.org/gallery/widgets/span_selector.html

| improve this answer | |
$\endgroup$
  • $\begingroup$ do you have it available on github? $\endgroup$ – mibrl12 Mar 18 '19 at 13:12
0
$\begingroup$

I'm using axvspan() function from matplotlib.pyplot. Main disadvantage is a difficult configuration of text labels.

import matplotlib.pyplot as plt
import numpy as np
t = np.arange(0,3.14,0.01)
s = np.sin(t)
plt.axvspan(t[12], t[100], facecolor='blue', alpha=0.2)
plt.plot(t,s,color='red')
| improve this answer | |
$\endgroup$
0
$\begingroup$

Nova can do it interactively. https://github.com/hcmlab/nova It's much more powerful than just labeling time-series data, but you can just do labeling with it. Also, I suggest you set the sample rate frequency to 1Hz. Best of Luck.

| improve this answer | |
$\endgroup$
0
$\begingroup$

There is an open source platform for visualization called Grafana, that is a very powerful and flexible software used also for monitoring time series. They support annotation.

Grafana screenshoot for annotation functionality

That tool is pretty powerful and versatile, you can read data from a variety of data sources.

Then once annotated as in the picture, you can query the Grafana annotation database to retrieve all the annotations/labels that you put thanks to the Grafana annotation API.

Bonus tip 1: you can add customised tags on your annotation so that you can get additional info on your data (e.g. anomaly_A, anomaly_B, flat_normal_data).

Bonus tip 2: you can also show only one specific kind of anomaly still in the same platform thanks to this functionality.

Future improvements: extension to this powerful features are in discussion, so that it will be even more easy to annotate in presence of diagrams displaying multiple time series at ones (e.g. anomaly of many time series).

Applications: anomaly detection labelling, medical signal annotation, stock market annotation, etc.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.