Bayesian, stan and python

avatar

I have been playing arround with pystan today which is the interface for stan, a language for statistical models. It allows for relatively easy implementation of Bayesian inference for data analysis. More specifically, you suppose that a process in the real world is described by probabilities and based on that you formulate a model. You don't know the parameters of that model. However, you do have some data. Bayesian inference lets you put the data and model together to define a "new model" which is in some kind of way connected to the data.

Numerically, solving this problem is very hard. It relies on brute force a.k.a Monte carlo :P It can be quite complicated to develop efficient algorihms for this. But pystan has some smart algorithms built in it so that solves a lot when you a starting out with these type of problems.

Here is a nice short course on Bayesian inference for peeps with experience in R or python ->

with some exercises https://github.com/rasmusab/bayesianprobabilitiesworkshop
Note the pystan stuff is a bit outdated you need to split pystan.stan in

model = pystan.StanModel(model_code = model_string)
fit = model.sampling(data=data_list)


0
0
0.000
6 comments
avatar

According to the Bible, Is the Bible final and complete? How does it support science? (Part 3 of 4)

(Sorry for sending this comment. We are not looking for our self profit, our intentions is to preach the words of God in any means possible.)



Comment what you understand of our Youtube Video to receive our full votes. We have 30,000 #SteemPower. It's our little way to Thank you, our beloved friend.
Check our Discord Chat
Join our Official Community: https://beta.steemit.com/trending/hive-182074

0
0
0.000
avatar

Neat. Now i will need to find an example that needs a Bayes and try it out

0
0
0.000
avatar

There are some fishy examples in the exercises of the lecture :P

0
0
0.000
avatar


This post has been voted on by the SteemSTEM curation team and voting trail. It is elligible for support from @curie and @minnowbooster.

If you appreciate the work we are doing, then consider supporting our witness @stem.witness. Additional witness support to the curie witness would be appreciated as well.

For additional information please join us on the SteemSTEM discord and to get to know the rest of the community!

Please consider using the steemstem.io app and/or including @steemstem in the list of beneficiaries of this post. This could yield a stronger support from SteemSTEM.

0
0
0.000
avatar

Thanks for sharing this valuable information!

I currently also practicing things like this.

Very helpful.

Resteem!

0
0
0.000
avatar

Hi @mathowl!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 3.871 which ranks you at #4769 across all Steem accounts.
Your rank has improved 20 places in the last three days (old rank 4789).

In our last Algorithmic Curation Round, consisting of 85 contributions, your post is ranked at #47.

Evaluation of your UA score:
  • You're on the right track, try to gather more followers.
  • The readers like your work!
  • Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!

Feel free to join our @steem-ua Discord server

0
0
0.000