Akshay πŸš€ Profile picture
Jun 27 β€’ 7 tweets β€’ 3 min read β€’ Read on X
Eigenvalues & Eigenvectors clearly explained:
The concept of eigenvalues & eigenvectors is widely known yet poorly understood!

Today, I'll clearly explain their meaning & significance.

Let's go! πŸš€ Image
In linear algebra, eigenvalues and eigenvectors are ways of capturing the essence of linear transformations.

For any given transformation, we can represent it with a transformation matrix, denoted as 'A', which determines how vectors are transformed.

Here's how it works: Image
Now, imagine a transformation that changes the space but preserves some directions.

These special directions are the eigenvectors, and the scale of stretching or shrinking in these directions is given by eigenvalues.

Here's how we calculate themπŸ‘‡ Image
Now, let's take a real example and put our statement to the test!

In the image below, pay close attention to how the transformation affects eigenvectors compared to regular vectors: Image
Physical Significance! 🌐

From Google's PageRank algorithm to PCA they're everywhere!

In PCA, eigenvalues quantify data variance captured by each principal component, while eigenvectors define the directions of maximum variance.

Implementation below uses eigenvector/values: Image
If you interested in:

- Python 🐍
- ML/MLOps πŸ› 
- CV/NLP πŸ—£
- LLMs/AI Engineering βš™οΈ

Find me β†’ @akshay_pachaar βœ”οΈ

I also write a FREE weekly Newsletter @ML_Spring on AI Engineering!
Join 10k+ readers: mlspring.beehiiv.com
Image

β€’ β€’ β€’

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

Jun 24
f-strings in Python clearly explained:
f-strings were introduced in Python 3.6 and have since become a favorite among developers for their simplicity and readability.

Today, we'll start with the basics and dive into all the ninja tricks of using f-strings.

Let's go! πŸš€ Image
Simply put, f-strings are strings prefixed with 'f' that allow you to embed expressions inside string literals.

Here's an example: Image
Read 10 tweets
Jun 20
Multithreading in Python clearly explained:
Ever felt like your Python code could run faster❓

Multithreading might be the solution you're looking for!

Today, I'll simplify it for you in this step-by-step guide.

Let's go! πŸš€ Image
Let's start with an example where we run a simple function twice sequentially (without threading).

Check this outπŸ‘‡ Image
Read 10 tweets
Jun 17
Object oriented programming in Python, clearly explained:
We break it down to 6 important concepts:

- Object 🚘
- Class πŸ—οΈ
- Inheritance 🧬
- Encapsulation πŸ”
- Abstraction 🎭
- Polymorphism πŸŒ€

Let's take them one-by-one... πŸš€ Image
1️⃣ Object 🚘

Just look around, everything you see can be treated as an object.

For instance a Car, Dog, your Laptop are all objects.

An Object can be defined using 2 things:

- Properties: that describe an object
- Behaviour: the functions that an object can perform

...πŸ‘‡
Read 11 tweets
Jun 13
Let's learn how to evaluate a RAG application:
Here's what we'll do today:

- Build a RAG pipeline using @llama_index
- Evaluate it with @ragas_io
- Implement observability using @ArizePhoenix

Before we dive in, check out this demo:
To evaluate a RAG, you'll need:

- Ground truth QA pairs (eval data)
- A critic LLM (LLM judge)
- An embedding model

We'll assess our RAG pipeline using four key metrics, briefly explained below: Image
Read 9 tweets
Jun 12
Self-attention as a directed graph!

Self-attention is at the heart of transformers, the architecture that led to the LLM revolution that we see today.

In this post, I'll clearly explain self-attention & how it can be thought of as a directed graph.

Read more...πŸ‘‡ Image
Before we start a quick primer on tokenization!

Raw text β†’ Tokenization β†’ Embedding β†’ Model

Embedding is a meaningful representation of each token (roughly a word) using a bunch of numbers.

This embedding is what we provide as an input to our language models.

Check thisπŸ‘‡ Image
The core idea of Language modelling is to understand the structure and patterns within language.

By modeling the relationships between words (tokens) in a sentence, we can capture the context and meaning of the text. Image
Read 9 tweets
Jun 8
Let's compare Llama-3 & Qwen using RAG:
Recently launched Qwen sits at the top of open LLM leaderboard.

Today, we build a Streamlit app to compare it against Llama3 for RAG.

Here's the stack used:

- @Ollama to serve LLMs locally
- @Llama_Index for orchestration
- @LightningAI for development & hosting

Let's go! πŸš€
The architecture presented below illustrates some of the key components & how they interact with each other!

For those who are new, I've provided detailed descriptions & code for each component.

Else you can jump directly to the last second tweet & try it yourself! Image
Read 11 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!

:(