TGViewer
Channel Public Channel
Data science/ML/AI

Data science/ML/AI

@datascience_bds

Data science and machine learning hub

Python, SQL, stats, ML, deep learning, projects, PDFs, roadmaps and AI resources.

For beginners, data scientists and ML engineers
πŸ‘‰ https://rebrand.ly/bigdatachannels

DMCA: @disclosure_bds
Contact: @mldatascientist
Subscribers
14.1K
Photos
610
Videos
7
Links
341

Showing posts older than #1141 Β· Back to latest

Older Posts 20 shown
Post #1140 2.21K
⚑️Data Lake

A data lake is a centralized storage system that keeps raw data in its original format.

Think of it like a giant digital reservoir where you dump data first and decide what to do with it later.

The core idea is: Store now. Structure when needed.

Where it is used:

βž–Big data platforms
βž–Machine learning pipelines
βž–Analytics systems
βž–Event and log storage
βž–IoT data ingestion

It's purpose is to store massive volumes of structured, semi structured, and unstructured data cheaply and flexibly.

How it works (simple flow):

1. Data comes from many sources
2. Stored in raw form in the lake
3. Processed or transformed when needed
4. Consumed by analysts, ML models, or dashboards

⚠️Things you must know:

πŸ‘‰ It's not the same as a data warehouse
πŸ‘‰Schema is applied on read, not on write
πŸ‘‰ Very scalable and low cost
πŸ‘‰Can become a "data swamp" without governance
πŸ‘‰ Works best with strong metadata management

βœ…Mental model:
Data warehouse = bottled water (clean and ready)
Data lake = natural lake (raw but powerful)
  • ❀ 6
Post #1138 2.24K
πŸ” K-Fold Cross Validation

K-Fold exists to answer one honest question:

Will this model work on unseen data?


A single train/test split is unreliable, especially with small datasets.
So K-Fold simulates multiple β€œfuture tests” using the same data.

🧠 What It Really Does

Instead of one split, we:

πŸ”€ Divide data into K folds
πŸ” Train the model K times
πŸ“¦ Each time: one fold validates, the rest train
πŸ“Š Average the scores

Every sample gets validated once, which reduces evaluation noise and gives a more trustworthy estimate.

Important: It improves evaluation, not the model itself.

⚠️ What People Often Miss

🚫 Do NOT use K-Fold as your final test. Keep a separate test set
βš–οΈ Use Stratified K-Fold for imbalanced classification.
⏳ Do NOT use standard K-Fold for time series.
πŸ“Š K = 5 or 10 is usually enough.


βœ… In short K-Fold is just:

A smart way to reuse limited data to simulate multiple real-world tests.

No magic. Just careful evaluation.
  • ❀ 7
  • πŸ‘ 1
Post #1136 2.15K
VC Dimension

In theory courses, VC dimension appears abstract.
But it answers a deep question:
How complex is your model’s decision boundary?


VC dimension measures the largest number of points a model can shatter (perfectly classify in all labelings).

Why this is important❔

Two models with similar parameter counts can have very different capacities.

For example:

πŸ“¦ k-NN β†’ very high effective capacity
πŸ“ Linear classifier β†’ limited capacity
🌳 Deep trees β†’ extremely high capacity

What you need to understand

Generalization depends on capacity relative to data size.
Too much capacity with little data leads to overfitting.

βœ… VC dimension is about expressive power, not just number of parameters.
  • ❀ 4
Post #1133 2.28K
LLMs are getting insanely popular lately and suddenly everyone is talking about AI, chatbots, copilots, agents… so let’s clear it up πŸ‘‡

So what are LLMs really? πŸ€”

LLMs = Large Language Models

Think of them as insanely smart text prediction machines that learned from tons of books, code, docs, and conversations πŸ“šπŸ’»

Why everyone is obsessed right now πŸ”₯
β€’ They can write code πŸ§‘β€πŸ’»
β€’ Explain complex stuff like a friend πŸ—£
β€’ Analyze data πŸ“Š
β€’ Power chatbots, copilots, agents πŸ€–
β€’ One model, MANY tasks

Why they exploded now πŸš€
β€’ GPUs got better and cheaper
β€’ Open source models became really good
β€’ Companies realized: this saves time and money πŸ’°

The most famous LLMs you hear about πŸ‘€
β€’ GPT-4 / GPT-4.1 by OpenAI
β€’ Claude 3 by Anthropic
β€’ Gemini by Google
β€’ LLaMA 3 by Meta
β€’ Mistral by Mistral AI

