-
Notifications
You must be signed in to change notification settings - Fork 5
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
Define MixedMultivariateDistribution type #27
Comments
Putting some discussion we've have had for reference:
@itsdfish, did we end up getting |
This comment was marked as off-topic.
This comment was marked as off-topic.
@DominiqueMakowski, that is an interesting idea. I would have to learn how the In the meantime, you should be able to add covariates to your model via Turing. For example,
|
What issues do you foresee? What would make this new distribution class not compatible with methods such as |
@DominiqueMakowski, good question. Turing extends a the function |
Don't want to sound pushy at all, just curious, but any news on this front 😁 ? |
@DominiqueMakowski, no problem! I appreciate your interest. I will have some time tomorrow morning to look through Turing and reach out to the developers to see whether they be willing to set up their code so that others may extend the functionality. I'll cc you on any issues I open for your situation awareness. |
@DominiqueMakowski, I think I have a proof of concept working. Would you be able to give the following code a try on your system to see if it seems reasonable?
|
It does seem to work Iterations = 1:1:1000
Number of chains = 1
Samples per chain = 1000
parameters = data[1], data[2]
internals =
Summary Statistics
parameters mean std mcse ess_bulk ess_tail rhat ess_per_sec
Symbol Float64 Float64 Float64 Float64 Float64 Float64 Missing
data[1] 1.4970 0.5002 0.0164 928.3307 NaN 0.9992 missing
data[2] 2.7176 10.2072 0.3206 898.7900 901.0663 0.9993 missing
Quantiles
parameters 2.5% 25.0% 50.0% 75.0% 97.5%
Symbol Float64 Float64 Float64 Float64 Float64
data[1] 1.0000 1.0000 1.0000 2.0000 2.0000
data[2] 0.1605 0.5916 1.2593 2.5420 11.0056 |
Awesome. Evidently, the main thing I needed to define was
I'll work on integrating the new type system either today or tomorrow and push a new release. |
@itsdfish Nice work on this! Was away for a summer school. Will try to finish up the Ratcliff DDM this weekend. Will look closer at what you implemented and I'll make sure Ratcliff distribution uses the new framework. |
@kiante-fernandez, thanks! I think integrating with the new type system should be fairly simple. Basically, you can make the model a subtype of |
I would like to explore the possibility of defining a type for multialternative SSMs in hopes that this package plays well with Turing and other packages. The package currently works well in most cases. However, it does not work well with
predict
from Turing, as discussed here.Here is one idea:
This defines
MixedMultivariateDistribution
which could potentially be used outside of SSMs. The type system is then split into 1D and 2D SSMs, which are abstract types.The code below shows that this works for basic MCMC sampling. The question is how to get it to work with
predict
and friends.The text was updated successfully, but these errors were encountered: