Skip to content

Commit

Permalink
1.0.0 julia fix
Browse files Browse the repository at this point in the history
  • Loading branch information
montyvesselinov committed Oct 9, 2019
1 parent d690164 commit ffb0b9a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 deletions.
20 changes: 20 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name = "BIGUQ"
uuid = "7f9c7709-75fb-5397-acba-f980073965f6"
version = "0.6.0"

[deps]
AffineInvariantMCMC = "a0f608ac-68d0-5108-ad9a-0cdca73324f3"
BlackBoxOptim = "a134a8b2-14d6-55f6-9291-3336d3ab0209"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
RobustPmap = "27aeedcb-f738-516b-a0b8-3211cf1146e5"

[compat]
julia = "≥ 1.0.0"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
3 changes: 1 addition & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
julia 0.6 1.0
julia 1.0
RobustPmap
AffineInvariantMCMC
DataFrames
ForwardDiff
BlackBoxOptim
Klara 0.8.6
Distributions
14 changes: 7 additions & 7 deletions src/BIGOED.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,22 @@ function generateproposedobs(bigoed::BigOED, proposedindex::Int, numobsrealizati
return retval
end
#mcmcmodel = Klara.model(loglikelihood, init=bigoed.nominalparams)
mcmcparams = Klara.BasicContMuvParameter(:p, logtarget=loglikelihood)
mcmcmodel = Klara.likelihood_model(mcmcparams, false)
# mcmcparams = Klara.BasicContMuvParameter(:p, logtarget=loglikelihood)
# mcmcmodel = Klara.likelihood_model(mcmcparams, false)
#=
if Base.isbindingresolved(Klara, :RAM)
mcmcsampler = Klara.RAM(fill(1e-1, length(bigoed.nominalparams)), 0.3)
else
warn("Robust Adaptive Metropolis (RAM) method is not available")
=#
mcmcsampler = Klara.MH(fill(1e-1, length(bigoed.nominalparams)))
# mcmcsampler = Klara.MH(fill(1e-1, length(bigoed.nominalparams)))
#end
mcmcrange = Klara.BasicMCRange(nsteps=thinning * numobsrealizations + burnin, burnin=burnin, thinning=thinning)
# mcmcrange = Klara.BasicMCRange(nsteps=thinning * numobsrealizations + burnin, burnin=burnin, thinning=thinning)
mcmcparams0 = Dict(:p=>bigoed.nominalparams)
outopts = Dict{Symbol, Any}(:monitor=>[:value, :logtarget, :loglikelihood], :diagnostics=>[:accept])
job = Klara.BasicMCJob(mcmcmodel, mcmcsampler, mcmcrange, mcmcparams0, outopts=outopts, tuner=Klara.VanillaMCTuner())
Klara.run(job)
mcmcchain = Klara.output(job)
# job = Klara.BasicMCJob(mcmcmodel, mcmcsampler, mcmcrange, mcmcparams0, outopts=outopts, tuner=Klara.VanillaMCTuner())
# Klara.run(job)
# mcmcchain = Klara.output(job)
#use the mcmc samples to generate realizations of the proposed obs
proposedlocations = bigoed.proposedlocations[proposedindex]
proposedtimes = bigoed.proposedtimes[proposedindex]
Expand Down
1 change: 0 additions & 1 deletion src/BIGUQ.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ LA-CC-15-080; Copyright Number Assigned: C16008
module BIGUQ

import DataFrames
import Klara
import ForwardDiff
import BlackBoxOptim
import Distributions
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Base.Test
import Test

@assert(1 == 1)
@Test.test 1 == 1

:passed

0 comments on commit ffb0b9a

Please sign in to comment.