smith-garrett / firstpassagetools.jl Goto Github PK
View Code? Open in Web Editor NEWTools for working with first-passage time distributions for continuous-time, discrete-state Markov processes
License: MIT License
Tools for working with first-passage time distributions for continuous-time, discrete-state Markov processes
License: MIT License
Not really used in fitting right now, but would be useful to test:
These are now deprecated in Distributions.jl and seem to be causing issues in testing/compiling with newer versions of Julia.
MethodError: no method matching exponential!(::Matrix{ForwardDiff.Dual{ForwardDiff.Tag{DynamicPPL.DynamicPPLTag, Float64}, Float64, 2}}, ::ExponentialUtilities.ExpMethodHigham2005Base)
Could be a numerical issue, but the numbers are often -1e-162. This causes issues in logpdf() when trying to fit models because log() doesn't take negative arguments unless they are explicitly of type Complex.
Interface: pdf(d::fpdistribution, x::Real, dims=...). The dims argument is either an integer or a collection/vector of integers referring to the absorbing states/the rows of the absorbing matrix A.
Probably compare mean and variance, as well as pdf() evaluated at same points.
@JuliaRegistrator register
CDF/quantile fns. need to know which transient states exit into which absorbing states in order to implement for systems with more than one absorbing state.
CDF_abs = 1 - (sum_{transient states exiting into abs} / splitting probability_abs)
Provide pre-calculated, rescaled
The idea of encoding multiple conditions (= multiple different transition rate matrices) seems to just be making things complicated. Better to just remove and make the user handle that manually in the @model
internals.
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
Error:
ERROR: DomainError with -4.5958295283709015e-27:
log will only return a complex result if called with a complex argument. Try log(Complex(x)).
This happens occasionally. Most recently, I've noticed it using ReverseDiff.jl while fitting fpdistribs in Turing. I suspect that this might be due to proposals being sampled that cause the entries in the T matrix to be very close to zero. When that gets fed to pdf(), it might lead to numerical overflow.
I think something similar happens when I get feedback from the fpdistribution() fn. that the T matrix is incorrect, i.e., the columns don't sum to zero.
Currently only plots, e.g., PDF of exit time.
Could implement function signature: plot(fp, conditional={true/false}
Need to resolve #34 first
This should probably be asserted when generating a fpdistribution
.
Manually create a T and an A matrix, make sure that they are the same.
Currently, rescaling is done by multiplying the transition rates by the total number of states, transient + absorbing. It might be better to rescale by the number of transient states only, since this is what really contributes to first-passage times, i.e., the number of states you have to pass through (approx.) before you reach an absorbing state (which no longer contributes to FPT).
This is already asserted in the setup()
function, but it might be a good idea to check it when creating an fpdistribution
.
In addition to the rows of
Input CSVs should have a standard, documented format. Test should check that correctly formatted CSVs work and that easy-to-make errors don't.
Currently using numerical solution of matrix exponential. Could also consider:
Might be faster and/or better for automatic differentiation? More numerically stable?
Simulation-based calibration is consistently showing that any sampling algorithm gives samples that are higher than where the true posterior should be.
Can be done in parameter recovery example. PSIS-LOO available as Turing.jl subpackage or maybe here.
Simulation-based calibration returns evidence of biased sampling for a simple, non-hierarchical model. PG(25) seems to work just fine, though.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.