Akshay 🚀 Profile picture
Aug 28 8 tweets 2 min read Read on X
Bayes' Theorem clearly explained:
Bayes' Theorem is a cornerstone of probability theory!

It calculates the probability of an event, given that another event has occurred.

It's like updating your guess with fresh information!

Before we delve into the details, let's take a quick look at its formula: Image
Imagine you're trying to guess if it will rain today. ☔️ You start with a general belief based on the weather forecast (say, a 40% chance of rain).

This is your 'prior' probability: Image
Then, you notice the sky is getting cloudy. ☁️

This new information is 'evidence' that might affect the probability of rain. Image
Next we consider P(Cloud | Rain), which is used to weigh the likelihood that it rains when it's cloudy.

Check this out👇 Image
We are now ready to update our belief by calculating the probability of rain given it's cloudy using Bayes' Theorem!

Check it out👇 Image
I'll leave you with a visual proof of the Bayes' Theorem!

I hope you'll enjoy it! Image
If you interested in:

- Python 🐍
- MLMLOps 🛠
- CV/NLP 🗣
- LLMs 🧠
- AI Engineering ⚙️

Find me → @akshay_pachaar ✔️
Everyday, I share tutorials on above topics!

Cheers! 🥂

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Akshay 🚀

Akshay 🚀 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @akshay_pachaar

Aug 25
Precision Recall (PR) curve, clearly explained:
A Data Scientist often needs to strike a balance between Precision & Recall & creating a PR-curve is the best way to do so.

Let's understand how to create one today! 🚀 Image
If you already understand the concepts of precision and recall, feel free to skip to the next tweet.

But if not, don't worry—I've got you covered!

You can check my previous post on understanding precision & recall 👇
Read 8 tweets
Aug 22
Let's build a crew of AI agents to scrape the web and write blog posts for you, powered by Llama-3 (100% local):
Before we begin, take a look at what we're about to create!

Here's what you'll learn:

- @Ollama for locally serving a LLM (Llama-3)
- @CrewAIInc for building a multi-agent system
- @LightningAI for development & hosting

Let's go! 🚀
1️⃣ Setting things up:

We configured the LLM to be used by agents (locally served using ollama) and SerperDevTool to provide our agents access to Google search.

Check this out👇 Image
Read 10 tweets
Aug 20
Data Classes in Python, clearly explained:
Data classes can save you hours of writing boilerplate code!

Today, we'll understand what data classes are & how to use them!

Let's go! 🚀 Image
Data Classes are amazing!

They provide:

- Quick initialisation
- Easy comparison
- Concise representation
- And more ...

Check this out👇 Image
Read 6 tweets
Aug 19
Let's learn how to evaluate a RAG application (part 1):

1/n
To evaluate a typical RAG application, we need two things:

- A set of questions
- And ground truth answers for these questions

Let's see how to do it automatically using ragas in this step-by-step guide that follows.

2/n Image
1️⃣ Loading Knowledge Base

We load and chunk the raw data from which we will create our evaluation dataset:

3/n Image
Read 8 tweets
Aug 15
Retrieval Augmented Generation (RAGs), clearly explained:
Imagine creating a ChatGPT-like interface that taps into our own knowledge base to answer our queries.

That's precisely what RAG offers you! ✨

Today, I'll delve into each component required to develop a RAG application and share a working project by the end!

Let's go! 🚀
1️⃣ Custom knowledge base:

Custom Knowledge Base: A collection of relevant and up-to-date information that serves as a foundation for RAG.

It can be a database, a set of documents, or a combination of both. Image
Read 10 tweets
Aug 14
Finetuning LLMs using LoRA, clearly explained:
LoRA (Low-Rank Adaptation) is one of the most powerful techniques when it comes to Fine-Tuning LLMs.

Today I’ll explain:

• What is Lora❓
• How it works ❓
• Followed by a hands-on coding tutorial❗️

But before we do that, let's understand what finetuning means...👇
Fine-tuning is a well-established method in machine learning that leverages the general knowledge the model has learned during its initial training & adapts it to a particular use case.

Here’s a typical representation of traditional Fine-Tuning 👇 Image
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(