The reef that regrouped itself

Year 9 · 80 minutes · Unsupervised learning

Driving question

Do clusters discover categories, or help us invent them?

Conceptual explanation

K-means assigns each point to the closest centroid, then moves each centroid to the mean of its assigned points. Repeating these steps reduces or preserves the within-cluster squared-distance objective. Initial centroids and feature scales affect the result. Clusters are useful summaries under a chosen geometry, not proof of natural kinds or social categories.

Learning intentions

Success criteria

Vocabulary

Teacher preparation

Print the synthetic reef points and two initial centroids. Review coordinate means. Explain empty-cluster handling: keep its previous centroid rather than divide by zero.

Materials

Prerequisites and grouping

Compute or compare distances between points. Useful earlier investigations: y5-distance Use pairs for investigation, with operator/reviewer swaps after each comparison. Keep individual predictions, journals and a short oral defence so group work does not hide understanding.

Curriculum connections

Australian Curriculum Version 9 · Digital Technologies: AC9TDI10P02, AC9TDI10P08. Selected aspects only. This activity contributes evidence; it does not cover the full descriptor or achievement standard. A programming descriptor is not claimed for merely moving controls. ACARA AI curriculum connection · V9 Technologies These are planning connections, not ACARA endorsement or exhaustive descriptor alignment.

Timed teaching sequence

0–10 min · Group without labels

Ask groups to propose clusters from the same points and compare boundaries.

Ask: “What makes one grouping better under a stated rule?”

Listen for: “We need an objective, such as distance to a centre.”

10–18 min · Predict an assignment

Predict the closest centroid for a marked point before assigning.

Ask: “Which distance contributions matter?”

Listen for: “Both axes after applying their scales.”

18–42 min · Alternate the steps

Run assignment and centroid update separately. Inspect movement, membership and inertia. Calculate one centroid by hand.

Ask: “Why must the centre move to the mean of its members?”

Listen for: “That minimises squared distances for the fixed assignment.”

42–50 min · Stretch an axis

Change only the feature scale and rerun from the same centres.

Ask: “Did the underlying observations change?”

Listen for: “No, their relative importance in distance changed.”

50–74 min · Design a defensible grouping

Compare two initialisations and one scale choice. Choose a grouping for an explicit synthetic survey purpose and document instability.

Ask: “Does the lowest inertia establish biological truth?”

Listen for: “No, it optimises the chosen representation.”

74–80 min · Report assignments

Submit point assignments, centroids and a scale-sensitivity note.

Ask: “How should an empty cluster be handled?”

Listen for: “Explicitly, without treating an undefined mean as valid.”

Misconception to surface

Clusters reveal natural categories.

Prediction

Predict the marked point’s nearest centroid before assignment, then predict the effect of stretching the horizontal feature.

Counterexample

Rescaling one unchanged feature can reorganise the clusters; a different initialisation can reach a different local solution.

Redesign challenge

Choose a justified scale and initialisation, compare alternatives and state what the grouping cannot establish.

Discussion and reflection

Formative assessment

Ask learners to recompute a centroid and explain one reassigned point. Reject naming clusters as discovered species without external evidence.

Differentiation

Use six points and two clusters; allow precomputed distance tables before working directly with the map.

Extension

Create a non-convex dataset and explain why k-means geometry can produce a poor semantic grouping even with low inertia.

Final artefact

A clustering field report with centroid calculations and sensitivity comparisons.

Safety and data boundaries

Only synthetic reef measurements are grouped. Do not cluster students or infer identity categories from behavioural data.

Hardware investigation

Run fifteen k-means iterations on a large seeded unlabelled cloud. Change horizontal feature weight and compare convergence, inertia and cluster sizes on MPS/CUDA.

Lesson-specific rubric

Criterion Beginning Secure Extending
Algorithm trace Treats clusters as a visual guess Explains assignment and mean update Handles ties or empty clusters explicitly
Interpretation Treats grouping as ground truth Tests scale sensitivity Justifies a use while documenting unstable assignments

Curriculum and assessed evidence

Australian Curriculum Version 9 · Digital Technologies

References: AC9TDI10P02, AC9TDI10P08. Read the current source (checked 2026-09-07).

Evidence to assess: A clustering field report with centroid calculations and sensitivity comparisons.

Selected aspects only. This activity contributes evidence; it does not cover the full descriptor or achievement standard. A programming descriptor is not claimed for merely moving controls. Moderate the supplied illustrative responses against your school unit and current achievement standard.

Choose a teaching schedule

These are planning estimates to test with your class. A short session develops one supported claim; it does not compress the whole senior project.

Stage 45 minute focus 60 minute investigation
Readiness and prediction 0–5 0–5
Trace the supplied example 5–13 5–15
Author and run cases 13–25 15–35
Counterexample and redesign 25–35 35–45
Explain and discuss 35–42 45–55
Export and handover 42–45 55–60

For a longer project, use three 50-minute sessions. Session 1 (0–50): readiness, model, hypothesis and initial cases. Export a project and record the next test. Session 2 (50–100): reopen, check settings, author counterexamples and revise the design. Export the changed project and identify unresolved evidence. Session 3 (100–150): independent peer test, final artefact, individual explanation and moderation. If using two 60-minute sessions, stop at minute 60 after saving the first comparison; use 60–120 for redesign, independent test and defence.

Readiness and access

Entry check: Compute or compare distances between points. Ask the learner to demonstrate it before choosing the level of support.

Preparation: allow about 15 minutes to run the starter, print the cards and check a project can be reopened. This estimate has not yet been measured in a classroom pilot.

Read the entry question aloud, model one row, and label the units. Offer the case table as a large-print sheet. Keep mathematical derivations optional until the learner can explain the comparison.

For one device, use a projector: one pair predicts, one operates, and the class records on paper. Swap roles after the first comparison. For individual access, support keyboard controls and a written table equivalent to each visual. Learners may explain orally or with an annotated diagram. Never require personal data, a recorded voice, or a photograph.

Mixed readiness: if the entry check is difficult, use the linked prerequisite and the first two case cards; retain the same central question. If secure, ask the learner to design an unseen test and state which explanation it could disprove.

Supplied experiment and answer notes

Assign each point to its closest centre under weighted squared distance, then recalculate means and repeat.

Starting parameters: X importance = 1, First centre x = 1, First centre y = 2, Second centre x = 9, Second centre y = 7, Iterations = 5

Final centres 2, 2.666667 / 8, 7; empty centres retain their previous position.

x y cluster
1 2 0
2 2 0
3 4 0
7 6 1
8 8 1
9 7 1

Illustrative responses and marking notes

These are authored examples, not work collected from children. Assess reasoning using the lesson rubric, not whether the first prediction was correct.

Beginning: “It worked because the result looks right.” This identifies no exact case, control or measurement. Ask the learner to point to one row and say what happened.

Developing: “In the first case I recorded x: 1; y: 2; cluster: 0.” This cites evidence, but does not yet explain how the result follows from the rule. Ask the learner to trace the relevant step.

Secure: “For the first supplied case, x: 1; y: 2; cluster: 0. I can trace it using this mechanism: Assign each point to its closest centre under weighted squared distance, then recalculate means and repeat. My result supports a claim about these supplied cases. It does not establish that the same result holds outside them.” Look for an accurate trace, the actual settings and a bounded claim; accept equivalent oral or visual evidence.

Extending: The learner constructs and reruns a new case, reports whether the first explanation survives, and defends a revised design. Use this concrete challenge: Author a small feature table and compare cluster assignments under alternative scales and starting centres. Require the original and changed evidence and this boundary: Two clusters and a Euclidean geometry are assumptions; no category truth is supplied.

Moderation: first assess independently against each lesson criterion. Compare the exact trace or artefact that led to your judgement. Resolve differences using evidence, not polished language. Keep each learner's individual explanation even when the artefact was produced in a group.