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 explaboxpip3 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.readthedocs.io.
Metadata
Release files for explabox-demo-drugreview 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| explabox_demo_drugreview-1.0.0.tar.gz | 414.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| explabox_demo_drugreview-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 826.7 kB
Release files / explabox_demo_drugreview-1.0.0.tar.gz
| Download URL | explabox_demo_drugreview-1.0.0.tar.gz |
|---|---|
| Size | 414.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba4049dffc6f75c5c86974595923ed358eba5e25bededdee721e15d0552b52bc
|
|
BLAKE2b-256 checksum How to use checksums |
7a0ff529dd7918428f92f26a71265f6d24883f52084bb6898281f6ed3b519a51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.2
|
Release files / explabox_demo_drugreview-1.0.0-py3-none-any.whl
| Download URL | explabox_demo_drugreview-1.0.0-py3-none-any.whl |
|---|---|
| Size | 412.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cddd58c4af3b9f247f94f328f2b61958da9ceecdbeaf59d38b2de7ebe7edf328
|
|
BLAKE2b-256 checksum How to use checksums |
aaa6e43cfbea8a6add6b42fc1a9a72797bf9ecd7464e832944192f633fb29002
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.2
|