No project description provided
Project description
# superintendent
![](logo.png)
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
```python
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.
```python
widget = SemiSupervisor(example_df[['sentence']], example_df[['sentiment']])
widget.annotate()
```
![](screenshot.png)
Once you've clicked through and done all your labelling, you can get your new
labels from the widget:
```python
print(widget.new_labels)
```
```
sentiment
0 -1
1 1
2 -1
3 -1
4 -1
5 1
```
![](logo.png)
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
```python
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.
```python
widget = SemiSupervisor(example_df[['sentence']], example_df[['sentiment']])
widget.annotate()
```
![](screenshot.png)
Once you've clicked through and done all your labelling, you can get your new
labels from the widget:
```python
print(widget.new_labels)
```
```
sentiment
0 -1
1 1
2 -1
3 -1
4 -1
5 1
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
superintendent-0.0.1.tar.gz
(5.2 kB
view hashes)