Useful utility functions for evaluation of ML
Project description
ddplt
Useful utility functions for evaluation of ML.
Motivation: The main motivation behind this package is to create a single place where the utility functions for ML projects are located. These functions represent the best I was able to scrape from various tutorials or offical documentation on the web.
Confusion matrix
This function prints and plots the confusion matrix.
The code:
import numpy as np
from ddplt import plot_confusion_matrix
y_test = np.array([0, 0, 1, 1, 2, 0])
y_pred = np.array([0, 1, 1, 2, 2, 0])
class_names = np.array(['hip', 'hop', 'pop'])
ax, cm = plot_confusion_matrix(y_test, y_pred, class_names)
will create a plot like:
Learning curve
Create plot showing performance evaluation for different sizes of training data. The method should accept:
- existing
Axes
- performance measure (e.g. accuracy, MSE, precision, recall, etc.)
- ...
ROC curve
Plot showing Receiver Operating Characteristics of a predictor.
Correlation heatmap
Grid where each square has a color denoting strength of a correlation between predictors. You can choose between Pearson and Spearman correlation coefficient, the result is shown inside the square.
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 Distributions
Hashes for ddplt-0.0.2.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2f8fa1c4b6910c8281959416c87239de57892a27313320866cec88ba0df895f |
|
MD5 | aa50c17376f2c807a7affd81c00cfec5 |
|
BLAKE2b-256 | f30fe33979e7bc5a1118abeae162dd6e59a703f884f09bd71e05ef299e079be5 |