Data Science Tutorials
All tutorials
63 free tutorials, in the order we recommend reading them.
Data Science Tutorial · Data Science Foundations
What is Data Science? A Beginner's Guide with Real Examples
Learn what data science is, how it differs from analytics, ML and statistics, with real Indian examples, runnable Python code and the skills you need.
Data Science Lifecycle: 8 Stages Explained with an Example
The data science lifecycle from problem to monitoring, explained through a gym churn project with a diagram and Python code for every stage.
Applications of Data Science in Real Life: Indian Examples
Real applications of data science in India: UPI fraud checks, recommendations, mandi price forecasts and more, with Python code you can run.
Data Scientist vs Data Analyst vs ML Engineer: Roles Compared
Data scientist vs data analyst vs ML engineer: what each role does daily, the skills and tools it needs, and how to choose the right one for you.
Data Science Tools and Libraries: A Beginner's Toolkit
The data science tools and Python libraries worth learning first: NumPy, pandas, matplotlib, scikit-learn, SQL, Jupyter and Git, and in what order.
Data Science Tutorial · Python for Data Science
NumPy Arrays Explained: Shape, Broadcasting and Speed
NumPy arrays vs Python lists, shape and dtype, vectorisation, broadcasting with a diagram, indexing, boolean masks and a speed test you can run.
Pandas DataFrame Tutorial: loc, iloc, Filters and groupby
Build pandas DataFrames from dicts, select with loc and iloc, filter, add columns, sort, use groupby and fix missing values, with runnable code.
Matplotlib Tutorial: Data Visualization in Python for Beginners
Learn data visualization with matplotlib: Figure and Axes, line, bar, histogram and scatter plots, subplots, labels and saving charts, with examples.
Seaborn Tutorial: Statistical Plots in Python with Examples
A seaborn tutorial for beginners: long-format data, hue, histplot, boxplot, barplot, scatterplot, heatmaps and facets, explained with runnable examples.
Data Science Tutorial · Career Guide
Data Scientist Roadmap: Skills to Learn, Step by Step
A month-by-month data scientist roadmap: Python, pandas, SQL, statistics, ML, the projects to build and how to prepare for data science interviews.
Data Science Projects for Beginners: 8 Ideas with Steps
Eight data science projects for beginners using Indian public data, a four-level project ladder, step-by-step method and a runnable mini project.
Data Science Interview Questions and Answers for Freshers
Data science interview questions with clear answers on statistics, probability, pandas, EDA, ML basics and case studies, plus runnable practice code.
Statistics and EDA · Statistics for Data Science
Statistics for Data Science: Mean, Spread and Distributions
Mean, median, standard deviation, percentiles, the normal distribution and correlation vs causation, each with short NumPy code you can run.
Probability for Data Science: Rules and Python Examples
Learn probability for data science: events, addition and multiplication rules, conditional probability and expected value, with pandas code you can run.
Probability Distributions Explained: Binomial, Poisson, Normal
Binomial, Poisson, normal and exponential distributions explained with PMF, PDF and CDF, a chooser flowchart and Python code that runs without scipy.
Central Limit Theorem Explained with a Python Simulation
See the central limit theorem in action: simulate skewed data in numpy, compute standard error, build confidence intervals and learn when the CLT fails.
Bayes' Theorem Explained with Examples and Python Code
Bayes' theorem made intuitive with a dengue test example, natural frequency trees, spam filtering and Bayesian A/B testing, each with runnable Python.
Hypothesis Testing in Python: p-values, t-tests, Chi-square
Hypothesis testing step by step: null and alternative, p-values, Welch's t-test, chi-square and Type I/II errors, with numpy code that runs in your browser.
A/B Testing for Data Scientists: Design, Sample Size, Analysis
Plan and analyse A/B tests: sample size, random assignment, two-proportion z-test, confidence intervals, peeking and sample ratio mismatch, in Python.
Sampling Techniques in Statistics: Types with Python Examples
Simple random, systematic, stratified, cluster and convenience sampling compared, with sampling bias, sample size formulas and pandas code to try.
Linear Algebra for Data Science: Vectors, Matrices, Python
Linear algebra for data science made practical: vectors, dot products, cosine similarity, matrix multiplication and eigenvectors, with runnable numpy code.
Statistics and EDA · Exploratory Data Analysis
Exploratory Data Analysis (EDA) in Python: A 7-Step Guide
Exploratory data analysis step by step in pandas: structure, quality checks, univariate and bivariate analysis, segments and written findings, with code.
Handling Missing Data in Python: MCAR, MAR, MNAR and Imputation
Handle missing data the right way: spot MCAR, MAR and MNAR, compare median, KNN and iterative imputation, add missing flags and avoid leakage in pipelines.
Outlier Detection Methods: Z-Score, IQR, MAD and Mahalanobis
Outlier detection explained with electricity bills: z-score masking, the IQR rule, modified z-score, Mahalanobis distance and what to do with each outlier.
Data Preprocessing: Feature Scaling and Encoding in Python
Feature scaling and categorical encoding in scikit-learn: StandardScaler vs MinMaxScaler vs RobustScaler, one-hot, ordinal and target encoding, pipelines.
Feature Engineering Techniques for Machine Learning in Python
Feature engineering techniques with pandas: date parts, cyclical sin/cos encoding, ratios, interactions, group aggregates, binning, and how to avoid leakage.
Time Series Analysis in Python: Trend, Seasonality, Forecasts
Time series analysis basics in pandas: trend, seasonality, rolling means, autocorrelation, differencing, time-based splits and a baseline forecast to beat.
Machine Learning Tutorial · Machine Learning Foundations
AI vs ML vs Deep Learning: Differences and Types of Learning
AI vs ML vs deep learning explained with a nested-circles diagram, plus supervised, unsupervised and reinforcement learning labs you can run in Python.
Overfitting and the Bias-Variance Trade-off, with a NumPy Demo
Understand overfitting, underfitting and the bias-variance trade-off by fitting polynomials in NumPy, then fix it with more data, ridge and cross-validation.
Model Evaluation Metrics: Accuracy, F1, ROC-AUC, RMSE and More
Model evaluation metrics with runnable sklearn code: train/test split, confusion matrix, precision, recall, F1, ROC-AUC, MAE, RMSE, R² and when to use each.
Cross-Validation Explained: K-Fold, Stratified and Time Series
Cross-validation explained with runnable scikit-learn code: k-fold, stratified, time series and group splits, leakage-free pipelines and how to read the scores.
Ridge, Lasso and Elastic Net: Regularization in Python
Regularization in machine learning made clear: how ridge shrinks, lasso zeroes and Elastic Net blends coefficients, why scaling matters and how to pick alpha.
Hyperparameter Tuning: Grid, Random and Bayesian Search
Hyperparameter tuning in scikit-learn: GridSearchCV vs RandomizedSearchCV, a hands-on Bayesian optimisation loop, Optuna, and a practical tuning workflow.
Feature Selection in Machine Learning: Filter, Wrapper, Embedded
Feature selection methods in Python: variance and correlation filters, mutual information, RFECV, lasso and permutation importance, plus the leakage trap.
Handling Imbalanced Data: Class Weights, SMOTE and Thresholds
Handle imbalanced data in machine learning: why accuracy fails, class weights, oversampling, undersampling, SMOTE, threshold tuning and PR-AUC, with code.
Machine Learning Tutorial · Supervised Learning
Linear Regression Explained: Least Squares to scikit-learn
Linear regression explained with rickshaw fares and rent data: least squares, coefficients, gradient descent, residual checks and assumptions, in Python.
Logistic Regression Explained: Sigmoid, Odds and Python Code
Logistic regression explained: how the sigmoid turns a score into a probability, odds ratios, log loss, softmax for many classes and the C parameter in sklearn.
K-Nearest Neighbours (KNN) Algorithm Explained with Python
K-nearest neighbours explained: how KNN votes, why scaling matters, how to choose k with cross-validation, KNN regression and the curse of dimensionality.
Naive Bayes Classifier Explained: Bayes Rule to Spam Filter
Naive Bayes classifier explained with a WhatsApp spam filter: priors, likelihoods, Laplace smoothing, Gaussian vs Multinomial NB and scikit-learn code.
Support Vector Machines (SVM) Explained: Margins and Kernels
Support vector machines explained: maximum margin, support vectors, the C parameter, the kernel trick, RBF gamma and when SVMs beat other models, in Python.
Decision Trees Explained: Gini, Entropy and scikit-learn Lab
Decision trees explained with a delivery example: compute Gini and entropy by hand, find the best split, then train DecisionTreeClassifier and print its rules.
Random Forest Explained: Bagging, OOB Score and Importance
Random forest explained: bootstrap samples, random feature splits, the out-of-bag score, how many trees you need, feature importance traps and limits.
Gradient Boosting and XGBoost Explained with Python Code
Gradient boosting explained step by step: residual-fitting trees, learning rate, early stopping, HistGradientBoosting, and what XGBoost adds on top.
Ensemble Learning: Bagging, Boosting and Stacking in Python
Ensemble learning explained: why combining models works, voting, bagging, boosting and stacking with out-of-fold predictions, plus when not to use one.
Machine Learning Tutorial · Unsupervised Learning
K-Means Clustering Explained: Algorithm, Elbow and Silhouette
K-means clustering explained with dark-store planning: the assign and update loop, scaling, choosing k with elbow and silhouette, k-means++ and limits.
Hierarchical Clustering Explained: Dendrograms and Linkage
Hierarchical clustering explained: how agglomerative merging works, reading a dendrogram, single vs complete vs average vs Ward linkage, and cutting the tree.
DBSCAN Clustering Explained: eps, min_samples and Noise
DBSCAN clustering explained: core, border and noise points, choosing eps with a k-distance plot, DBSCAN vs k-means on curved data, and when to use HDBSCAN.
PCA in Machine Learning: Dimensionality Reduction in Python
PCA explained step by step: covariance, eigenvectors, explained variance, choosing components, scaling and pipelines, with runnable numpy and sklearn code.
Anomaly Detection in Machine Learning: Isolation Forest, LOF
Anomaly detection techniques in Python: Isolation Forest, Local Outlier Factor, One-Class SVM, novelty detection, thresholds and how to evaluate detectors.
Machine Learning Tutorial · Advanced ML
Recommender Systems Explained: Collaborative Filtering in Python
How recommender systems work: content-based and collaborative filtering, matrix factorisation, hit rate evaluation and cold start, with runnable Python code.
Transfer Learning Explained: Feature Extraction vs Fine-Tuning
Transfer learning explained: why pretrained layers transfer, feature extraction vs fine-tuning, when to use each, plus PyTorch and Hugging Face examples.
Federated Learning Explained: FedAvg, Privacy and a Python Demo
Federated learning explained: how FedAvg trains one model without moving data, non-IID clients, secure aggregation and real uses, with numpy simulations.
Machine Learning Projects for Beginners (with a Portfolio Plan)
10 machine learning projects for beginners with dataset types, skills and difficulty, plus a GitHub README template and LinkedIn plan to land interviews.
Machine Learning Interview Questions: 30 Answers with Code
30 machine learning interview questions with crisp answers and runnable code: bias-variance, leakage, regularisation, metrics, algorithms and scenarios.
Deep Learning Tutorial · Neural Networks
Neural Network from Scratch in NumPy: Train XOR Step by Step
Build a neural network from scratch in NumPy: neurons, weights, sigmoid, loss, gradient descent and backprop, then train it on XOR and watch the loss fall.
Activation Functions in Neural Networks: ReLU, Sigmoid, GELU
Activation functions explained with NumPy: sigmoid, tanh, ReLU, Leaky ReLU, GELU and softmax, their derivatives, vanishing gradients and which one to pick.
Backpropagation Explained Step by Step, with NumPy Code
Backpropagation explained step by step: the chain rule on a computational graph, matrix gradients for a tiny network, gradient checking and a toy autograd.
Gradient Descent and Optimizers: SGD, Momentum and Adam
Gradient descent optimizers compared in NumPy: batch vs mini-batch SGD, learning rate limits, momentum, RMSProp, Adam and AdamW, plus a PyTorch training loop.
Batch Normalization and Dropout Explained with NumPy Code
Batch normalization and dropout explained: forward passes in NumPy, running statistics, inverted dropout scaling, train vs eval mode and PyTorch usage.
Deep Learning Tutorial · Deep Learning Architectures
Convolutional Neural Networks (CNN) Explained with NumPy
Convolutional neural networks explained: a 2D convolution and pooling written in NumPy, stride, padding, output size, channels and a PyTorch CNN for digits.
RNN and LSTM Explained: Recurrent Neural Networks in NumPy
RNN and LSTM explained with NumPy cell steps: hidden state, backpropagation through time, vanishing gradients, LSTM gates, GRU and a PyTorch forecaster.
Autoencoders Explained: Encoder, Bottleneck and Anomaly Use
Autoencoders explained: train a tiny encoder-decoder in NumPy, compare with PCA, detect anomalies with reconstruction error and meet variational autoencoders.
GANs Explained: Train a Generative Adversarial Network in NumPy
GANs explained: generator vs discriminator, the minimax and non-saturating losses, a toy 1D GAN trained in NumPy, mode collapse and a PyTorch training loop.