Skip to content

albertofavaro/superintendent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

superintendent

want to semi-supervise your machine learning?

This package is designed to provide a ipywidget-based interactive labelling tool for your data.

It's very much in early early alpha, so don't expect it to work! But if you want to have a go, here's how you would do it:

Installation

pip install superintendent

Usage

from superintendent import SemiSupervisor

example_df = pd.read_csv('https://raw.githubusercontent.com/janfreyberg/superintendent/master/example_test.csv')

print(example_df)
               sentence  sentiment
0     This is terrible.         -1
1        This is great.          1
2           Outrageous!         -1
3  I don't believe you.          1
4               Get out          1
5     I love the anger.         -1

This is a small & silly example dataframe, but as you can see, the labels aren't right (e.g. Get out. is labelled positive). So let's create some new labels.

widget = SemiSupervisor(example_df[['sentence']], example_df[['sentiment']])

widget.annotate()

Once you've clicked through and done all your labelling, you can get your new labels from the widget:

print(widget.new_labels)
  sentiment
0        -1
1         1
2        -1
3        -1
4        -1
5         1

About

want to semi-supervise your machine learning?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 85.6%
  • Jupyter Notebook 14.4%