data-science

grounded_sage 2025-04-30T07:08:10.701839Z

I see inferme and gen.clj as the primary recommendations that stay in clojure for bayes. My assumptions are that inferme is easier, and gen.clj is more powerful. gen.clj being based on a serious project as an implementation. Appears that it would offer more power and stability... somewhat. I wonder what would be the best entry point for learning. Maybe gen.clj because of the extra resources even if in another lang. Maybe inferme and if inferm would the migration path if I want gen.clj be much different?

Daniel Slutsky 2025-05-01T08:25:37.837219Z

I've been using Inferme and like it a lot for its clarity and simplicity. (Haven't got to learn enough about Gen.clj yet.) For bigger problems, and for cases where we need the full Bayesian ecosystem at our hands, I think cmdstan-clj is a pragmatic choice/ https://github.com/scicloj/cmdstan-clj

1
Daniel Slutsky 2025-05-01T08:57:24.915429Z

I think Bayesian statistics is one of those spaces where we have have pure, simple and beatiful solutions in Clojure (Inferme, Gen.clj), but at the same time, we need to be open to the richness of bigger communities. (.. just like we can train deep networks in Clojure with Deep Diamond, but still need to reach to Pytorch, etc., for existing architectures, pretrained networks, tutorials, visualizations, diagnostics, tooling, etc.) Stan, PyMC, and other Bayesian communities can offer us a lot (e.g., https://www.arviz.org/en/latest/). It will take some time till we have all that in pure Clojure. Till then, interop is actually not so bad. You may also enjoy this draft tutorial for PyMC through interop: https://scicloj.github.io/clojure-data-tutorials/projects/stats/pymc/intro

❤️ 1
grounded_sage 2025-05-01T18:25:12.969379Z

bookmarked @daslu thanks for sharing

🙏 1
genmeblog 2025-04-30T07:14:26.323479Z

I wrote inferme as a part of my learning process of MCMC and similar stuff. I worked through some books making examples and building a library. So I think it's a good way to play with at the beginning of research in the area.

👍 2
💯 1
genmeblog 2025-04-30T07:19:08.622849Z

Regarding gen.clj it has background at MIT but I'm not sure if it's mature enough and what actual inference methods are implemented (I see only importance sampling).

genmeblog 2025-04-30T07:20:47.568469Z

@zane can you elaborate more about what's inside a toolkit and what are the further plans for gen.clj ?

zane 2025-04-30T07:48:14.966689Z

Sure!

👍 2
grounded_sage 2025-04-30T07:59:56.150589Z

Love how I didn't even tag you both and you are straight in there with helpful info. 🙏clojure-spin

❤️ 2
zane 2025-04-30T08:03:19.965279Z

Gen.clj is an implementation of the https://www.gen.dev/ probabilistic programming language. Most probabilistic programming languages treat inference algorithms as general-purpose black boxes, but this approach doesn't scale well as probabilistic programs become more complex. Gen is different in that it supports programmable inference. Instead of an inference engine that tightly couples inference algorithms with language compiler details, Gen gives users a flexible API for implementing an open-ended set of inference and learning algorithms. Programmable inference scales better, but requires care and expertise on the part of the probabilistic programmer. Also, in addition to having a modeling language for writing down models using ordinary code, Gen lets users hand-code parts of their models that demand better performance.

zane 2025-04-30T08:05:13.161239Z

While Gen.clj is in active use by researchers, inferme is almost certainly the more mature library. If you aren't intending to write the kind of probabilistic programs that would need Gen's unique performance-oriented features you're probably better off using inferme.

zane 2025-04-30T08:05:15.546779Z

Hope that helps!

grounded_sage 2025-04-30T08:07:14.096829Z

Thank you. I have not stepped into this world yet. Getting lay of the land. But I feel it coming soon as my projects and interfaces mature. Appreciate this information from both of you.

👍 2
zane 2025-04-30T08:11:03.058569Z

It's a deep and fascinating field! I hope you have fun exploring it.

zane 2025-04-30T08:14:49.100389Z

Feel free to join us in #gen-clj if you like. I don't have much time these days to contribute to the project, but other more active contributors like @sritchie09 hang out in there. Together we'll do our best to answer any follow-up questions you might have.

❤️ 2
Sam Ritchie 2025-04-30T15:00:18.776899Z

Hey all! @tsulej there are no active plans to develop gen.clj… the researchers who would have done so are going to be active in the probabilistic programming world, but most folks have departed for startups over the past month, and will be working more closely with tools that give ready access to the GPU. Some of that move back to Gen.clj eventually!

✅ 1