Foundations of Machine Learning (Vietnamese and English)

Learn what machine learning is, then build, optimise and evaluate linear regression in Python and scikit-learn, taught in English with every key term also in Vietnamese.

Beginner · Machine Learning · about 13 hours · 5 modules · certificate on completion

Taught by Ngo Thi Huừngé, Khalidà Sultàn, AI Learning Companions.

About this course

This course is taught in English, with every key term also given in Vietnamese, such as supervised learning (học có giám sát) and gradient descent (hạ gradient), so you can learn the ideas in one language and recognise them in the other. It starts with the machine learning landscape: what machine learning (học máy) is, how supervised, unsupervised and reinforcement learning differ, and how samples, features and labels make up a dataset. Then it goes deep on one model, linear regression (hồi quy tuyến tính): its hypothesis function, the mean squared error that measures its mistakes, and the least-squares line, which you find first with formulas and then step by step with gradient descent, learning how the learning rate decides whether it converges.

After that you use scikit-learn, whose models all follow the same create, fit and predict pattern, and prepare real data for it: missing values, categories and scaling. Finally you evaluate models honestly, with MSE, RMSE, MAE and R² on a test set, against a baseline, and see overfitting happen. Every lesson has a JupyterLab walkthrough on real numbers, every module ends with a lab you submit for feedback, and the capstone has you build linear regression from scratch and compare it with scikit-learn's on a real medical dataset.

What you'll learn

  • Sort machine learning problems into supervised, unsupervised and reinforcement learning, with the terms in English and Vietnamese
  • Build linear regression models that predict continuous values, from the hypothesis function to the cost function
  • Explain and implement gradient descent, and choose a learning rate that converges
  • Prepare data and fit models with scikit-learn's fit and predict
  • Evaluate linear models with MSE, RMSE, MAE and R² on a held-out test set, and recognise overfitting

Skills you'll gain

Machine learning, Supervised learning, Linear regression, Gradient descent, scikit-learn, Data preprocessing, Model evaluation, ML vocabulary in Vietnamese and English

Tools

JupyterLab, Python 3, NumPy, pandas, scikit-learn, matplotlib

Before you start

No machine learning needed. You need basic Python (variables, lists, functions, running a script or a notebook) and school algebra (straight lines and squares); module 3 uses a little calculus, explained as it goes. Python Foundations for Data Science covers the Python. Install Python 3 with NumPy, pandas, scikit-learn, matplotlib and JupyterLab. The course is taught in English, with each key term also given in Vietnamese.

Modules

  1. The Machine Learning Landscape

    Meet machine learning (học máy) and its three main kinds, supervised, unsupervised and reinforcement learning, and learn the words for data: samples, features and labels.

    • What machine learning is: data, features and labels (10 min)
    • Supervised, unsupervised and reinforcement learning (12 min)
    • Features: the inputs a model learns from (10 min)
    • Hands-on lab: Sort problems and meet a dataset
  2. Linear Regression Foundations

    Predict a continuous value with linear regression (hồi quy tuyến tính): write its hypothesis function, measure its errors with a cost function, and find the line with the lowest mean squared error.

    • The hypothesis function: a line through the data (12 min)
    • Measuring error: residuals, the cost function and MSE (12 min)
    • The best line: least squares (10 min)
    • Hands-on lab: Fit a line by hand
  3. Optimisation with Gradient Descent

    Find the best parameters step by step with gradient descent (hạ gradient): use derivatives to decide which way to move, choose a learning rate that converges, and watch the cost fall.

    • Derivatives and the gradient (12 min)
    • Gradient descent, step by step (12 min)
    • Choosing the learning rate (10 min)
    • Hands-on lab: Gradient descent step by step
  4. Introduction to scikit-learn

    Train linear models in a few lines with scikit-learn's consistent API, create, fit, predict, and prepare real data first: fill in missing values, encode categories and scale features.

    • The scikit-learn API: fit and predict (12 min)
    • Preparing data: preprocessing (12 min)
    • Hands-on lab: Your first scikit-learn models
  5. Model Evaluation Metrics

    Judge a model honestly: measure it with MSE, RMSE, MAE and R² on a test set it never trained on, compare it with a baseline, and recognise overfitting.

    • Regression metrics: MSE, RMSE, MAE and R² (12 min)
    • Train/test split and overfitting (12 min)
    • Hands-on lab: Evaluate honestly

Project: Linear regression from scratch, compared with scikit-learn

Build linear regression (hồi quy tuyến tính) twice and compare the two: once from scratch with NumPy and gradient descent (hạ gradient), once with scikit-learn. Use scikit-learn's diabetes dataset, real medical data that ships with scikit-learn: 442 patients, 10 features measured at the start (age, sex, body mass index, blood pressure and six blood measurements) and a label that measures how far the disease had progressed a year later. Split it with train_test_split(X, y, test_size=0.2, random_state=42). Your model standardises the features with the training set's means and standard deviations, learns one weight per feature and a bias by gradient descent, records the cost at every iteration, and predicts new data. Choose the learning rate and the number of iterations from the cost curve. Then train LinearRegression and a DummyRegressor baseline on the same split and compare: predictions, and MSE, RMSE, MAE and R² on the test set. Finish with a short report in English, giving the Vietnamese term in brackets for each key idea, that explains what the model learned, how close your version came to scikit-learn's and why, and one way to improve the predictions.

The products this course names are trademarks of their owners, who haven't made or endorsed it.

Start the course free