Automate machine learning classification task report for Pak Zuherman
Project description
Classification Reportzr
Automate machine learning classification task report for Pak Zuherman
Install
pip install classification-reportzr
Usage
Setting-up the experiment
from sklearn import datasets
from sklearn.svm import SVC
from classification_reportzr.reporterzr import Reporterzr
digits = datasets.load_digits()
samples, labels = digits.data[:-1], digits.target[:-1]
svc_kwargs = {'C':100.0, 'gamma':0.001}
svc_reporter = Reporterzr(EstimatorClass=SVC, estimator_kwargs=svc_kwargs, samples=samples, labels=labels, random_state=3)
# `test_sizes` defaults to [0.1, ..., 0.9]
svc_reporter.run_experiment(test_sizes=[0.1, 0.2])
Get Accuracy Report
print(svc_reporter.get_accuracy_report())
prints
train_accuracy test_accuracy test_size
0 1.0 0.994444 0.1
1 1.0 0.988889 0.2
Get Classification Report
print(svc_reporter.get_classification_report(test_size=0.1, split='train'))
prints
precision recall f1-score support
0 1.00 1.00 1.00 160
1 1.00 1.00 1.00 164
2 1.00 1.00 1.00 159
3 1.00 1.00 1.00 164
4 1.00 1.00 1.00 163
5 1.00 1.00 1.00 164
6 1.00 1.00 1.00 163
7 1.00 1.00 1.00 161
8 1.00 1.00 1.00 156
9 1.00 1.00 1.00 162
accuracy 1.00 1616
macro avg 1.00 1.00 1.00 1616
weighted avg 1.00 1.00 1.00 1616
Present All Classification Report
svc_reporter.present_all_classification_report()
prints
Test size: 0.1
==================================================
Classification report on train data
precision recall f1-score support
0 1.00 1.00 1.00 160
1 1.00 1.00 1.00 164
2 1.00 1.00 1.00 159
3 1.00 1.00 1.00 164
4 1.00 1.00 1.00 163
5 1.00 1.00 1.00 164
6 1.00 1.00 1.00 163
7 1.00 1.00 1.00 161
8 1.00 1.00 1.00 156
9 1.00 1.00 1.00 162
accuracy 1.00 1616
macro avg 1.00 1.00 1.00 1616
weighted avg 1.00 1.00 1.00 1616
==================================================
Classification report on test data
precision recall f1-score support
0 1.00 1.00 1.00 18
1 1.00 1.00 1.00 18
2 1.00 1.00 1.00 18
3 1.00 1.00 1.00 19
4 1.00 1.00 1.00 18
5 1.00 0.94 0.97 18
6 1.00 1.00 1.00 18
7 1.00 1.00 1.00 18
8 1.00 1.00 1.00 17
9 0.95 1.00 0.97 18
accuracy 0.99 180
macro avg 0.99 0.99 0.99 180
weighted avg 0.99 0.99 0.99 180
==================================================
==================================================
Test size: 0.2
==================================================
Classification report on train data
precision recall f1-score support
0 1.00 1.00 1.00 142
1 1.00 1.00 1.00 145
2 1.00 1.00 1.00 142
3 1.00 1.00 1.00 146
4 1.00 1.00 1.00 145
5 1.00 1.00 1.00 146
6 1.00 1.00 1.00 145
7 1.00 1.00 1.00 143
8 1.00 1.00 1.00 138
9 1.00 1.00 1.00 144
accuracy 1.00 1436
macro avg 1.00 1.00 1.00 1436
weighted avg 1.00 1.00 1.00 1436
==================================================
Classification report on test data
precision recall f1-score support
0 1.00 1.00 1.00 36
1 1.00 1.00 1.00 37
2 1.00 1.00 1.00 35
3 1.00 0.97 0.99 37
4 1.00 1.00 1.00 36
5 0.97 0.94 0.96 36
6 1.00 1.00 1.00 36
7 1.00 1.00 1.00 36
8 1.00 1.00 1.00 35
9 0.92 0.97 0.95 36
accuracy 0.99 360
macro avg 0.99 0.99 0.99 360
weighted avg 0.99 0.99 0.99 360
==================================================
==================================================
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
Close
Hashes for classification-reportzr-0.0.1b2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48bd5c5ea01c1dcb85fd6645195115e5b8b6cdd95b09787e847d894987831597 |
|
MD5 | a8eb14842ff15c681befb7653005fd2e |
|
BLAKE2b-256 | 7605ba01445d347bf8d4dc7a545d3fcb22028a3736e1deb092864e64a7b9616c |
Close
Hashes for classification_reportzr-0.0.1b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c2b1226c32a7b457a6bd9417b5c89dd572e3eb3a4d56e59870dfdc3063e7a4f |
|
MD5 | 623fac1283f734b3cee39681807cb4ab |
|
BLAKE2b-256 | ecafddd5259ecac5df46cca5fc207ea773bf9db731c483037e73201feb10b3fc |