cchakri.aiLearn All courses
// COURSE · AI & DATA

Machine Learning

A hands-on foundation in data preparation, supervised learning, evaluation, and responsible deployment.

01

Problem framing and data

Syllabus

  1. 01Translate a question into a learning task
  2. 02Prepare and split a dataset
  3. 03Build a baseline and feature pipeline

Detailed content

Translate a question into a learning task

Decide what the model should predict, for whom, and at what point the prediction will be used. Identify the unit of prediction, available features, target label, and cost of errors. A model is useful only if its output changes a decision better than a simple rule or existing process.

Prepare and split a dataset

Inspect types, missing values, duplicates, class balance, and label quality before training. Split examples into training, validation, and test sets in a way that reflects deployment: time-based for future prediction, grouped when entities repeat, and stratified when class balance matters. Keep the final test set untouched until evaluation.

Build a baseline and feature pipeline

A baseline establishes the performance a model must beat. Use simple rules or a basic estimator first. Fit preprocessing only on training data, then apply the learned transform to validation and test data. Package feature steps with the model so inference uses the same transformations as training.

02

Regression and classification

Syllabus

  1. 01Linear and logistic regression
  2. 02Decision trees and ensembles
  3. 03Feature engineering and preprocessing

Detailed content

Linear and logistic regression

Linear regression predicts a numeric value from weighted features; logistic regression maps a linear score to a probability for classification. Coefficients can be inspected, but correlated features and scaling affect interpretation. Regularization shrinks coefficients to reduce variance. Compare against a baseline and check whether assumptions fit the data.

Decision trees and ensembles

A decision tree recursively splits features to create regions with similar outcomes. Trees handle nonlinear relationships but can overfit. Random forests average many varied trees; gradient boosting adds trees to correct previous errors. Tune depth and learning rate using validation data and assess whether complexity improves real generalization.

Feature engineering and preprocessing

Encoding converts categories into model-readable representations; scaling puts numeric features on comparable ranges for methods that depend on distance or gradients. Imputation handles missing values using a rule learned from training data. Build transformations in a pipeline to prevent leakage and keep production behavior consistent.

03

Unsupervised learning and evaluation

Syllabus

  1. 01Clustering and dimensionality reduction
  2. 02Metrics and threshold selection
  3. 03Cross-validation and error analysis

Detailed content

Clustering and dimensionality reduction

Clustering groups examples based on a distance or similarity measure, but groups are not automatically meaningful categories. Scale features appropriately and inspect cluster stability. Dimensionality reduction compresses correlated features; use it to explore structure or improve a pipeline, while checking what information is lost.

Metrics and threshold selection

For classification, accuracy can conceal poor minority-class performance. Precision measures how often positive predictions are correct; recall measures how many actual positives are found. ROC-AUC and PR-AUC summarize ranking behavior. Select a threshold using validation data and the real costs of false positives and false negatives.

Cross-validation and error analysis

Cross-validation trains and validates across multiple folds to estimate variability when data is limited. Keep related or time-ordered observations together to avoid leakage. Inspect errors by segment, feature range, and label source. Error analysis reveals data problems and systematic weaknesses that a single aggregate score hides.

04

Production machine learning

Syllabus

  1. 01Model selection and reproducibility
  2. 02Serve predictions
  3. 03Monitoring, drift, and responsible use

Detailed content

Model selection and reproducibility

Tune a limited set of candidates using validation data, then compare performance, latency, memory, and maintainability. Record data version, code, parameters, and random seeds. Reproducibility makes results auditable and helps determine whether an apparent improvement came from the model or a changed experiment.

Serve predictions

Batch inference scores many examples together; online inference serves a request under a latency target. Define input validation, timeout, fallback, and version behavior. Package the preprocessing and estimator together. Load-test realistic request patterns and ensure model deployment can be rolled back independently of unrelated application changes.

Monitoring, drift, and responsible use

Monitor input distributions, missing features, prediction rates, latency, and outcomes when labels arrive. Data drift may signal a changing environment; it does not by itself prove quality has fallen. Review performance across relevant groups, protect sensitive data, and establish human escalation for decisions with significant consequences.