Where LLMs are actually used today πŸ› 
β€’ Chatbots and AI assistants
β€’ Writing SQL and Python
β€’ Data analysis and reporting
β€’ Customer support automation
β€’ Internal company tools

Important truth πŸ’‘
LLMs are not magic πŸͺ„
They are very powerful autocomplete with reasoning skills.

Learn how to use them properly and you are already ahead of most people πŸ˜‰
  • ❀ 11
Post #1132 2.01K
🧠 LayerNorm vs BatchNorm: Same Goal, Different Behavior

Both techniques normalize activations, but they operate differently.

Batch Normalization

πŸ“¦ Normalizes across the batch
⚑️ Depends on batch statistics
πŸ–Ό Works very well in CNNs
⚠️ Sensitive to small batch sizes

Layer Normalization

πŸ”¬ Normalizes across features per sample
πŸ“ Independent of batch size
πŸ€– Preferred in transformers and NLP
βœ… Stable for sequence models

Why transformers use LayerNorm❔

Sequence models often run with variable or small batches.
LayerNorm avoids reliance on batch statistics and stays stable.

βœ… Rule of thumb

πŸ–Ό CNNs β†’ BatchNorm
πŸ€– Transformers β†’ LayerNorm

πŸ“Œ They look similar mathematically but normalize along different axes.
  • ❀ 5
Post #1130 2.34K
Generative AI 101 in 10 Terms
  • ❀ 8
Post #1129 2.43K
βš‘οΈπŸ“Š One Line Feature Scaling

Scaling features without touching sklearn πŸ‘€

df["age_scaled"] = (df["age"] - df["age"].mean()) / df["age"].std()


Why it is useful:
β€’ Quick experiments
β€’ Better intuition
β€’ No pipeline overhead
  • ❀ 7
Post #1127 2.66K
Python for Data Analytics: The Ultimate Library Ecosystem (2026 Edition)

This wheel is the Python data stack that's recommended from raw scraping to production insights:

➑️ Data Manipulation β†’ Pandas, Polars (the fast successor), NumPy

➑️ Visualization β†’ Matplotlib, Seaborn, Plotly (interactive dashboards)

➑️ Analysis β†’ SciPy, Statsmodels, Pingouin

➑️ Time Series β†’ Darts, Kats, Tsfresh, sktime

➑️ NLP β†’ NLTK, spaCy, TextBlob, transformers (BERT & friends)

➑️ Web Scraping β†’ BeautifulSoup, Scrapy, Selenium

πŸ”₯ Pro tip from real projects:
πŸ‘‰Switch to Polars when Pandas starts choking on >1 GB datasets
πŸ‘‰ Use Plotly + Dash when stakeholders want interactive reports
πŸ‘‰ Combine Darts + Tsfresh for serious time-series feature engineering
  • ❀ 7
Post #1124 2.47K
Type of Data Professionals
  • ❀ 10
  • πŸ”₯ 2
Post #1123 2.38K
πŸ€―πŸ“ˆ Detect Outliers in 5 Lines

Simple Z score based outlier detection.

import numpy as np

z = (df["salary"] - df["salary"].mean()) / df["salary"].std()
outliers = df[np.abs(z) > 3]


Why this matters:
β€’ Clean data
β€’ Better models
β€’ Fewer surprises in production

Small code. Big impact.
  • ❀ 8
Post #1122 2.22K
Pre-Chunking vs. Post-Chunking (On-Demand Chunking)

This visual breaks down two common ways to chunk documents in Retrieval-Augmented Generation (RAG) systems,and when each makes sense.

Pre-Chunking
Documents are cleaned, split into chunks, embedded, and stored ahead of time.
β€’  Pros: Fast retrieval at query time, simpler runtime pipeline.
β€’  Cons: Rigid,changing chunk size or strategy means reprocessing the entire dataset.
β€’  Best for: Stable datasets, high-throughput apps, predictable queries.

Post-Chunking / On-Demand Chunking
Documents are stored whole; chunking happens after retrieval based on the user’s query.
β€’  Pros: More flexible and query-aware, often more relevant context.
β€’  Cons: Higher latency and infrastructure complexity.
β€’  Best for: Evolving content, exploratory queries, precision-focused use cases.

πŸ”‘ Takeaway:
There’s no one-size-fits-all. If speed and scale matter most, pre-chunk. If adaptability and relevance are key, post-chunk. Many production systems even combine both.
  • ❀ 5
Post #1121 1.99K
Layers of AI
  • πŸ”₯ 7
  • πŸ† 3
Older posts β†’
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook β†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 β†’