-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to combine simulate and loss functions? #10
Comments
edited: This issue can be worked around :) function ABCplan(prior,costfunction;params=())
fakedist(x,y)=x+y
ABCplan(prior, costfunction, 0.0, fakedist; params=params)
end example: prior = Normal(0,1)
sim(x,other) = abs(x-1.5) #it returns a distance value
plan=ABCplan(prior, sim)
@show mean(ABCDE(plan,0.01,verbose=false)[1])
# mean((ABCDE(plan, 0.01, verbose = false))[1]) = 1.4993631135745822 |
francescoalemanno
added a commit
that referenced
this issue
Jun 15, 2020
as soon as the whole code stabilizes, i will maybe incorporate a function similar to that one inside the package, for now i added a test to make sure i don't accidentally prevent a use of my package via distance values only :) |
thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Thanks for the great package. Is it possible to create an interface that combines the
simulate
anddistance
functions into one function that is evaluating at inputs and returns real numbers? Is there a workaround I can use for this?My loss function is quite complex and separating the simulation from the distance, while possible, just makes my code more complex.
Before the most recent patch, I was able to work around this as the distance always used the second argument for
tdata
, but that seems to have changed.Thanks!
The text was updated successfully, but these errors were encountered: