Machine Learning Fundamentals

</>Coding Tamilan.← AI course & curriculum

AI · LESSON 04 / 25 · English

Machine Learning Fundamentals

Learn a pattern, then test whether it travels.

Beginner-friendly explanationsAI method + worked scenarioPractice + answer

Content reviewed: 22 October 2026 · தமிழில் படிக்க ↗

01 / THE IDEA

Understand it in plain language

A machine-learning model fits parameters from data. Features describe an input; a target is the outcome we want to estimate. Training is the fitting process, and inference applies the fitted model to an input. Good training performance is not enough: we need evidence on data not used to fit or tune the model.

How the AI approach works

Traditional programming asks us to write the mapping from inputs to outputs. Machine learning instead selects a model family and fits its parameters using examples and an objective. The learning algorithm is still written by people; what changes is that some decision behavior is estimated from data rather than expressed as individual rules.

Represent an example as features x and, for supervised tasks, a target y. A model f(x; θ) makes a prediction using parameters θ. Training finds parameters that reduce a chosen loss. A hyperparameter, such as tree depth or learning rate, controls the learning process or model design; it is selected using validation, rather than being the same thing as a fitted weight.

Generalization is the central question: will the learned relationship help on relevant future inputs? Separate training, validation, and final test roles. Fit preprocessing on the training portion only. If messages from one conversation are nearly duplicates, keep them together when splitting. For future demand forecasting, evaluate on later time periods rather than randomly mixing future records into the past.

Begin with a baseline and a suitable model family. Linear models offer a useful starting point for numeric relationships; trees and ensembles can model nonlinear tabular relationships; neural networks can learn representations for complex inputs. More complexity is justified by evidence, not fashion. Correlation learned from observational data does not by itself establish a causal explanation.

02 / STEP BY STEP

Break the idea into steps

  1. Choose an outcome and collect examples that reflect the real task.
  2. Keep a suitable test set aside before fitting transformations or models.
  3. Compare with a simple baseline and examine errors, not only one score.

Worked example: connect the method to the task

Suppose a tea shop records visitors and cups sold. A simple model predicts cups = w × visitors. Training estimates w from past pairs; inference applies the fitted w to tomorrow’s visitor estimate. A constant average-sales forecast is a baseline. Compare both on later days, using absolute error in cups.

If holidays change buying behavior, the model may need better features or retraining. Adding tomorrow’s actual sales as an input would create leakage: that information is unavailable when the prediction must be made.

Apply the idea: check your reasoning

Think before revealing the answer

A model has low training error but has never been tested on later days. What claim can we make?

Reveal the answer and reasoning

It fits the observed training data under the chosen loss. We cannot yet claim useful future forecasting. Evaluate on held-out later days and compare with the baseline.

A common mistake: Do not train on information that would be unavailable when a real prediction is made.

Before you move on

  • Explain the main idea without repeating the technical label.
  • Identify the approach, its assumptions, and the evidence needed to trust the result.
  • Complete the challenge, then compare your reasoning with the answer.

Sources & a deeper next step

The refresh uses primary papers and official documentation. These optional links are in English; you can understand this lesson without reading them first. Product versions and availability can change.

Coding Tamilan · Understand the idea. Test the claim. Build responsibly.