adding bootstrap-emq
This commit is contained in:
parent
7342e57cda
commit
7b75954f9b
|
|
@ -10,7 +10,7 @@ from copy import deepcopy as cp
|
||||||
import quapy as qp
|
import quapy as qp
|
||||||
from BayesianKDEy._bayeisan_kdey import BayesianKDEy
|
from BayesianKDEy._bayeisan_kdey import BayesianKDEy
|
||||||
from build.lib.quapy.data import LabelledCollection
|
from build.lib.quapy.data import LabelledCollection
|
||||||
from quapy.method.aggregative import DistributionMatchingY as DMy, AggregativeQuantifier
|
from quapy.method.aggregative import DistributionMatchingY as DMy, AggregativeQuantifier, EMQ
|
||||||
from quapy.method.base import BinaryQuantifier, BaseQuantifier
|
from quapy.method.base import BinaryQuantifier, BaseQuantifier
|
||||||
from quapy.model_selection import GridSearchQ
|
from quapy.model_selection import GridSearchQ
|
||||||
from quapy.data import Dataset
|
from quapy.data import Dataset
|
||||||
|
|
@ -54,6 +54,7 @@ def methods():
|
||||||
quantifier with optimized hyperparameters
|
quantifier with optimized hyperparameters
|
||||||
"""
|
"""
|
||||||
acc_hyper = {}
|
acc_hyper = {}
|
||||||
|
emq_hyper = {'calib': [None, 'nbvs', 'bcts', 'ts', 'vs']}
|
||||||
hdy_hyper = {'nbins': [3,4,5,8,16,32]}
|
hdy_hyper = {'nbins': [3,4,5,8,16,32]}
|
||||||
kdey_hyper = {'bandwidth': [0.001, 0.005, 0.01, 0.05, 0.1, 0.2]}
|
kdey_hyper = {'bandwidth': [0.001, 0.005, 0.01, 0.05, 0.1, 0.2]}
|
||||||
kdey_hyper_clr = {'bandwidth': [0.05, 0.1, 0.5, 1., 2., 5.]}
|
kdey_hyper_clr = {'bandwidth': [0.05, 0.1, 0.5, 1., 2., 5.]}
|
||||||
|
|
@ -65,6 +66,8 @@ def methods():
|
||||||
yield 'BootstrapACC', ACC(LR()), acc_hyper, lambda hyper: AggregativeBootstrap(ACC(LR()), n_test_samples=1000, random_state=0), multiclass_method
|
yield 'BootstrapACC', ACC(LR()), acc_hyper, lambda hyper: AggregativeBootstrap(ACC(LR()), n_test_samples=1000, random_state=0), multiclass_method
|
||||||
yield 'BayesianACC', ACC(LR()), acc_hyper, lambda hyper: BayesianCC(LR(), mcmc_seed=0), multiclass_method
|
yield 'BayesianACC', ACC(LR()), acc_hyper, lambda hyper: BayesianCC(LR(), mcmc_seed=0), multiclass_method
|
||||||
|
|
||||||
|
yield 'BootstrapEMQ', EMQ(LR(), on_calib_error='backup'), emq_hyper, lambda hyper: AggregativeBootstrap(EMQ(LR(), on_calib_error='backup'), n_test_samples=1000, random_state=0), multiclass_method
|
||||||
|
|
||||||
yield 'BootstrapHDy', DMy(LR()), hdy_hyper, lambda hyper: AggregativeBootstrap(DMy(LR(), **hyper), n_test_samples=1000, random_state=0), multiclass_method
|
yield 'BootstrapHDy', DMy(LR()), hdy_hyper, lambda hyper: AggregativeBootstrap(DMy(LR(), **hyper), n_test_samples=1000, random_state=0), multiclass_method
|
||||||
yield 'BayesianHDy', DMy(LR()), hdy_hyper, lambda hyper: PQ(LR(), stan_seed=0, **hyper), only_binary
|
yield 'BayesianHDy', DMy(LR()), hdy_hyper, lambda hyper: PQ(LR(), stan_seed=0, **hyper), only_binary
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue