skvisualizations.scores module#
Scikit-learn-compatible visualizations for scores and hypothesis testing.
@author: David Diaz Vico @license: MIT
- skvisualizations.scores.hypotheses_table(samples, models, alpha=0.05, multitest=None, test='wilcoxon', correction=None, multitest_args={}, test_args={})[source]#
Hypotheses table.
Prints a hypothesis table with a selected test and correction.
- Parameters:
samples (array-like) – Matrix of samples where each column represent a model.
models (array-like) – Model names.
alpha (float in [0, 1], default=0.05) – Significance level.
multitest ({'kruskal', 'friedmanchisquare'}) – default=None Ranking multitest used.
test ({'mannwhitneyu', 'wilcoxon'},) – default=’wilcoxon’ Ranking test used.
correction ({'bonferroni', 'sidak', 'holm-sidak', 'holm',) –
- ‘simes-hochberg’, ‘hommel’, ‘fdr_bh’, ‘fdr_by’, ‘fdr_tsbh’,
’fdr_tsbky’},
default=None Method used to adjust the p-values.
multitest_args (dict) – Optional ranking test arguments.
test_args (dict) – Optional ranking test arguments.
- Returns:
multitest_table (array-like) – Table of p-value and rejection/non-rejection for the multitest hypothesis.
test_table (array-like) – Table of p-values and rejection/non-rejection for each test hypothesis.
- skvisualizations.scores.scores_table(datasets, estimators, scores, stds=None, greater_is_better=True, method='average')[source]#
Scores table.
Prints a table where each row represents a dataset and each column represents an estimator.
- Parameters:
datasets (array-like) – List of dataset names.
estimators (array-like) – List of estimator names.
scores (array-like) – Matrix of scores where each column represents a model.
stds (array_like, default=None) – Matrix of standard deviations where each column represents a model.
greater_is_better (boolean, default=True) – Whether a greater score is better (score) or worse (loss).
method ({'average', 'min', 'max', 'dense', 'ordinal'}, default='average') – Method used to solve ties.
- Returns:
table – Table of mean and standard deviation of each estimator-dataset pair. A ranking of estimators is also generated.
- Return type:
array-like