Akshay πŸš€ Profile picture
Aug 27 β€’ 9 tweets β€’ 3 min read Twitter logo Read on Twitter
K-Means has two major problems:

- Number of clusters must be known
- Doesn't handle outliers

But there's a solution!

Introducing DBSCAN, a Density based clustering algorithm. πŸš€

Here's an illustrated guide...πŸ‘‡ Image
Simply put, DBSCAN groups together points in a dataset that are close to each other based on their spatial density.

It's very easy to understand, just follow along ...πŸ‘‡
DBSCAN has two important parameters.

1️⃣ Epsilon (eps):

`eps`: represents the maximum distance between two points for them to be considered part of the same cluster.

Points within this distance of each other are considered to be neighbours.

Check this out πŸ‘‡ Image
2️⃣ min_samples:

The minimum number of points that must be present within the eps distance for a point to be considered a core point.

Core points are points that have at least min_samples number of neighbours within the eps distance.

Check this out πŸ‘‡ Image
Now all the points which are not outliers & within in eps reachability of each, become part of the same cluster.

That's it, that's all that DBSCAN is about! πŸŽ‰

Check this image πŸ‘‡ Image
Now that we understand how DBSCAN works, let's see things in action πŸš€

Time for some code πŸ”₯

First we create some dummy data for clustering!

Check this out πŸ‘‡ Image
Applying DBSCAN doesn't get easier πŸš€

Notice that we don't need to worry about number of clusters in the data, it's determined based on density! βœ…

Check this out πŸ‘‡ Image
πŸ”΅ Find Jupyter Notebook πŸ“’ ⬇️

Don't forget to star the repo! 🌟
github.com/patchy631/mach…
That's a wrap!

If you interested in:

- Python 🐍
- Machine Learning πŸ€–
- MLOps πŸ› 
- CV/NLP πŸ—£
- LLMs 🧠

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

I also share a of knowledge around ML, MLOps & LLMs via my Newsletter! (It's FREE)

Check this outπŸ‘‡
mlspring.beehiiv.com/subscribe

β€’ β€’ β€’

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 28
Master Python List Comprehension & code like a pro!

Today, I will clearly explain every detail with code examples! πŸš€

Here's an illustrated guide...πŸ‘‡ Image
Simply put, list comprehension are a concise way to replace multi-line for loops with a single line of code!

And, they are reasonably faster πŸ”₯

A quick look at the Syntax before we break it down with examples!πŸ‘‡ Image
We start with a simple example!

Here we want to create a list of the squares of numbers from 0 to 4.

Check this out πŸ‘‡ Image
Read 8 tweets
Aug 26
A strong foundation in Mathematics can help you excel in the field of Data Science!

Today, I'll share some top FREE resources on Maths for ML.

Topics cover:
- Linear Algebra
- Calculus
- Prob/Stats
- Applied Bayesian Modeling
- Probabilistic Machine Learning

Let's go! πŸš€ Image
1️⃣ Linear Algebra: Gilbert Strang

Arguably, the best linear algebra course out there, taught by MIT's legendary Professor Gilbert Strang.

Check this πŸ‘‡
youtube.com/playlist?list=…
Image
2️⃣ Essence of Linear Algebra: 3Blue1Brown

A free course offering the core concept of linear algebra with a visuals-first approach.

Check this outπŸ‘‡
youtube.com/playlist?list=…
Image
Read 8 tweets
Aug 25
Don't let your model sit idle in your Jupyter Notebook!

Today, we will learn how to deploy any machine learning model in just 5 easy steps.

Let's go! πŸš€ Image
Prerequisites:
- Azure subscription (1 month free)
- Basic knowledge of ML and Python

All the code and artefacts will be provided in a GitHub repo. βœ…

Let's go ... πŸš€
1️⃣ Install Azure Python SDK:

Check this πŸ‘‡ Image
Read 10 tweets
Aug 24
Become a data wrangling pro! πŸ”₯

Eight Pandas operations that get 99% of your job done! πŸš€

-- explained with code snippets --

Let's go! πŸš€ Image
1️⃣ Read/Write | Shuffle/Sample

Reading, writing, shuffling & sampling your data using Pandas.

Check this out πŸ‘‡ Image
2️⃣ df.assign() 🐼

Adding new columns to DataFrame.

Check this outπŸ‘‡ Image
Read 10 tweets
Aug 20
Stanford offers FREE Data Science Education!

World-class courses on:

- Machine Learning
- Computer Vision
- Statistical Learning
- Graph Neural Networks
- Reinforcement Learning
- Natural language processing (NLP)

Read more ...πŸ‘‡ Image
1️⃣ Machine Learning

The best Machine Learning course out there.

Taught by @AndrewYNg, Tested by time & taken by millions.

A great place to start! πŸš€

Check this outπŸ‘‡
youtube.com/playlist?list=…
Image
2️⃣ Databases: Relational Databases & SQL

This course provides an introduction to relational databases and comprehensive coverage of SQL.

Standard query language for relational database systems.

Check this outπŸ‘‡
edx.org/course/databas…
Read 9 tweets
Aug 12
I started my career in Data Science back in 2016 ⏳

Here's a detailed roadmap for those starting out today!

What's covered:

- Python
- Machine Learning
- Maths for ML
- ML Books
- MLOps
- LLMs

Let's go! πŸš€ Image
1️⃣ Python

If you are new to programming and just getting started.

There isn't a better place to learn Python than David J Malan's CS50p.

Beautiful explanations and great projects.
It's a complete package ⚑️

Check this out πŸ‘‡
edx.org/course/cs50s-i…
2️⃣ Machine Learning

If you are already into programming and want to start with machine learning.

@AndrewYNg 's Machine learning specialisation has been tested by time and taken by millions.

Check this out πŸ‘‡
coursera.org/specialization…
Read 12 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 on Twitter!

:(