📌 Geospatial exploratory data analysis with GeoPandas and DuckDB
🗂 Category: PROGRAMMING
🕒 Date: 2025-12-15 | ⏱️ Read time: 13 min read
In this article, I’ll show you how to use two popular Python libraries to carry…
#DataScience #AI #Python
🗂 Category: PROGRAMMING
🕒 Date: 2025-12-15 | ⏱️ Read time: 13 min read
In this article, I’ll show you how to use two popular Python libraries to carry…
#DataScience #AI #Python
❤2
📌 Lessons Learned from Upgrading to LangChain 1.0 in Production
🗂 Category: AGENTIC AI
🕒 Date: 2025-12-15 | ⏱️ Read time: 5 min read
What worked, what broke, and why I did it
#DataScience #AI #Python
🗂 Category: AGENTIC AI
🕒 Date: 2025-12-15 | ⏱️ Read time: 5 min read
What worked, what broke, and why I did it
#DataScience #AI #Python
❤2
Machine Learning Fundamentals.pdf
22.6 MB
Machine Learning Fundamentals
A structured Machine Learning Fundamentals guide covering core concepts, intuition, math basics, ML algorithms, deep learning, and real-world workflows.
https://news.1rj.ru/str/DataScienceM 🩷
A structured Machine Learning Fundamentals guide covering core concepts, intuition, math basics, ML algorithms, deep learning, and real-world workflows.
https://news.1rj.ru/str/DataScienceM 🩷
❤2
Tip: Optimize PyTorch Model Performance with
Explanation:
Example:
━━━━━━━━━━━━━━━
By: @DataScienceM ✨
torch.compileExplanation:
torch.compile (introduced in PyTorch 2.0) is a powerful JIT (Just-In-Time) compiler that automatically transforms your PyTorch model into highly optimized, high-performance code. It works by analyzing your model's computation graph, fusing operations, eliminating redundant computations, and compiling them into efficient kernels (e.g., using Triton for GPU acceleration). This significantly reduces Python overhead and improves memory locality, leading to substantial speedups (often 30-50% or more) during training and inference, especially on GPUs and for larger models, without requiring changes to your model architecture or training loop. The primary dynamic mode intelligently compiles subgraphs as they are encountered, providing a balance of performance and flexibility.Example:
import torch
import torch.nn as nn
import time
# Define a simple neural network
class SimpleNet(nn.Module):
def __init__(self):
super().__init__()
self.fc1 = nn.Linear(1024, 2048)
self.relu = nn.ReLU()
self.fc2 = nn.Linear(2048, 1024)
self.dropout = nn.Dropout(0.2)
def forward(self, x):
x = self.fc1(x)
x = self.relu(x)
x = self.dropout(x)
x = self.fc2(x)
return x
# Prepare model and dummy data
device = "cuda" if torch.cuda.is_available() else "cpu"
model = SimpleNet().to(device)
dummy_input = torch.randn(128, 1024).to(device)
dummy_target = torch.randn(128, 1024).to(device)
optimizer = torch.optim.Adam(model.parameters(), lr=0.001)
criterion = nn.MSELoss()
num_iterations = 50
# --- Benchmark without torch.compile ---
print(f"--- Running without torch.compile on {device} ---")
start_time = time.time()
for _ in range(num_iterations):
optimizer.zero_grad()
output = model(dummy_input)
loss = criterion(output, dummy_target)
loss.backward()
optimizer.step()
if device == "cuda":
torch.cuda.synchronize() # Wait for GPU ops to complete
time_uncompiled = time.time() - start_time
print(f"Time without compile: {time_uncompiled:.4f} seconds\n")
# --- Benchmark with torch.compile ---
# Apply torch.compile to the model. This happens once upfront.
# The default backend 'inductor' is typically the best performing.
compiled_model = torch.compile(model)
# Ensure optimizer is correctly set up for the compiled model's parameters
# (in this case, `compiled_model` shares parameters with `model`, so no re-init needed if parameters are the same object)
print(f"--- Running with torch.compile on {device} ---")
start_time = time.time()
for _ in range(num_iterations):
optimizer.zero_grad()
output = compiled_model(dummy_input) # Use the compiled model
loss = criterion(output, dummy_target)
loss.backward()
optimizer.step()
if device == "cuda":
torch.cuda.synchronize() # Wait for GPU ops to complete
time_compiled = time.time() - start_time
print(f"Time with compile: {time_compiled:.4f} seconds")
if time_uncompiled > 0:
print(f"\nSpeedup: {time_uncompiled / time_compiled:.2f}x")
━━━━━━━━━━━━━━━
By: @DataScienceM ✨
❤5
📌 The Machine Learning “Advent Calendar” Day 15: SVM in Excel
🗂 Category: MACHINE LEARNING
🕒 Date: 2025-12-15 | ⏱️ Read time: 12 min read
Instead of starting with margins and geometry, this article builds the Support Vector Machine step…
#DataScience #AI #Python
🗂 Category: MACHINE LEARNING
🕒 Date: 2025-12-15 | ⏱️ Read time: 12 min read
Instead of starting with margins and geometry, this article builds the Support Vector Machine step…
#DataScience #AI #Python
❤3
📌 When (Not) to Use Vector DB
🗂 Category: LARGE LANGUAGE MODELS
🕒 Date: 2025-12-16 | ⏱️ Read time: 8 min read
When indexing hurts more than it helps: how we realized our RAG use case needed…
#DataScience #AI #Python
🗂 Category: LARGE LANGUAGE MODELS
🕒 Date: 2025-12-16 | ⏱️ Read time: 8 min read
When indexing hurts more than it helps: how we realized our RAG use case needed…
#DataScience #AI #Python
❤2
📌 Separate Numbers and Text in One Column Using Power Query
🗂 Category: DATA SCIENCE
🕒 Date: 2025-12-16 | ⏱️ Read time: 6 min read
An Excel sheet with a column containing numbers and text? What a mess!
#DataScience #AI #Python
🗂 Category: DATA SCIENCE
🕒 Date: 2025-12-16 | ⏱️ Read time: 6 min read
An Excel sheet with a column containing numbers and text? What a mess!
#DataScience #AI #Python
❤1👍1
📌 The Machine Learning “Advent Calendar” Day 16: Kernel Trick in Excel
🗂 Category: MACHINE LEARNING
🕒 Date: 2025-12-16 | ⏱️ Read time: 8 min read
Kernel SVM often feels abstract, with kernels, dual formulations, and support vectors. In this article,…
#DataScience #AI #Python
🗂 Category: MACHINE LEARNING
🕒 Date: 2025-12-16 | ⏱️ Read time: 8 min read
Kernel SVM often feels abstract, with kernels, dual formulations, and support vectors. In this article,…
#DataScience #AI #Python
📌 Lessons Learned After 8 Years of Machine Learning
🗂 Category: MACHINE LEARNING
🕒 Date: 2025-12-16 | ⏱️ Read time: 7 min read
Deep work, over-identification, sports, and blogging
#DataScience #AI #Python
🗂 Category: MACHINE LEARNING
🕒 Date: 2025-12-16 | ⏱️ Read time: 7 min read
Deep work, over-identification, sports, and blogging
#DataScience #AI #Python
❤1
📌 A Practical Toolkit for Time Series Anomaly Detection, Using Python
🗂 Category: DATA SCIENCE
🕒 Date: 2025-12-17 | ⏱️ Read time: 9 min read
Here’s how to detect point anomalies within each series, and identify anomalous signals across the…
#DataScience #AI #Python
🗂 Category: DATA SCIENCE
🕒 Date: 2025-12-17 | ⏱️ Read time: 9 min read
Here’s how to detect point anomalies within each series, and identify anomalous signals across the…
#DataScience #AI #Python
📌 The Machine Learning “Advent Calendar” Day 17: Neural Network Regressor in Excel
🗂 Category: MACHINE LEARNING
🕒 Date: 2025-12-17 | ⏱️ Read time: 7 min read
Neural networks often feel like black boxes. In this article, we build a neural network…
#DataScience #AI #Python
🗂 Category: MACHINE LEARNING
🕒 Date: 2025-12-17 | ⏱️ Read time: 7 min read
Neural networks often feel like black boxes. In this article, we build a neural network…
#DataScience #AI #Python
📌 Production-Grade Observability for AI Agents: A Minimal-Code, Configuration-First Approach
🗂 Category: AGENTIC AI
🕒 Date: 2025-12-17 | ⏱️ Read time: 12 min read
LLM-as-a-Judge, regression testing, and end-to-end traceability of multi-agent LLM systems
#DataScience #AI #Python
🗂 Category: AGENTIC AI
🕒 Date: 2025-12-17 | ⏱️ Read time: 12 min read
LLM-as-a-Judge, regression testing, and end-to-end traceability of multi-agent LLM systems
#DataScience #AI #Python