Why

Tagging a dataset is done to create a set of training examples for text classification problems.

Our goal in the tagging process is to attach a label to as many training examples as possible.

Terminology

Loading Data

The first step in the process is to load the sample data that you want to tag into a squirro project. 

There is only one field that matters at the time of data loading, which is the abstract. 

The abstract field is used by the widget as the input text which the label gets attached to.

For best results, the length of the examples to be labeled should be kept as short as possible, with the ideal length being 1-2 sentences. In most cases, this set of examples is created by splitting up larger documents into multiple examples, such as by using a pipelet to split on sentences or paragraphs. 

Once added, the data set should look roughly like this:

Note: In order to work as expected, the contents of the abstract and body of each item should be the same.

Setting up a training and inference job


Getting and Installing the widget

The widget for tagging datasets can be found here: https://github.com/squirro/delivery/tree/master/dashboard/widgets/dataset-tagging

and is added to a project as a custom widget. Details on how to upload a custom widget can be found here: squirro_asset Command Line Reference#Dashboardwidgets

Configuring the Widget

With data loaded into the project, we can move to setting up the widget and starting to tag examples.

The data labeling widget takes a few config options:

If training and inference jobs are already set up, you will see the prediction strength for each class for each example in the project (the darker a class shows up, the more strongly the model predicts that label). At this point, you are ready to start labeling examples and training the model.

Usage

It is typically easiest to use the search bar to find good examples to tag first. Any type of search can be used along with the data labeling widget, so there are lots of clever ways of finding good examples for each class to start with. Such as:

In general, if you want to tag the examples that will have the greatest overall improvement in the quality of the model, you should look for examples where either: