Hong Kong · Machine learning · Ages 14 to adult

Machine learning course in Hong Kong

The question we hear most from Hong Kong families about machine learning is not which library to use. It is "is my maths good enough?" The honest answer is that machine learning rests on four pieces of school mathematics, and the DSE spreads them across the Compulsory Part and two optional modules that most students take only one of, or neither. This page sets out the course in order, the mathematics each step leans on, and how a one-to-one mentor fills whatever gap a learner arrives with.

Teaching since 2020 · 10,000+ students worldwide · every Hong Kong learner is taught one to one, live online, in English

The short answer

Modern Age Coders teaches machine learning to Hong Kong learners from about 14 to adult: live online classes, one to one and in English, at flexible Hong Kong times. The course runs in a fixed order, Python first, then data and statistics, then vectors and matrices, then models, evaluation and a first neural network. Each step uses mathematics that the HKDSE places in the Compulsory Part, Module 1 or Module 2; a learner missing a piece is taught it alongside the code, not sent away. The first class is free and includes a short maths check.

Start here

Which machine learning course should I start with?

Three courses cover most learners who reach this page. For Hong Kong each is taught one to one.

The maths map

What maths do I need for machine learning?

Four areas: statistics and probability, vectors and matrices, functions and their slopes, and a habit of checking data. Here is where each one sits in the Hong Kong senior secondary curriculum, according to the CDC and EDB documents.

Machine learning ideas and the HKDSE maths units that teach them
Machine learning ideaMaths behind itWhere the DSE teaches it
Summarising a datasetMean, spread, standard deviationCompulsory Part, "Measures of dispersion"
Spotting misleading dataSampling, bias, misuse of graphsCompulsory Part, "Uses and abuses of statistics"
Naive Bayes and spam filtersConditional probability, Bayes' theoremModule 1 only: the Compulsory Part says "Bayes’ Theorem is not required."
Errors and noiseExpectation, variance, the normal distributionModule 1, units 12 and 16
A model's weighted voteThe dot product of two vectorsModule 2, "Scalar product and vector product"
Whole datasets at onceMatrices and linear systemsModule 2, "Matrices" and "Systems of linear equations"
Training by small stepsDerivatives and slopesModule 1 "Derivative of a function"; Module 2 "Differentiation"

Sources: CDC, Learning Content of Senior Secondary Mathematics (2017); EDB Explanatory Notes to Module 1 (Calculus and Statistics) and Module 2 (Algebra and Calculus), 2009 with updates in August 2018; Compulsory Part explanatory notes. Read on 23 November 2026. The mapping from units to machine-learning ideas is ours; the documents themselves do not mention machine learning.

The split that catches people out

The Compulsory Part carries a total lesson time of 250 hours in the CDC document, and each module adds 125. Statistics and probability live partly in the core, but Bayes' theorem, distributions and expectation are in Module 1. Vectors, the dot product and matrices are in Module 2.

So a DSE student with M1 has the probability side of machine learning and not the linear algebra; a student with M2 has the opposite. The HKEAA states that "Candidates are allowed to choose only one of the modules if they take the Extended Part." Nobody leaves school with both from the DSE alone.

How many take a module at all

In the 2026 HKDSE, 3,655 candidates sat Module 1 and 7,979 sat Module 2, out of 58,487 registered for the exam (HKEAA results release, 2026). Most DSE candidates take neither module.

That is not a barrier to machine learning. It means most learners need some of the mathematics taught with the course, which is exactly what one-to-one teaching is good at. For the module details, see our HKDSE M1 and HKDSE M2 tutor pages.

Course path

In what order should I learn machine learning?

Code before models, data before algorithms, and each new piece of mathematics just before the model that needs it. This is the order we teach, whatever the learner's age.

Our machine learning course path, stage by stage
StageWhat the learner buildsMaths taught at this stage
1. PythonPrograms that read files, loop and use functionsNone new; careful arithmetic
2. DataCleans a messy table, charts it, finds outliersMean, median, standard deviation
3. First modelA straight-line fit that predicts a numberGradient of a line, squared error
4. ClassificationA perceptron, then logistic regressionDot product, probability as a score
5. EvaluationTrain and test splits, accuracy and its trapsConditional probability, rates
6. Many featuresModels on whole tables at onceVectors and matrices
7. Neural networkA small network written by hand, then a libraryDerivatives and the chain rule
8. ProjectA model on data the learner chose, defended in EnglishWhatever the project needs

This path is our own teaching plan, not an official syllabus. Stages 1 and 2 take longest for beginners. Learners who already code skip ahead after the free class. Hong Kong school students meet related ideas in the ICT curriculum, whose 2021 guide lists “pattern recognition through artificial intelligence (AI) and data science” among its examples of technological innovation.

Why Python comes first

Every machine learning library a learner will meet is driven from Python, and Python is also one of the two languages the DSE ICT curriculum lists. A student who arrives fluent in it starts at stage 2.

A learner who has never coded spends the first weeks in our Python course for Hong Kong learners or its equivalent, and that time is never wasted.

Why maths is taught just in time

A teenager told to "learn linear algebra first" for a year rarely comes back. A teenager who needs the dot product to make their own classifier work learns it in an afternoon, because the reason is on the screen.

So we introduce each idea when the code demands it, write it out by hand on the whiteboard, and only then let a library do it. The perceptron lesson below is the first place that happens.

A real lesson

What does a first machine learning model look like in code?

One of the oldest learning machines, the perceptron, is a dot product, a threshold and a rule for fixing mistakes. We teach it at stage 4. It shows the dot product from Module 2 doing real work, and it shows a limit that took researchers years to get past.

  1. Describe each learner as a vector. Two numbers: hours practised and puzzles solved. The label says whether they passed our mock test.
  2. Take a weighted vote. The dot product multiplies each number by a weight and adds them. Add a bias b; if the total is above zero, predict a pass.
  3. Learn only from mistakes. When a prediction is wrong, add the example to the weights (or subtract it), and nudge the bias.
  4. Stop when a full pass has no mistakes. If that never happens, stop after 20 passes and report it honestly.
  5. Try a problem that cannot be split by a line. Exactly one of two lights on, known as XOR.
A perceptron from one dot productPython
# A perceptron: one dot product, one threshold, one update rule.
# Data invented by us: (hours practised, puzzles solved) -> 1 if the learner passed our mock test.
def dot(u, v):
    return sum(a * b for a, b in zip(u, v))

def train(data, epochs=20):
    w, b = [0.0, 0.0], 0.0
    for epoch in range(1, epochs + 1):
        mistakes = 0
        for x, label in data:
            guess = 1 if dot(w, x) + b > 0 else 0
            if guess != label:
                step = label - guess          # +1 or -1
                w = [wi + step * xi for wi, xi in zip(w, x)]
                b += step
                mistakes += 1
        if mistakes == 0:
            return w, b, f"settled after {epoch} passes"
    return w, b, f"still {mistakes} mistakes after {epochs} passes"

mock = [((1, 1), 0), ((2, 1), 0), ((1, 3), 0), ((4, 5), 1), ((5, 3), 1), ((6, 6), 1)]
w, b, status = train(mock)
print("mock test:", status, "| w =", w, "b =", b)
for x in [(3, 2), (5, 5)]:
    print("  new learner", x, "->", "pass" if dot(w, x) + b > 0 else "not yet")

xor = [((0, 0), 0), ((0, 1), 1), ((1, 0), 1), ((1, 1), 0)]
w, b, status = train(xor)
print("exactly-one-light (XOR):", status)

All six learners and their marks are invented by us for teaching. Copy the file into any Python 3 and you will get the output below exactly; there is no randomness in it.

OutputOutput
mock test: settled after 10 passes | w = [2.0, 2.0] b = -14.0
  new learner (3, 2) -> not yet
  new learner (5, 5) -> pass
exactly-one-light (XOR): still 4 mistakes after 20 passes

Weights of 2 and 2 with bias -14 mean the model predicts a pass when 2 times hours plus 2 times puzzles is above 14, which is the same as hours plus puzzles above 7 (our arithmetic). On XOR it is still wrong on all four points after 20 passes.

What the maths is doing

Module 2 teaches the dot product as a definition with properties. Here it becomes a vote: each feature speaks with the strength of its weight. Geometrically, w is a direction, and the rule "dot product plus b above zero" is a straight line across the plane, passes on one side and the rest on the other.

The update rule tips that line a little towards any example it got wrong. With data that a line can separate, it is guaranteed to stop eventually; here it took 10 passes.

Why XOR matters

No single straight line puts (0, 1) and (1, 0) on one side with (0, 0) and (1, 1) on the other. Try drawing it. So the perceptron cannot learn XOR however long it trains, and it says so: four mistakes, every pass.

Fixing this needs a second layer of units, which is where neural networks begin, and training those needs the derivatives of Module 1 or Module 2. A learner who meets the failure first understands why the extra machinery exists.

  1. Your turn: add a learner. Add ((3, 5), 1) to the mock data. How many passes does training take now, and where does the line move?
  2. Draw the boundary. On squared paper, plot the six learners and the line hours plus puzzles equals 7. Which points sit closest to it?
  3. Break XOR differently. Add a third feature, x1 times x2, to each XOR point. Can the perceptron settle now? Explain why in two sentences.
  4. Say it in English. Explain to a younger student what a weight is, without using the word "vector".

The next model in the course, a straight-line fit trained step by step, is set out on our page on building machine learning models in Python.

Filling gaps

Can I learn machine learning without M1 or M2?

Yes. Most of our Hong Kong learners have taken neither module, or only one. What changes is how much mathematics the mentor teaches alongside the code, and in what order.

Starting points and what we add, by the learner's maths background
Learner arrives withAlready hasWe teach alongside the course
DSE Compulsory Part onlyMean, dispersion, basic probability, straight linesBayes, vectors, matrices, slopes of curves
Compulsory Part and M1Bayes, distributions, derivativesVectors, dot product, matrices
Compulsory Part and M2Vectors, dot product, matrices, derivativesBayes' theorem, distributions, expectation
IB Mathematics AA or AIDepends on SL or HL and optionsMapped in the free class
IGCSE or A-level MathematicsStrong algebra; vectors at A-levelProbability distributions, matrices as needed
An adult who left maths years agoEveryday arithmetic and judgementEvery piece, slowly, through code

Unit placement from the CDC and EDB senior secondary mathematics documents cited above. The second and third columns are our teaching judgement for typical learners; individual schools and teachers cover more or less. International-school routes are described on our IB maths tutor in Hong Kong page.

For DSE students in S4 to S6

If machine learning is a long-term interest, a module helps. M2 gives the linear algebra that underpins almost every model; M1 gives the statistics that tells you whether a model can be trusted. Neither is required to start, and we never advise on DSE subject choices beyond describing what each contains.

In S6, exam preparation comes first. Many students pause the course through the written examinations and return with more time afterwards.

For adults

Adults often fear the maths more than they need to. We start from a real dataset, build a model that works, and add mathematics only when the learner asks "why did that happen?" By then the answer is welcome.

For a version aimed at people already in work, see our page on AI and machine learning for working professionals.

By learner

Which machine learning route suits a teenager, a university student or an adult?

The path is the same; the speed, the projects and the depth of mathematics differ. These are our usual routes for Hong Kong learners.

Our machine learning routes for Hong Kong learners
LearnerRouteWhy
14 or 15, new to codePython for Teens, then AI and ML for TeensCode first; models follow quickly
16 to 18, DSE with a moduleAI and ML for Teens, maths gaps filled as they appearUses the module they already have
Visual learner, unsure about codeOrange Data Mining for TeensModels by connecting blocks, then Python
University studentAI and ML MasterclassFull classical and deep learning sequence
Adult worried about mathsMaths for Data Science and ML beside a first modelConfidence first, then depth
Already builds modelsDeep Learning from First PrinciplesNetworks written out by hand

Routes are our recommendations, refined after the free class. A broader view of machine learning lessons for Hong Kong, with a different lesson, is on our page on AI and machine learning classes in Hong Kong.

What school already gives

Junior secondary students in publicly-funded schools meet AI in a module of 10 to 14 hours, which EDB circular 109/2023 asks schools to allocate. It introduces ideas such as computer vision and AI ethics; it does not train models from data.

A machine learning course takes over where that stops: the student builds the models the module describes. Younger learners may prefer our AI course for teens in Hong Kong as a first step.

What a finished learner can do

Clean a real dataset, choose a sensible model, split data honestly, report accuracy with its caveats, and explain the mathematics of the model in plain English to someone who has never seen it.

That last skill is the one interviewers and university tutors notice. A certificate of completion from us records the course; it is not a university or HKEAA qualification.

English and timing

Why study machine learning in English, one to one, from Hong Kong?

Because the papers, library documentation and forums of machine learning are written in English, and because a mathematics gap is easiest to close when the mentor is teaching only you.

The vocabulary of the field

Weight, bias, loss, overfitting, gradient: these words appear in English in every tutorial and error message. Learning them in English from the first lesson saves a translation step for good.

Our mentors speak at a steady pace and write each new term in the chat. Local-school students gain English practice in a subject they enjoy; international-school students simply carry on in their usual language.

Why one to one suits maths-heavy topics

In a group, the student missing the dot product stays quiet and falls behind. In a private lesson the mentor sees the hesitation, stops, and teaches it then and there.

Lessons also bend around school tests, DSE mocks and work deadlines, with no class to wait for.

Hong Kong and India clocks: sample lesson hours
Hong Kong timeIndia timeOften chosen by
7:00 pm, weekday4:30 pmSecondary students after dinner
9:30 pm, weekday7:00 pmAdults after work
2:00 pm, Sunday11:30 amFamilies at the weekend

Hong Kong runs on UTC+8 and India on UTC+5:30, with no daylight saving in either, so India is two and a half hours behind all year. These hours are examples from our own arithmetic, not a set schedule.

Progress

How will I know my machine learning is improving?

Our own stages, used to place learners and in the monthly notes. They are not set or recognised by any school, exam board or university.

Machine learning: our stages and the maths at each
StageThe learner canMaths they can explain
1. Describe dataSummarise and chart a dataset honestlyMean, median, standard deviation
2. FitTrain a line and read its errorGradient, squared error
3. ClassifyBuild a perceptron and say when it failsDot product, separating line
4. EvaluateSplit data and report results with caveatsConditional probability, rates
5. ScaleWork with many features at onceVectors and matrices
6. NetworkTrain a small network and explain each stepDerivatives, the chain rule

For learners

A model that fails clearly teaches more than one that works by luck.

If you cannot say what the weights mean, slow down.

For parents

Monthly notes list the models built and the maths learned, with the code attached.

In exam years, we plan lighter months with you in advance.

More courses

Nine more courses around machine learning

All are live and in English; Hong Kong learners take every one of them one to one.

I

Ground to stand on

Ages 13 to 18

MALE / BASE / 01

Python for Teens

From first program to files, functions and classes.

Open the syllabus

MALE / BASE / 02

Maths Through Coding

Averages, chance and slopes met through programs.

Open the syllabus

MALE / BASE / 03

HKDSE Maths with M1 and M2

Exam-focused support for the core and either module.

Open the syllabus
II

Mathematics behind models

Older teens and adults

MALE / MATH / 01

Statistics and Probability

From summaries to distributions and hypothesis tests.

Open the syllabus

MALE / MATH / 02

College Mathematics

Calculus and linear algebra at university pace.

Open the syllabus

MALE / MATH / 03

IB Maths AA and AI

For Diploma students building the same foundations.

Open the syllabus
III

Models in practice

Adults and strong teens

MALE / PRAC / 01

Data Science for Teens

Messy data cleaned and charted before modelling.

Open the syllabus

MALE / PRAC / 02

Data Science Course

End-to-end projects on real, imperfect data.

Open the syllabus

MALE / PRAC / 03

Deep Learning Engineering

Training, scaling and shipping larger models.

Open the syllabus

How classes run

When can I have machine learning classes, and what happens in them?

Any day, any time, flexible: one to one at the hour that suits your family, weekdays or weekends. The learner joins from Hong Kong; the mentor teaches from India, where the clock reads two and a half hours earlier.

Evening

Seven in Hong Kong; half past four for the mentor.

Late

Half past nine in Hong Kong is seven in India.

Weekend

A Sunday afternoon, or any weekend hour you prefer.

Maths by hand

New ideas are worked on the whiteboard before any library.

Predict the run

Learners say what the model will do before training it.

Failure on purpose

Each model is pushed until it breaks, then explained.

Exam-aware

Lessons lighten around tests and DSE mocks.

Own data

Later projects use a dataset the learner picks.

One mentor

The same person from the first class to the project.

Student work

Projects by our students

From our longer courses; the student labs hold many more.

NutriLife AI nutrition coach project screenshot

AI and ML

NutriLife

An AI nutrition coach that reads what you eat and works you toward a target.

by Bhavya · Open it

Misti AI chatbot for maths and coding screenshot

AI and ML

Misti

A chatbot that answers mathematics and programming questions, built and deployed by a student.

by Harshit · Open it

GuardianX AI internet safety assistant screenshot

AI and ML

GuardianX

An assistant that helps a young person recognise unsafe situations online.

by Vivaan · Open it

SkyCast weather forecast application screenshot

Web app

SkyCast

A weather forecasting site with live conditions for any location.

by Krish

Fees

Fees for the machine learning course

Billing is month by month: you pay for the coming month's classes and nothing further ahead. The amount appears in Hong Kong dollars, and the payment page lists any gateway charge on its own line before you agree to pay.

Free first class

Free

no card required

  • A free first class, one to one
  • A short, friendly maths check
  • No payment details to book
Book it

One to one

$1,200 HKD

a month, eight live classes

  • A private mentor
  • Maths gaps taught as they appear
  • Times that fit school or work
Start here

What families say

Rated 4.9 across 547 Google reviews

Students and parents in their own words, as posted on Google.

★★★★★

"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."

Ria Mukherjee

Parent

★★★★★

"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."

Samriddha Mondal

Student

★★★★★

"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."

Vansh Agarwal

Student

★★★★★

"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."

Sonam Oswal

Parent of Dhairya

★★★★★

"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."

Sonu Goyal

Parent

★★★★★

"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."

Ritu Kedia

Parent

Questions from Hong Kong

Machine learning course: questions and answers

Which language are classes taught in?

English. Lessons are live over video with a mentor based in India who writes technical words in the chat as they come up. We do not teach in Cantonese or Mandarin.

Are classes one to one?

Yes. Every Hong Kong learner is taught alone with one mentor, so the pace and the mathematics follow that learner.

When can lessons be held?

Any day, any time, flexible: one to one at the hour that suits your family, weekdays or weekends. India is two and a half hours behind Hong Kong all year, so a 9:30 pm lesson is 7 pm for the mentor.

Do I need M1 or M2 to start?

No. Most of our learners have neither. The mentor teaches the statistics, vectors, matrices and calculus that the course needs as each one comes up.

Is M1 or M2 more useful for machine learning?

Both help in different ways: M2 holds the vectors and matrices, M1 the probability distributions and Bayes. We describe what each contains; the subject choice is for the student and the school.

Can a 14 year old learn machine learning?

Yes, through the teen course, which starts with Python and introduces only the maths each model needs. Younger children usually start with a general AI course first.

Will you help with DSE ICT or school assignments?

We teach programming and problem-solving with our own exercises. We do not write, edit or complete any assessed work, including the DSE ICT School-based Assessment.

Is the course linked to the EDB, HKEAA or a university?

No. We are independent and have no affiliation with the Education Bureau, the HKEAA or any university. We read their documents to know what learners have already studied.

How are fees paid?

One month at a time, shown in Hong Kong dollars, with no prepayment for a term. Any gateway charge appears before you confirm, and the first class costs nothing.

Do I get a certificate?

Learners who complete a course receive a Modern Age Coders certificate of completion. It is our own record, not an official qualification.

Related

More for Hong Kong learners of AI and maths

Useful next reads before choosing.

AI and ML classes in Hong Kong

Our broader Hong Kong ML page.

Coding classes in Hong Kong

Every course for Hong Kong learners.

HKDSE maths tutor

The four papers and the 2027 dates.

Machine learning from scratch

Models built without libraries.

Data science course

From raw data to a working model.

AI and ML projects

Ideas for a first real project.

More pages for Hong Kong

Part of the guide: Every Hong Kong page

More guides: Coding and AI classes in Hong Kong · 中文:英文授課編程課程 · Start here: Online coding for kids · Coding subjects and courses: App development · By age and school level: Adults · HKDSE ICT and maths: DSE ICT elective guide · IB, IGCSE, A-level and SAT: A level Computer Science tutor · Olympiads and competitions: AMC 10 preparation · Guides for families: After-school coding · School holidays: AI summer course · Districts and areas: Causeway Bay

Start here

Book a free first machine learning class

In the free class you train the perceptron on this page, then watch it fail on XOR and talk through why. The mentor runs a short, relaxed maths check and suggests where on the path you should begin.

Want to see the format first? Read how we teach or open any syllabus in the course list.

WhatsApp us · +91 91233 66161 · connect@modernagecoders.com

Live online, one to one, in English, with mentors in India. WhatsApp reaches us fastest from Hong Kong.

Free to book, nothing to pay up front.

Want a class sooner? Book a priority demo

A priority demo is a full class of about 45 to 60 minutes. After the class the mentor sends a written skill report and a personal learning roadmap on WhatsApp. If you enrol, the demo fee is adjusted against your first month's fee. Share your demo Order ID with us on WhatsApp and we take it off.

Book a priority demo

Keep exploring Modern Age Coders

Related courses and guides

Learn more

Free resources

From the blog

Start here

Free classPriority demoCall us