brian-j-smith / Mamba.jl

Markov chain Monte Carlo (MCMC) for Bayesian analysis in julia
Other
253 stars 52 forks source link

Error in describe #140

Open lucasfreitas1988 opened 6 years ago

lucasfreitas1988 commented 6 years ago

Hello,

I have a problem with the function described (). The error "at least one finite value must be provided to formatter" appears after running my mcmc code. I suppose my chains exploded and the parameters assumed very large values. This actually prevents the descriptive statistics from being calculated, but I would like to have used some artifice to know the speed of the growth of the chains.

Can this error appear for some other reason?

Can some function show me in which iteration this growth takes a leap?

Regards !!!

bdeonovic commented 6 years ago

you could always manually iterate the MCMC 1 iteration at a time (or manually loop as many iterations as you want) with:

## Development and Testing

setinputs!(model, line)             # Set input node values, line is your data (see the line example in docs)
setinits!(model, inits[1])          # Set initial values
setsamplers!(model, scheme1)        # Set sampling scheme

showall(model)                      # Show detailed node information

logpdf(model, 1)                    # Log-density sum for block 1
logpdf(model, 2)                    # Block 2
logpdf(model)                       # All blocks

sample!(model, 1)                  # Sample values for block 1
sample!(model, 2)                  # Block 2
sample!(model)                     # All blocks