Explabox demo for the UCI drug reviews dataset
Project description
explabox-demo-drugreview
Welcome to the demo of the explabox on the UCI Drug Reviews dataset. To speed up the demo, we made a smaller subset of the train and test dataset. The demo
also includes a pretrained black-box classifier, which aims to predict whether a review
in the text got a rating
of
negative
(1-5), neutral
(5-6) or positive
(6-10).
To start the demo, you require:
- Python 3.8 or above (see the installation guide)
- Jupyter Notebook installed (see the installation guide)
Install the demo via:
pip3 install explabox
pip3 install explabox-demo-drugreview
Importing the necessary files
To start the demo, open your Jupyter Notebook and run the following line:
from explabox_demo_drugreview import model, dataset_file
The dataset_file
is the location of the dataset (drugsCom.zip
), containing a train split (drugsComTrain.tsv
) and test split (drugsComTest.tsv
). You can import this dataset with the explabox with the data in the column review
and labels in the column rating
:
from explabox import import_data
data = import_data(dataset_file, data_cols='review', label_cols='rating')
The model can directly be imported as-is. Make sure you explicitly include that drugsComTrain.tsv
includes the train
split and drugsComTest.tsv
the test
split of the data:
from explabox import Explabox
box = Explabox(data=data,
model=model,
splits={'train': 'drugsComTrain.tsv', 'test': 'drugsComTest.tsv'})
Now you are ready to .explore
, .examine
, .expose
and .explain
with the explabox!
Documentation
Having trouble? Want to know which functionalities the explabox includes? Check out the documentation at https://explabox.rtfd.io.
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
Built Distribution
Hashes for explabox-demo-drugreview-0.9b12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fbcf0b8b964225dc6da13c87553e0f75e1c674bc2a080595e6d337d2e526fc2 |
|
MD5 | 4c11ce3ddd3501c403c6acb4750853c6 |
|
BLAKE2b-256 | 0dbb13c1e8564612ee73737e9f84bb3a5fe930d02e785d41a0ef795a7adfca4c |
Hashes for explabox_demo_drugreview-0.9b12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f684318386c462f807c557ad9ac28946189a0e90ad2c5e1233f3e6823a1978f3 |
|
MD5 | 62ea01a2e93f887e28123c92df2b39c5 |
|
BLAKE2b-256 | 7a896fcf56c9addbd80f15ee47cf6324b7e8e5291706b7e1e6b8d72464fe38a6 |