|
__init__(self,
K,
L,
model,
ntheta,
nphi,
alpha=0.5,
verbose=False,
viz=False)
Initializes the Melding class. |
source code
|
|
|
setPhi(self,
names,
dists=[stats.norm],
pars=[(0,1)],
limits=[(-5,5)])
Setup the models Outputs, or Phi, and generate the samples from prior distributions
needed for the melding replicates. |
source code
|
|
|
setTheta(self,
names,
dists=[stats.norm],
pars=[(0,1)])
Setup the models inputs and generate the samples from prior distributions
needed for the dists the melding replicates. |
source code
|
|
|
setThetaFromData(self,
names,
data,
limits)
Setup the model inputs and set the prior distributions from the vectors
in data. |
source code
|
|
|
setPhiFromData(self,
names,
data,
limits)
Setup the model outputs and set their prior distributions from the
vectors in data. |
source code
|
|
|
run(self,
*args)
Runs the model through the Melding inference.model
model is a callable which return the output of the deterministic model,
i.e. |
source code
|
|
|
|
|
|
|
basicfit(self,
s1,
s2)
Calculates a basic fitness calculation between a model-
generated time series and a observed time series. |
source code
|
|
|
logPooling(self,
phi)
Returns the probability associated with each phi[i]
on the pooled pdf of phi and q2phi. |
source code
|
|
|
abcRun(self,
fitfun=None,
data={},
t=1,
nopool=False,
savetemp=False)
Runs the model for inference through Approximate Bayes Computation
techniques. |
source code
|
|
|
sir(self,
data={},
t=1,
variance=0.1,
nopool=False,
savetemp=False)
Run the model output through the Sampling-Importance-Resampling algorithm. |
source code
|
|
|
runModel(self,
savetemp,
t=1)
Handles running the model self.K times keeping a temporary savefile for
resuming calculation in case of interruption. |
source code
|
|