WhiteBox Utilities Toolkit: Tools to make your life easier
Fancy data functions that will make your life as a data scientist easier.
Installing
To install this library in your Python environment:
pip install whiteboxml
Documentation
Metrics
Classification
- ROC curve / AUC:
import numpy as np
from whiteboxml.modeling.metrics import plot_roc_auc_binary
y_pred = np.random.normal(0, 1, 1000)
y_true = np.random.choice([0, 1], 1000)
ax, fpr, tpr, thr, auc_score = plot_roc_auc_binary(y_pred=y_pred, y_true=y_true, figsize=(8, 8))
ax.get_figure().savefig('roc_curve.png')
- Confusion Matrix:
import numpy as np
from whiteboxml.modeling.metrics import plot_confusion_matrix
y_true = np.random.choice([0, 1, 2, 3], 10000)
y_pred = np.random.choice([0, 1, 2, 3], 10000)
ax, matrix = plot_confusion_matrix(y_pred=y_pred, y_true=y_true,
class_labels=['a', 'b', 'c', 'd'])
ax.get_figure().savefig('confusion_matrix.png')
- Optimal Threshold:
import numpy as np
from whiteboxml.modeling.metrics import get_optimal_thr
y_pred_proba = np.random.normal(0, 1, (100, 1))
y_true = np.random.choice([0, 1], (100, 1))
thr = get_optimal_thr(y_pred=y_pred_proba, y_true=y_true)
Release files for whiteboxml 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| whiteboxml-0.0.4.tar.gz | 16.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| whiteboxml-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.3 kB
Release files / whiteboxml-0.0.4.tar.gz
| Download URL | whiteboxml-0.0.4.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5927b8d202a4ea7db2834cd04b626535f29861dc7165e03b6987853c40256e85
|
|
BLAKE2b-256 checksum How to use checksums |
bbfca225ab73313507de0c60590c28bd5f451da0379691997d289fe4a2f1e015
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / whiteboxml-0.0.4-py3-none-any.whl
| Download URL | whiteboxml-0.0.4-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfa62cb20cd5845623581cfa70d68fe9f62722b1ab9949af15fb1057d1c5c1c4
|
|
BLAKE2b-256 checksum How to use checksums |
08281024ca33d635d2ff14fcbc1d462f0114707176e27f7b66d218ff5a9ce387
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|