skvisualizations.validation module#
Scikit-learn-compatible visualizations for model validation.
@author: David Diaz Vico @license: MIT
- skvisualizations.validation.classifier_scatter(X, y, fname, pca_n_components=2, **kwargs)[source]#
Classifier scatter.
Classifier scatter plot.
- Parameters:
X (array-like, shape (n_samples, features_shape)) – The transformed data.
y (numpy array of shape [n_samples]) – Target values.
fname (str or file-like object) – https://matplotlib.org/api/_as_gen/matplotlib.pyplot.savefig.html
pca_n_components (integer, default=2) – Dimension of the PCA projection of X.
**kwargs (optional savefig named args)
- Return type:
None.
- skvisualizations.validation.keras_history_plot(history, fname, **kwargs)[source]#
Keras history plot.
Train loss plotted for each training epoch.
- Parameters:
history (history object) – Keras history object.
fname (str or file-like object) – https://matplotlib.org/api/_as_gen/matplotlib.pyplot.savefig.html
**kwargs (optional savefig named args)
- Return type:
None.
- skvisualizations.validation.metaparameter_plot(search, param, fname, score='score', log_scale=True, **kwargs)[source]#
Metaparameter plot.
Train and test metric plotted along a meta-parameter search space.
- Parameters:
search (search object) – Fitted sklearn search object.
param (string) – Name of the meta-parameter.
fname (str or file-like object) – https://matplotlib.org/api/_as_gen/matplotlib.pyplot.savefig.html
score (string) – Name of the metric
log_scale (boolean, default=True) – Wether to use a logarithmic scale.
**kwargs (optional savefig named args)
- Return type:
None.
- skvisualizations.validation.regressor_scatter(X, y, preds, fname, **kwargs)[source]#
Regressor scatter.
Regressor scatter plot.
- Parameters:
X (array-like, shape (n_samples, features_shape)) – The transformed data.
y (numpy array of shape [n_samples]) – Target values.
preds (numpy array of shape [n_samples]) – Predicted values.
fname (str or file-like object) – https://matplotlib.org/api/_as_gen/matplotlib.pyplot.savefig.html
**kwargs (optional savefig named args)
- Return type:
None.