plots update
This commit is contained in:
parent
027e18f1e7
commit
785533f74a
|
@ -4,6 +4,8 @@ import pathlib
|
||||||
import pickle
|
import pickle
|
||||||
from glob import glob
|
from glob import glob
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from plot_driftbox import brokenbar_supremacy_by_drift
|
||||||
from uci_experiments import *
|
from uci_experiments import *
|
||||||
from uci_tables import METHODS
|
from uci_tables import METHODS
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
@ -18,6 +20,7 @@ os.makedirs(plotdir, exist_ok=True)
|
||||||
|
|
||||||
N_RUNS = N_FOLDS * N_REPEATS
|
N_RUNS = N_FOLDS * N_REPEATS
|
||||||
|
|
||||||
|
|
||||||
def gather_results(methods, error_name, resultdir):
|
def gather_results(methods, error_name, resultdir):
|
||||||
method_names, true_prevs, estim_prevs, tr_prevs = [], [], [], []
|
method_names, true_prevs, estim_prevs, tr_prevs = [], [], [], []
|
||||||
for method in methods:
|
for method in methods:
|
||||||
|
@ -74,11 +77,24 @@ def binary_bias_bins(methods, error_name, path=None):
|
||||||
qp.plot.binary_bias_bins(method_names, true_prevs, estim_prevs, pos_class=1, title='Positive', legend=True, savepath=f'{path}_pos.{plotext}')
|
qp.plot.binary_bias_bins(method_names, true_prevs, estim_prevs, pos_class=1, title='Positive', legend=True, savepath=f'{path}_pos.{plotext}')
|
||||||
|
|
||||||
|
|
||||||
|
def brokenbar_supr(methods, error_name, path=None):
|
||||||
|
print('plotting brokenbar_supr')
|
||||||
|
if path is not None:
|
||||||
|
path = join(path, f'broken_{error_name}')
|
||||||
|
method_names, true_prevs, estim_prevs, tr_prevs = gather_results(methods, error_name, resultdir)
|
||||||
|
brokenbar_supremacy_by_drift(method_names, true_prevs, estim_prevs, tr_prevs, n_bins=10, binning='isometric',
|
||||||
|
x_error='ae', y_error='ae', ttest_alpha=0.005, tail_density_threshold=0.005,
|
||||||
|
savepath=path)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
plot_error_by_drift(METHODS, error_name='ae', path=plotdir)
|
# plot_error_by_drift(METHODS, error_name='ae', path=plotdir)
|
||||||
|
|
||||||
diagonal_plot(METHODS, error_name='ae', path=plotdir)
|
# diagonal_plot(METHODS, error_name='ae', path=plotdir)
|
||||||
|
|
||||||
binary_bias_global(METHODS, error_name='ae', path=plotdir)
|
# binary_bias_global(METHODS, error_name='ae', path=plotdir)
|
||||||
|
|
||||||
binary_bias_bins(METHODS, error_name='ae', path=plotdir)
|
# binary_bias_bins(METHODS, error_name='ae', path=plotdir)
|
||||||
|
|
||||||
|
# brokenbar_supr(METHODS, error_name='ae', path=plotdir)
|
||||||
|
brokenbar_supr(METHODS, error_name='ae', path=plotdir)
|
Loading…
Reference in New Issue