Posts

Understanding Inference in Bayesian Networks: From Naive Bayes to Gibbs Sampling (with Python Examples)

Image
Inference in Bayesian Networks: From Naive Bayes to Gibbs Sampling In our previous post, we looked at how to represent uncertainty. Now, we look at the engine of the system: Inference . Inference allows us to take observed data (evidence) and calculate the probability of hidden states. Naive Bayes Inference Exact Naive Bayes assumes that features are independent given the class. Despite its "naive" name, it is a workhorse in modern applications. $$P(C \mid o_1, \dots, o_m) \propto P(C) \prod_{i=1}^m P(o_i \mid C)$$ Real-World Application: Spam Filtering When you receive an email containing the words "Offer" and "Free," a Naive Bayes classifier looks at the probability of those words appearing in known Spam vs. Not Spam emails. It assumes the word "Offer" appearing is independent of "Free" being there, allowing for lightning-fas...

Switch Your OpenClaw LLM Backend With One Command — Claude, Gemini, Ollama & OpenRouter

🦞 OpenClaw Series · Bonus Switch Your LLM Backend With llm-switch One shell script. Four providers. No config file editing. Switch between Claude, Gemini, Ollama, and OpenRouter from the terminal and restart. 🥧 Raspberry Pi 5 🦞 OpenClaw 🐚 Bash Script ☁️ GitHub Gist 🟢 Anthropic · 🔵 Gemini · 🟡 Ollama · 🟣 OpenRouter 1 Install 2 Providers 3 Commands 4 Internals Install llm-switch 📦 The script lives on GitHub Gist and gets installed into the container via your Samba share. Since /usr/local/bin resets on every add-on restart, the install is a one-liner you run whenever needed. 📄 llm-switch.sh — GitHub Gist gist.github.com/imnoor/f38b8e32e07a5cb0c01b2b53352e201f → Option A — Via Samba Share (recommended) 1 Download and save to your share Download the raw script from the Gist above. S...

Track Any Stock Portfolio With a Raspberry Pi No Paid APIs, Just Telegram

📖 Part 3 of 3 📈 Any Market · Zero API Keys · March 2026 Track Any Stock Portfolio With a Raspberry Pi No Paid APIs, Just Telegram A step-by-step guide to setting up OpenClaw on a Raspberry Pi 5 to track any stock portfolio — live P&L, dividend-adjusted returns, SMA signals, and twice-daily Telegram updates. Works with NYSE, LSE, TSX, and any Yahoo Finance supported market. 🥧 Raspberry Pi 5 📈 Yahoo Finance 🦞 OpenClaw ✈️ Telegram Any Stocks Tracked Any Market Yahoo Finance Supported Capital P&L Tracked +Dividends True Total Return $0 API Cost Audience: 🟢 Beginner Anyone can follow 🟡 Intermediate Basic Linux helpful ⚠️ Privacy Data stored locally on your Pi 1 Setup 2 P&L Demo 3 Dividends 4 Automation 5 Lessons Setting Up Portfolio Tracking 📦 The entire setup takes under 15 minutes and requires zero paid API keys. OpenClaw uses its built...

Quran Page 33: The Purpose of Revelation and the Ethics of Charity (Surah Al-Baqarah 211-215)

Image
📖 About Surah Al-Baqarah (Page 33) Page 33 reminds us that the world is made alluring to those who disbelieve, but the righteous will be above them on the Day of Resurrection. It provides a historical context for humanity: that mankind was once one nation, but division arose through transgression. To bring balance, Allah sent Prophets with the Book. This page also answers a common question of the companions: "What should we spend?" 🕌 Arabic Text (Page 33) 🌍 English Translation (Sahih International) Verse 211: Ask the Children of Israel how many a sign of evidence We have given them. And whoever exchanges the favor of Allah [for disbelief] after it has come to him - then indeed, Allah is severe in penalty. Verse 212: Beautified for those who disbelieve is the life of this world, and they ridicule those who believe. But those who fear Allah shall be above them on the Day of Resurrection. And Allah gives provision to whom He wil...

Your Smart Home Doesn't Need the Cloud — Mine Almost Doesn't (OpenClaw + Home Assistant + Raspberry Pi 5

📖 Part 2 of 2 🦞 Field-tested · March 2026 Your Smart Home Doesn't Need the Cloud — Mine Almost Doesn't OpenClaw + Home Assistant on a Raspberry Pi 5. The brain is local. The AI API isn't — and that's okay. Here's what it can actually do. 🏠 Home Assistant OS 🦞 OpenClaw 2026.3 🤖 Claude Sonnet 4.6 ✈️ Telegram Audience: 🟢 Beginner Anyone can follow 🟡 Intermediate Basic Linux helpful ⚠️ Security Pay close attention 1 Setup 2 In Action 3 Limitations 4 Try This 5 Lessons Setting Up the Home Assistant Skill 🔧 This picks up where Part 1 left off. You have OpenClaw running and Telegram working. Now we connect it to Home Assistant so Claw can actually do things. 🟢 Beginner ℹ️ Haven't done Part 1 yet? This guide assumes OpenClaw is already installed as a HAOS add-on with Telegram working. Start with Part 1 first — it covers installation...