Data Science Reality (@Datasreality) header
Data Science Reality (@Datasreality) profile picture

Where Data Science Meets Reality | Dive into AI, ML, Deep Learning | Uncover Real-World Data Insights | Linkedin 90K Followers

Joined October 2023
Photo by Data Science Reality (@Datasreality)Photo by Data Science Reality (@Datasreality)Photo by Data Science Reality (@Datasreality)Photo by Data Science Reality (@Datasreality)Photo by Data Science Reality (@Datasreality)Photo by Data Science Reality (@Datasreality)Photo by Data Science Reality (@Datasreality)Photo by Data Science Reality (@Datasreality)Photo by Data Science Reality (@Datasreality)Photo by Data Science Reality (@Datasreality)
๐Ÿ’ฅ An amazing SQL cheat sheet: #SQL #CheatSheet #DataScience @DataScienceDojo
5
35
3,736
Data Science Reality retweeted
๐—›๐—ผ๐˜„ ๐—ฑ๐—ผ ๐—ก๐—ฒ๐˜‚๐—ฟ๐—ฎ๐—น ๐—ก๐—ฒ๐˜๐˜„๐—ผ๐—ฟ๐—ธ๐˜€ ๐—ฎ๐—ฐ๐˜๐˜‚๐—ฎ๐—น๐—น๐˜† ๐˜๐—ต๐—ถ๐—ป๐—ธ? Everyoneโ€™s heard of them. Few actually get them. No math. No AI jargon. Just a clean mental model to truly understand how they work. Letโ€™s start with a relatable story โ†“ โคท Imagine teaching a kid to recognize cats and dogs You show a picture. The kid stares. Thinks. Says โ€œCat.โ€ Next day, you show another one. This time, the kidโ€™s confused maybe itโ€™s a dog? With time, they start noticing patterns: โ†’ Pointy ears? Could be a cat โ†’ Floppy ears? Probably a dog โ†’ Whiskers? Small paws? Long snout? They learn by feedback. Adjust. Improve. Thatโ€™s exactly what a neural network does. Letโ€™s map this step-by-step: ๐—Ÿ๐—”๐—ฌ๐—˜๐—ฅ ๐Ÿญ: ๐—ง๐—ต๐—ฒ ๐—œ๐—ป๐—ฝ๐˜‚๐˜ ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ This is the modelโ€™s โ€œeyes.โ€ Each pixel in an image โ†’ becomes a number. An image of size 100x100 โ†’ becomes 10,000 numbers. Just like how your eyes capture light and color, the input layer feeds raw data into the system. ๐—Ÿ๐—”๐—ฌ๐—˜๐—ฅ ๐Ÿฎ: ๐—›๐—ถ๐—ฑ๐—ฑ๐—ฒ๐—ป ๐—Ÿ๐—ฎ๐˜†๐—ฒ๐—ฟ๐˜€ (๐˜๐—ต๐—ฒ ๐—ฏ๐—ฟ๐—ฎ๐—ถ๐—ป) Each neuron in this layer tries to extract patterns: โ†ณ One might detect edges โ†ณ Another might detect circular shapes โ†ณ Another starts noticing fur texture And as we stack more layersโ€ฆ They start learning higher-level concepts: โ†ณ Two eyes + triangle ears + fur โ†’ likely a cat โ†ณ Long tongue + floppy ears + big nose โ†’ likely a dog Each layer transforms the data into increasingly useful features. ๐—ช๐—›๐—”๐—ง ๐—”๐—ฅ๐—˜ ๐—ช๐—˜๐—œ๐—š๐—›๐—ง๐—ฆ ๐—”๐—ก๐—— ๐—”๐—–๐—ง๐—œ๐—ฉ๐—”๐—ง๐—œ๐—ข๐—ก๐—ฆ? Think of weights as how much the model โ€œtrustsโ€ a signal. The more useful a feature is (like whiskers for cats), the higher the weight. Activations are like switches. If a neuron sees a strong enough signal, it turns on. If not, it stays silent. Together, these build a brain that pays attention to the right stuff. ๐—ข๐—จ๐—ง๐—ฃ๐—จ๐—ง ๐—Ÿ๐—”๐—ฌ๐—˜๐—ฅ: ๐—ง๐—ต๐—ฒ ๐—”๐—ป๐˜€๐˜„๐—ฒ๐—ฟ The final layer gives you probabilities. โคท 82% Cat โคท 18% Dog But what if itโ€™s wrong? Thatโ€™s where learning kicks in. ๐—˜๐—ฅ๐—ฅ๐—ข๐—ฅ + ๐—™๐—˜๐—˜๐——๐—•๐—”๐—–๐—ž = ๐—œ๐— ๐—ฃ๐—ฅ๐—ข๐—ฉ๐—˜๐— ๐—˜๐—ก๐—ง The model compares its guess with the actual label. It calculates โ€œhow wrongโ€ it was โ†’ then adjusts its weights using backpropagation. Each time it sees more data, it gets slightly better. The goal? To minimize the error โ†’ until the network becomes an expert at prediction. ๐—˜๐—ซ๐—”๐— ๐—ฃ๐—Ÿ๐—˜ ๐—œ๐—ก ๐—”๐—–๐—ง๐—œ๐—ข๐—ก: You feed a neural net 1000s of images of handwritten digits (like 3s, 5s, 9s). You donโ€™t code โ€œhow to recognize a 3โ€. You just show it examples. The model learns: โ†ณ 3 has two curves โ†ณ 5 has a flat top โ†ณ 9 has a loop at the top and a stick below This is pattern learning at scale. ๐—•๐—ข๐—ง๐—ง๐—ข๐—  ๐—Ÿ๐—œ๐—ก๐—˜: A neural network is just a system that: โ†’ Takes input โ†’ Learns patterns โ†’ Adjusts with feedback โ†’ Gets smarter with experience Itโ€™s not magic. Itโ€™s a smart loop of trial โ†’ error โ†’ improvement. Thatโ€™s the brain of AI. And nowโ€ฆ you actually get it. --- Follow @Arifalam4u
1
2
73
Data Science Reality retweeted
๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—–๐—ต๐—ฎ๐˜๐—š๐—ฃ๐—ง ๐—ถ๐˜€ ๐—ฑ๐˜‚๐—บ๐—ฏ. ๐—œ๐˜ ๐—ต๐—ฎ๐˜€ ๐—ป๐—ผ ๐—บ๐—ฒ๐—บ๐—ผ๐—ฟ๐˜† ๐—ผ๐—ณ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ฑ๐—ฎ๐˜๐—ฎ. ๐—œ๐˜ ๐—ด๐˜‚๐—ฒ๐˜€๐˜€๐—ฒ๐˜€. ๐—œ๐˜ ๐—บ๐—ฎ๐—ธ๐—ฒ๐˜€ ๐˜€๐˜๐˜‚๐—ณ๐—ณ ๐˜‚๐—ฝ. ๐—ฌ๐—ผ๐˜‚ ๐—ท๐˜‚๐˜€๐˜ ๐—ฑ๐—ถ๐—ฑ๐—ปโ€™๐˜ ๐—ป๐—ผ๐˜๐—ถ๐—ฐ๐—ฒ ๐—ฏ๐—ฒ๐—ฐ๐—ฎ๐˜‚๐˜€๐—ฒ ๐—ถ๐˜ ๐˜„๐—ฟ๐—ผ๐˜๐—ฒ ๐—ถ๐˜ ๐—ป๐—ถ๐—ฐ๐—ฒ๐—น๐˜†. ๐—ช๐—ฎ๐—ป๐—ป๐—ฎ ๐—บ๐—ฎ๐—ธ๐—ฒ ๐—ถ๐˜ ๐—ฎ๐—ฐ๐˜๐˜‚๐—ฎ๐—น๐—น๐˜† ๐˜€๐—บ๐—ฎ๐—ฟ๐˜? ๐—จ๐˜€๐—ฒ ๐—ฅ๐—”๐—š โ†’ Retrieval-Augmented Generation Letโ€™s break it down โฌ‡๏ธ ๐—ช๐—ต๐˜† ๐—Ÿ๐—Ÿ๐— ๐˜€ ๐—ณ๐—ฎ๐—ถ๐—น ๐˜„๐—ถ๐˜๐—ต ๐—ฟ๐—ฒ๐—ฎ๐—น ๐—ฑ๐—ฎ๐˜๐—ฎ These models were trained on books, forums, Wikipediaโ€ฆ But theyโ€™ve never seen: โ†ณ ๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—ฒ๐—บ๐—ฎ๐—ถ๐—น๐˜€ โ†ณ ๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—ฝ๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐˜ ๐—ฑ๐—ผ๐—ฐ๐˜€ โ†ณ ๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—ฐ๐˜‚๐˜€๐˜๐—ผ๐—บ๐—ฒ๐—ฟ ๐—พ๐˜‚๐—ฒ๐—ฟ๐—ถ๐—ฒ๐˜€ ๐—ฆ๐—ผ ๐˜๐—ต๐—ฒ๐˜† ๐—ด๐˜‚๐—ฒ๐˜€๐˜€. And they guess wrong confidently. ๐—ฅ๐—”๐—š ๐—ณ๐—ถ๐˜…๐—ฒ๐˜€ ๐˜๐—ต๐—ฎ๐˜. ๐—›๐—ฒ๐—ฟ๐—ฒโ€™๐˜€ ๐—ต๐—ผ๐˜„: โ†ณ Take a userโ€™s question โ†ณ Search your private knowledge base for answers โ†ณ Inject the most relevant chunks into the prompt โ†ณ Let the LLM reply with grounded context ๐—ง๐—ต๐—ฒ ๐—Ÿ๐—Ÿ๐—  ๐—ฟ๐—ฒ๐—ฎ๐—ฑ๐˜€ ๐—ฏ๐—ฒ๐—ณ๐—ผ๐—ฟ๐—ฒ ๐—ถ๐˜ ๐˜„๐—ฟ๐—ถ๐˜๐—ฒ๐˜€. ๐—˜๐˜…๐—ฎ๐—บ๐—ฝ๐—น๐—ฒ โ†’ Without RAG: Whatโ€™s the refund policy? Model replies: Refunds not allowed after 14 days. (Made-up nonsense) โ†’ With RAG: Model searches your internal return-policy. pdf, finds the 2024 clause, and answers: Refunds are allowed within 30 days if the product is unopened and in original condition. Same ChatGPT. But now? It actually knows stuff. ๐—ฅ๐—”๐—š ๐—ฃ๐—ถ๐—ฝ๐—ฒ๐—น๐—ถ๐—ป๐—ฒ (๐—ฅ๐—ฒ๐—ฎ๐—น ๐—ฒ๐—ป๐—ด๐—ถ๐—ป๐—ฒ๐—ฒ๐—ฟ๐—ถ๐—ป๐—ด) 1. Ingest โ†ณ Upload your PDFs, Notion docs, Confluence pages, etc. 2. Chunk + Embed โ†ณ Break into readable chunks โ†ณ Convert each chunk to a vector using embedding models (OpenAI, BGE, etc.) 3. Store in Vector DB โ†ณ FAISS, Pinecone, Weaviate use whichever fits your stack 4. Search on Query โ†ณ User types a question โ†ณ You retrieve top relevant chunks (semantic similarity) 5. Augment Prompt โ†ณ Inject the retrieved context into the prompt โ†ณ Then pass it to the LLM for response Thatโ€™s it. Now your bot can access any internal info like a pro. ๐—ช๐—ต๐—ฒ๐—ฟ๐—ฒ ๐—ถ๐˜€ ๐—ฅ๐—”๐—š ๐—ฏ๐—ฒ๐—ถ๐—ป๐—ด ๐˜‚๐˜€๐—ฒ๐—ฑ ๐˜๐—ผ๐—ฑ๐—ฎ๐˜†? โ†ณ Slack AI Search โ†ณ Notion AI โ†ณ GitHub Copilot Chat for private repos โ†ณ Almost every AI chatbot in enterprise Itโ€™s not just useful Itโ€™s the default architecture for grounded, real-world LLM apps --- Follow @Arifalam4u
1
1
50
Data Science Reality retweeted
๐—ง๐—ต๐—ฒ ๐—ฏ๐—ฒ๐˜€๐˜ ๐— ๐—Ÿ ๐—ฎ๐—น๐—ด๐—ผ๐—ฟ๐—ถ๐˜๐—ต๐—บ ๐—ถ๐—ป ๐—ฎ ๐—ฐ๐—ฟ๐—ถ๐˜€๐—ถ๐˜€? ๐—ฅ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ ๐—™๐—ผ๐—ฟ๐—ฒ๐˜€๐˜. No matter if youโ€™re building a fraud detection model or a credit scoring system ๐—ฅ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ ๐—™๐—ผ๐—ฟ๐—ฒ๐˜€๐˜ often beats everything else without deep tuning. Hereโ€™s how it works, ๐—ฎ๐˜€ ๐—ถ๐—ณ ๐˜†๐—ผ๐˜‚โ€™๐—ฟ๐—ฒ ๐—ฒ๐˜…๐—ฝ๐—น๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด ๐—ถ๐˜ ๐˜๐—ผ ๐—ฎ ๐—ฐ๐—ผ๐—น๐—น๐—ฒ๐—ฎ๐—ด๐˜‚๐—ฒ ๐—ง๐—ต๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ฏ๐—น๐—ฒ๐—บ ๐—ช๐—ถ๐˜๐—ต ๐——๐—ฒ๐—ฐ๐—ถ๐˜€๐—ถ๐—ผ๐—ป ๐—ง๐—ฟ๐—ฒ๐—ฒ๐˜€ Decision Trees are simple and powerful. But they tend to overfit. Badly. Theyโ€™ll memorize your training data, split too many times, and get confused by noise. Which means great accuracy on paper, but terrible performance in real-world data. So what if we donโ€™t rely on just one tree? ๐—˜๐—ป๐˜๐—ฒ๐—ฟ: ๐—ฅ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ ๐—™๐—ผ๐—ฟ๐—ฒ๐˜€๐˜ ๐ŸŒฒ๐ŸŒฒ๐ŸŒฒ Imagine ๐Ÿญ๐Ÿฌ๐Ÿฌ different Decision Trees, Each trained on a ๐—ฟ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ ๐˜€๐˜‚๐—ฏ๐˜€๐—ฒ๐˜ of your data Each considering a ๐—ฟ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ ๐˜€๐˜‚๐—ฏ๐˜€๐—ฒ๐˜ of features โ†ณ Thatโ€™s a Random Forest: a collection of weak learners voting together. Why does this work so well? Because randomization โ†’ lowers correlation โ†’ reduces overfitting โ†’ increases generalization. Think of it like this: 1 dumb voter = noisy 100 random voters = surprisingly wise ๐—›๐—ผ๐˜„ ๐—ถ๐˜ ๐—ฎ๐—ฐ๐˜๐˜‚๐—ฎ๐—น๐—น๐˜† ๐˜„๐—ผ๐—ฟ๐—ธ๐˜€ โ†ณ First, we use bootstrapping โ€ƒRandomly sample data (with replacement) to create different training sets โ†ณ Then we build many Decision Trees โ€ƒEach one picks random features at each split โ†ณ Final output? โ€ƒMajority vote for classification โ€ƒAverage value for regression Result: High accuracy, low variance, no manual tuning needed. ๐—ฅ๐—ฒ๐—ฎ๐—น-๐—ช๐—ผ๐—ฟ๐—น๐—ฑ ๐—˜๐˜…๐—ฎ๐—บ๐—ฝ๐—น๐—ฒ Letโ€™s say you work in FinTech. Youโ€™re building a fraud detection model. But fraud patterns change. A simple Decision Tree overfits to old patterns. ๐—ช๐—ถ๐˜๐—ต ๐—ฅ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ ๐—™๐—ผ๐—ฟ๐—ฒ๐˜€๐˜: โ†ณ You feed it transaction history, user metadata, device info โ†ณ It trains 100+ trees โ†ณ Learns generalized patterns of fraud โ†ณ And flags anomalies with surprisingly high precision even on unseen data You just saved your company millions. ๐—ช๐—ต๐—ฒ๐—ป ๐—ฆ๐—ต๐—ผ๐˜‚๐—น๐—ฑ ๐—ฌ๐—ผ๐˜‚ ๐—จ๐˜€๐—ฒ ๐—œ๐˜? โœ… When you need high accuracy out of the box โœ… When you want to avoid heavy tuning โœ… When your data is structured and tabular โœ… When interpretability is less important than performance ๐—•๐—ฒ๐˜€๐˜ ๐—ฃ๐—ฎ๐—ฟ๐˜? Random Forest can also give you feature importance โ†ณ So you learn what actually drives predictions. ๐—ง๐—ถ๐—ฝ: Use ๐—ฆ๐—ฐ๐—ถ๐—ธ๐—ถ๐˜-๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป from sklearn.ensemble import RandomForestClassifier model = RandomForestClassifier(n_estimators=100, max_depth=10) model.fit(X_train, y_train) predictions = model.predict(X_test) โ†ณ Add model.feature_importances_ to see what mattered most. ๐—ง๐—ผ ๐—ฟ๐—ฒ๐—ฐ๐—ฎ๐—ฝ: Random Forest is not โ€œfancyโ€ Itโ€™s just clever, practical, and battle-tested. If youโ€™re not sure where to start with a supervised ML problem Start with Random Forest. Itโ€™ll surprise you with how far it takes you.
1
2
39
Data Science Reality retweeted
๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ถ๐—ป๐—ด ๐— ๐—Ÿ ๐˜„๐—ถ๐˜๐—ต๐—ผ๐˜‚๐˜ ๐˜๐—ถ๐—บ๐—ฒ ๐—ฐ๐—ผ๐—บ๐—ฝ๐—น๐—ฒ๐˜…๐—ถ๐˜๐˜† ๐—ถ๐˜€ ๐—น๐—ถ๐—ธ๐—ฒ ๐—ฐ๐—ผ๐—ฑ๐—ถ๐—ป๐—ด ๐—ฏ๐—น๐—ถ๐—ป๐—ฑ๐—ณ๐—ผ๐—น๐—ฑ๐—ฒ๐—ฑ. You might train the modelโ€ฆ You might get good accuracyโ€ฆ But if you donโ€™t know how the algorithm scales with data, Youโ€™ll end up deploying a model that collapses in production. ๐—Ÿ๐—ถ๐—ป๐—ฒ๐—ฎ๐—ฟ ๐—ฅ๐—ฒ๐—ด๐—ฟ๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป / ๐—Ÿ๐—ผ๐—ด๐—ถ๐˜€๐˜๐—ถ๐—ฐ ๐—ฅ๐—ฒ๐—ด๐—ฟ๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป โ†ณ ๐—ง๐—ถ๐—บ๐—ฒ: ๐‘ถ(๐‘›๐‘“ยฒ + ๐‘“ยณ) if closed-form, ๐‘ถ(๐‘›๐‘“) per iteration in gradient descent Simple, scalable, great for baseline models Struggles only with ultra-high dimensionality (think text data with 100K+ tokens) ๐—ž-๐—ก๐—ฒ๐—ฎ๐—ฟ๐—ฒ๐˜€๐˜ ๐—ก๐—ฒ๐—ถ๐—ด๐—ต๐—ฏ๐—ผ๐—ฟ๐˜€ (๐—ž๐—ก๐—ก) โ†ณ ๐—ง๐—ถ๐—บ๐—ฒ: ๐‘ถ(๐‘›๐‘“) at inference yes, prediction time Thereโ€™s no training cost But the larger your data, the slower your predictions become Imagine a search through 1 million rows per query ๐——๐—ฒ๐—ฐ๐—ถ๐˜€๐—ถ๐—ผ๐—ป ๐—ง๐—ฟ๐—ฒ๐—ฒ โ†ณ ๐—ง๐—ถ๐—บ๐—ฒ: ๐‘ถ(๐‘›๐‘“ log ๐‘›) Very efficient on both training and inference But trees tend to overfit, especially on noisy datasets ๐—ฅ๐—ฎ๐—ป๐—ฑ๐—ผ๐—บ ๐—™๐—ผ๐—ฟ๐—ฒ๐˜€๐˜ โ†ณ ๐—ง๐—ถ๐—บ๐—ฒ: ๐‘ถ(๐‘ก ร— ๐‘›๐‘“ log ๐‘›) โ†’ t = number of trees Training can be parallelized So while itโ€™s heavier than a single tree, itโ€™s still production-grade at scale ๐—š๐—ฟ๐—ฎ๐—ฑ๐—ถ๐—ฒ๐—ป๐˜ ๐—•๐—ผ๐—ผ๐˜€๐˜๐—ฒ๐—ฑ ๐—ง๐—ฟ๐—ฒ๐—ฒ๐˜€ (XGBoost, LightGBM) โ†ณ ๐—ง๐—ถ๐—บ๐—ฒ: ๐‘ถ(๐‘˜๐‘ก ร— ๐‘› log ๐‘›) Outperforms RF on many tasks But the training time can grow with too many boosting rounds (๐‘˜) LightGBM is faster on large, sparse datasets due to leaf-wise splits ๐—ฆ๐—จ๐—ฃ๐—ฃ๐—ข๐—ฅ๐—ง ๐—ฉ๐—˜๐—–๐—ง๐—ข๐—ฅ ๐— ๐—”๐—–๐—›๐—œ๐—ก๐—˜ (๐—ฆ๐—ฉ๐— ) โ†ณ ๐—ง๐—ถ๐—บ๐—ฒ: Worst case ๐‘ถ(๐‘›ยณ) Great for small datasets But scales very poorly with more rows Avoid for big data unless using linear SVM + approximate solvers ๐—ก๐—ฎ๐—ถ๐˜ƒ๐—ฒ ๐—•๐—ฎ๐˜†๐—ฒ๐˜€ โ†ณ ๐—ง๐—ถ๐—บ๐—ฒ: ๐‘ถ(๐‘›๐‘“) Lightning fast, even on huge feature sets Why? No optimization just counting + probabilities Perfect for spam detection, text classification at scale ๐—ž-๐— ๐—ฒ๐—ฎ๐—ป๐˜€ ๐—–๐—น๐˜‚๐˜€๐˜๐—ฒ๐—ฟ๐—ถ๐—ป๐—ด โ†ณ ๐—ง๐—ถ๐—บ๐—ฒ: ๐‘ถ(๐‘›๐‘˜๐‘ก๐‘“) โ†’ k = clusters, t = iterations Scales decently But sensitive to initialization Use k-means++ for smarter centroids and faster convergence ๐—ฃ๐—–๐—” (๐—ฃ๐—ฟ๐—ถ๐—ป๐—ฐ๐—ถ๐—ฝ๐—ฎ๐—น ๐—–๐—ผ๐—บ๐—ฝ๐—ผ๐—ป๐—ฒ๐—ป๐˜ ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜€๐—ถ๐˜€) โ†ณ ๐—ง๐—ถ๐—บ๐—ฒ: ๐‘ถ(๐‘“ยฒ๐‘› + ๐‘“ยณ) Used for dimensionality reduction But gets heavy when features go into tens of thousands If using on image/text data, combine with truncation or randomized SVD ๐—ก๐—ฒ๐˜‚๐—ฟ๐—ฎ๐—น ๐—ก๐—ฒ๐˜๐˜€ (๐— ๐—Ÿ๐—ฃs, CNNs, RNNs) โ†ณ ๐—ง๐—ถ๐—บ๐—ฒ: Varies wildly Basic MLP = ๐‘ถ(๐‘›๐‘™๐‘“ยฒ) where l = layers CNNs depend on filter sizes RNNs = slow for sequence length Use batching, GPU acceleration, and smart layer design to scale deep learning ๐—ง๐—ต๐—ฒ ๐—ง๐—ฎ๐—ธ๐—ฒ๐—ฎ๐˜„๐—ฎ๐˜†? โ†’ ๐——๐—ผ๐—ปโ€™๐˜ ๐—ฝ๐—ถ๐—ฐ๐—ธ ๐—ฎ๐—น๐—ด๐—ผ๐—ฟ๐—ถ๐˜๐—ต๐—บ๐˜€ ๐—ฏ๐—ฎ๐˜€๐—ฒ๐—ฑ ๐—ผ๐—ป ๐—ฎ๐—ฐ๐—ฐ๐˜‚๐—ฟ๐—ฎ๐—ฐ๐˜† ๐—ฎ๐—น๐—ผ๐—ป๐—ฒ --- Follow @Arifalam4u
1
5
124
Data Science Reality retweeted
๐—ฆ๐—ค๐—Ÿ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐—–๐—ต๐—ฒ๐—ฎ๐˜๐—ฆ๐—ต๐—ฒ๐—ฒ๐˜ (๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฑ ๐—˜๐—ฑ๐—ถ๐˜๐—ถ๐—ผ๐—ป) ๐—Ÿ๐—ฒ๐˜โ€™๐˜€ ๐—ฏ๐—ฒ ๐—ต๐—ผ๐—ป๐—ฒ๐˜€๐˜: ๐—ฆ๐—ค๐—Ÿ ๐—ฐ๐—ฎ๐—ป ๐—บ๐—ฎ๐—ธ๐—ฒ ๐—ผ๐—ฟ ๐—ฏ๐—ฟ๐—ฒ๐—ฎ๐—ธ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ถ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„. โžค ๐—๐—ข๐—œ๐—ก๐˜€ ๐—ฎ๐—ฟ๐—ฒ ๐—ฎ ๐—ณ๐—ฎ๐˜ƒ๐—ผ๐—ฟ๐—ถ๐˜๐—ฒ ๐—พ๐˜‚๐—ฒ๐˜€๐˜๐—ถ๐—ผ๐—ป โŸถ INNER JOIN: Returns matching rows โŸถ LEFT JOIN: All rows from left + matched from right โŸถ RIGHT JOIN: All rows from right + matched from left โŸถ FULL JOIN: All rows with matches from both โŸถ SELF JOIN: Join table with itself Pro tip: Add ON conditions carefully or get a cartesian disaster โžค ๐—ช๐—ถ๐—ป๐—ฑ๐—ผ๐˜„ ๐—™๐˜‚๐—ป๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐—ฎ๐—ฟ๐—ฒ ๐—ฎ๐—ฑ๐˜ƒ๐—ฎ๐—ป๐—ฐ๐—ฒ๐—ฑ ๐—ฝ๐—น๐˜‚๐˜€ ๐—ฒ๐—ฎ๐˜€๐˜† ๐˜€๐—ฐ๐—ผ๐—ฟ๐—ฒ โŸถ ROW_NUMBER() OVER(PARTITION BY dept ORDER BY salary DESC) โŸถ RANK(), DENSE_RANK(), LAG(), LEAD() Use case: Find second-highest salary per department Why itโ€™s asked: Checks if you understand partitioning โžค ๐—–๐—ผ๐—บ๐—บ๐—ผ๐—ป ๐—ง๐—ฎ๐—ฏ๐—น๐—ฒ ๐—˜๐˜…๐—ฝ๐—ฟ๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป (๐—–๐—ง๐—˜) WITH top_emps AS ( SELECT name, salary, RANK() OVER(PARTITION BY dept ORDER BY salary DESC) AS rnk FROM employees ) SELECT * FROM top_emps WHERE rnk = 1; Bonus: Cleaner than subqueries, super readable โžค ๐—ง๐—ฟ๐—ถ๐—ฐ๐—ธ๐˜† ๐—ค๐˜‚๐—ฒ๐˜€๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐—ฌ๐—ผ๐˜‚ ๐— ๐—จ๐—ฆ๐—ง ๐—ฝ๐—ฟ๐—ฎ๐—ฐ๐˜๐—ถ๐—ฐ๐—ฒ โŸถ Find second highest salary โŸถ Detect duplicates โŸถ Running total by date โŸถ Find employees who never submitted reports โŸถ Department with highest avg salary โŸถ Show top 3 items sold per category โŸถ Users active 3 days in a row โžค ๐—š๐—ฟ๐—ผ๐˜‚๐—ฝ๐—ถ๐—ป๐—ด ๐—ฎ๐—ป๐—ฑ ๐—”๐—š๐—š๐—ฅ๐—˜๐—š๐—”๐—ง๐—˜๐—ฆ โŸถ GROUP BY, HAVING, COUNT(DISTINCT ...) โŸถ GROUPING SETS, CUBE, ROLLUP for advanced analysis โŸถ Aggregate + CASE combo to count conditionally โžค ๐——๐—”๐—ง๐—˜๐—ฆ + ๐—ฆ๐—จ๐—•๐—ค๐—จ๐—˜๐—ฅ๐—œ๐—˜๐—ฆ + ๐—˜๐—ซ๐—œ๐—ฆ๐—ง๐—ฆ โŸถ DATE_DIFF(), CURRENT_DATE, DATE_TRUNC() โŸถ WHERE EXISTS (...) to filter on child records โŸถ Subqueries in SELECT and WHERE โ€” but use wisely โžค ๐——๐—˜๐—•๐—จ๐—š๐—š๐—œ๐—ก๐—š ๐—ฆ๐—ž๐—œ๐—Ÿ๐—Ÿ โŸถ Check joins: run SELECT COUNT(*) before & after โŸถ Run in parts: test subqueries in isolation โŸถ Check NULL handling: COALESCE() or logic fails โžค ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐—ง๐—œ๐—ฃ๐—ฆ โŸถ Always explain your approach first โŸถ If stuck: narrate your thought process โŸถ Use LIMIT 5 to validate outputs โŸถ Ask: โ€œCan I assume table names and structure?โ€ โžค ๐—•๐—ผ๐—ป๐˜‚๐˜€: ๐— ๐—จ๐—ฆ๐—ง-๐—ž๐—ก๐—ข๐—ช ๐—–๐—ข๐— ๐— ๐—”๐—ก๐——๐—ฆ DISTINCT, CASE, IS NULL, BETWEEN, IN, ANY, ALL, CAST(), LIKE, REGEXP ๐—–๐—ผ๐—บ๐—ฝ๐—ฎ๐—ป๐—ถ๐—ฒ๐˜€ ๐—น๐—ผ๐˜ƒ๐—ฒ ๐—ฐ๐—ฎ๐—ป๐—ฑ๐—ถ๐—ฑ๐—ฎ๐˜๐—ฒ๐˜€ ๐˜„๐—ต๐—ผ ๐—ฐ๐—ฎ๐—ป ๐—ฟ๐—ฒ๐—ฎ๐—ฑ + ๐—ฑ๐—ฒ๐—ฏ๐˜‚๐—ด ๐—ฐ๐—ผ๐—บ๐—ฝ๐—น๐—ฒ๐˜… ๐—ค๐—จ๐—˜๐—ฅ๐—œ๐—˜๐—ฆ. Itโ€™s not about knowing everything itโ€™s about solving smartly. --- That's a wrap!! - Python ๐Ÿ - AI/ML ๐Ÿค– - Data Science ๐Ÿผ - SW Dev ๐Ÿ›  - AI Tools ๐Ÿงฐ - Roadmap โ—๏ธ Find me โ†’ @Arifalam4u โœ”๏ธ Everyday, I share post on above topics. ๐‘๐ž๐ฌ๐จ๐ฎ๐ซ๐œ๐ž๐ฌ ๐ญ๐จ ๐†๐ž๐ญ ๐’๐ญ๐š๐ซ๐ญ๐ž๐ ๐Ÿ“• 400+ ๐——๐—ฎ๐˜๐—ฎ ๐—ฆ๐—ฐ๐—ถ๐—ฒ๐—ป๐—ฐ๐—ฒ ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€: lnkd.in/gv9yvfdd ๐Ÿ“ธ/ Datalemur. com
1
2
6
124
This is wild. OpenAI just dropped Deep Research and it is powered by a fine-tuned o3 model (NOT o3-mini) ๐Ÿคฏ
1
107
Data Science Reality retweeted
A problem from Canadian Math Olympiad. Without using a computer, evaluate the following sum.
19
94
11
1,154
145,245
Do computer architecture course atleast once in your life. It fills in so many gaps and enhances fundamental understanding of computer science and software development
66
Applied Machine Learning - Cornell CS5785 "Starting from the very basics, covering all of the most important ML algorithms and how to apply them in practice. Executable Jupyter notebooks (and as slides)". 80 videos!!
62
Data Science Reality retweeted
Imagine an object with finite volume but infinite surface area. Gabriel's Horn is so beautiful. ๐Ÿ˜ [bit.ly/384Mk3n]
26
276
26
1,972
97,144
Simple Linear Regression explained
34
Data Science Reality retweeted
Python cheat sheet for download (bookmark).
1
3
144
Data Science Reality retweeted
Here are 3 Ways to Count Rows:
1
2
89
10 Books for Software Developers
1
25
Data Science Reality retweeted
Logistic Regression
2
5
302
Getting Started With Python
38
Data Science Reality retweeted
Python Numpy Cheat Sheet Learn more here: ailearninghub.io
1
3
247
Data Science Reality retweeted
What is a deadlock?
1
2
203
Bash scripting loops basics
23
The best way to learn #machinelearning is to: Avoid popular content that oversimplifies concepts, especially when written by individuals with no real ML experience. Dive into high-quality books and work through them diligently. While it may be challenging at first, the effort will pay off in the long run. As @karpathy recently noted, steer clear of entertainment disguised as โ€œcourses.โ€ True learning is a gradual process that requires genuine effort and dedication #machinelearning
28
196
12
1,724
157,080