@@ -327,16 +327,20 @@ class MaxVar(AcquisitionBase):
327
327
328
328
"""
329
329
330
- def __init__ (self , quantile_eps = .01 , * args , ** opts ):
330
+ def __init__ (self , model , prior , quantile_eps = .01 , ** opts ):
331
331
"""Initialise MaxVar.
332
332
333
333
Parameters
334
334
----------
335
+ model : elfi.GPyRegression
336
+ Gaussian process model used to calculate the unnormalised approximate likelihood.
337
+ prior : scipy-like distribution
338
+ Prior distribution.
335
339
quantile_eps : int, optional
336
340
Quantile of the observed discrepancies used in setting the ABC threshold.
337
341
338
342
"""
339
- super (MaxVar , self ).__init__ (* args , ** opts )
343
+ super (MaxVar , self ).__init__ (model , prior = prior , ** opts )
340
344
self .name = 'max_var'
341
345
self .label_fn = 'Variance of the Unnormalised Approximate Posterior'
342
346
self .quantile_eps = quantile_eps
@@ -492,13 +496,16 @@ class RandMaxVar(MaxVar):
492
496
493
497
"""
494
498
495
- def __init__ (self , quantile_eps = .01 , sampler = 'nuts' , n_samples = 50 , warmup = None ,
496
- limit_faulty_init = 1000 , init_from_prior = False , sigma_proposals = None ,
497
- * args , ** opts ):
499
+ def __init__ (self , model , prior , quantile_eps = .01 , sampler = 'nuts' , n_samples = 50 , warmup = None ,
500
+ limit_faulty_init = 1000 , init_from_prior = False , sigma_proposals = None , ** opts ):
498
501
"""Initialise RandMaxVar.
499
502
500
503
Parameters
501
504
----------
505
+ model : elfi.GPyRegression
506
+ Gaussian process model used to calculate the unnormalised approximate likelihood.
507
+ prior : scipy-like distribution
508
+ Prior distribution.
502
509
quantile_eps : int, optional
503
510
Quantile of the observed discrepancies used in setting the ABC threshold.
504
511
sampler : string, optional
@@ -517,7 +524,7 @@ def __init__(self, quantile_eps=.01, sampler='nuts', n_samples=50, warmup=None,
517
524
Markov Chain sampler. Defaults to 1/10 of surrogate model bound lengths.
518
525
519
526
"""
520
- super (RandMaxVar , self ).__init__ (quantile_eps , * args , ** opts )
527
+ super (RandMaxVar , self ).__init__ (model , prior , quantile_eps , ** opts )
521
528
self .name = 'rand_max_var'
522
529
self .name_sampler = sampler
523
530
self ._n_samples = n_samples
@@ -648,13 +655,17 @@ class ExpIntVar(MaxVar):
648
655
649
656
"""
650
657
651
- def __init__ (self , quantile_eps = .01 , integration = 'grid' , d_grid = .2 ,
658
+ def __init__ (self , model , prior , quantile_eps = .01 , integration = 'grid' , d_grid = .2 ,
652
659
n_samples_imp = 100 , iter_imp = 2 , sampler = 'nuts' , n_samples = 2000 ,
653
- sigma_proposals = None , * args , * *opts ):
660
+ sigma_proposals = None , ** opts ):
654
661
"""Initialise ExpIntVar.
655
662
656
663
Parameters
657
664
----------
665
+ model : elfi.GPyRegression
666
+ Gaussian process model used to calculate the approximate unnormalised likelihood.
667
+ prior : scipy-like distribution
668
+ Prior distribution.
658
669
quantile_eps : int, optional
659
670
Quantile of the observed discrepancies used in setting the discrepancy threshold.
660
671
integration : str, optional
@@ -680,7 +691,7 @@ def __init__(self, quantile_eps=.01, integration='grid', d_grid=.2,
680
691
Markov Chain sampler. Defaults to 1/10 of surrogate model bound lengths.
681
692
682
693
"""
683
- super (ExpIntVar , self ).__init__ (quantile_eps , * args , ** opts )
694
+ super (ExpIntVar , self ).__init__ (model , prior , quantile_eps , ** opts )
684
695
self .name = 'exp_int_var'
685
696
self .label_fn = 'Expected Loss'
686
697
self ._integration = integration
0 commit comments