English:Data cleaning, sampling and representation - AI Year 6
Introduction
A team wants an AI model to use two types of bird card. Their practice spreadsheet has twelve rows. Could an extra row make the data worse? Can an empty cell ever mean zero? Audit the spreadsheet, explain which groups the data covers, then transfer your rules to a different example.
Every bird card, place and measurement in this lesson is fictional. The Commons robin photograph shows a real bird. It is context for the topic and supplies none of the numbers in the cards. You can finish the whole lesson without a real survey, a model-training service or an online account.
Keep the raw cards and define the fields
An observation is a recorded event. A row is a line in the spreadsheet. When the same event is typed twice, it has two row identifiers but one observation identifier. Our bird cards use North and South for site and AM and PM for time slot. The printed example uses CM and MM only as units of length, written cm and mm. A span is a feature that might be measured. A species label is an assigned answer about the observation. They serve different purposes.
Keep the original. Save the raw table. In a second table, record each accepted change and its reason, and mark uncertain items for checking. For this exercise the approved labels are robin and blackbird. The note from the fictional recorder allows “black bird” as another spelling of blackbird. This note does not authorise other guesses. The allowed span is over 0 cm up to and including 100 cm. This is a rule of the invented exercise, not a field guide to these birds.
| Row | Observation | Site | Slot | Species label | Span | Unit |
|---|---|---|---|---|---|---|
| R01 | O01 | North | AM | robin | 22 | cm |
| R02 | O01 | North | AM | robin | 22 | cm |
| R03 | O02 | North | AM | Robin | 21 | cm |
| R04 | O03 | North | AM | blackbird | missing | cm |
| R05 | O04 | North | AM | robin | -5 | cm |
| R06 | O05 | North | AM | blackbird | 220 | mm |
| R07 | O06 | North | AM | black bird | 24 | cm |
| R08 | O07 | East | AM | robin | 20 | cm |
| R09 | O08 | South | dawn | blackbird | 23 | cm |
| R10 | O09 | South | PM | robin/blackbird | 25 | cm |
| R11 | O10 | South | PM | robin | 30 | ? |
| R12 | O11 | South | PM | blackbird | 26 | cm |
Work R01 and R02 as a model. They share observation O01 and have the same other values. Keep one observation and log that the second copy was omitted. If two O01 rows disagree, keep the raw cards and ask the recorder to check which card is right before analysing them. Counting two identical lines as two birds would give the North AM group extra weight. A separate robin row with a different observation ID is not automatically a duplicate.
Try the audit before reading the solution. Locate the ten planted review points. For each, record the row ID, what you noticed, what you would do and why. Find at least nine points and explain your actions. Keep amount 0, blank, unit unknown and outside the allowed range separate when designing a rule. Some situations can be resolved with the given rules and others need further evidence.
Clean values without guessing and test the rules
Reveal the worked audit after your attempt.
| Row | Issue | Defensible action |
|---|---|---|
| R02 | Exact repeat of O01 | Keep one copy in the clean table and log the omitted row. |
| R03 | Robin begins with a capital | Standardise the case to the approved label robin. |
| R04 | Span missing | Mark the span unknown. Keep the row for answers that use its known site and slot. |
| R05 | Span is negative | Flag the span outside the allowed range. Check the source before replacing the number. |
| R06 | Span supplied in millimetres | Divide 220 by 10 to get 22 cm. Record the original and the conversion. |
| R07 | Label written black bird | Apply the recorder's approved alias blackbird and log the change. |
| R08 | Site East is outside this plan | Leave the site unclassified and ask the recorder what East means. |
| R09 | Slot dawn cannot be placed by the rules | Leave the slot unclassified. Obtain an observation time before deciding whether it fits AM or PM. |
| R10 | Two possible species labels | Mark species unknown. Retain the location and span as separate fields. |
| R11 | Unit unknown | Retain the raw reading 30 and its question-mark unit. Do not enter a converted value without evidence. |
There are eleven observations after omitting the exact repeat. Eight have a usable span. For a question about group coverage you can still use a row when its span or species is unknown, provided the site and slot are known. For a question about average span you would have only eight usable measurements and should explain that limitation. Nine identified review points out of ten is 9 ÷ 10 × 100 = 90%. Check your reasons too, since a correct row number does not guarantee a defensible action.
Test a boundary. Try 100 cm exactly, 1001 mm and 0 cm. The first is allowed. Convert 1001 mm to 100.1 cm, which is above the ceiling. Zero is outside the rule because a fictional wingspan must be positive. A test of a blank span should give unknown. Typing 0 for R04 would create an unsupported value and would also violate the exercise rule. If a second recognised original card later confirms the missing amount, log the source and only then enter it.
Show which groups the sample covers
A sample is part of a larger group you want to learn about. If your question compares places and times, plan how to collect observations within each site-and-slot group. Write the rule first. The diagram separates a collection into groups and then selects members from those groups. A balanced training set is not always required, but missing coverage needs to be noticed and explained before using a model beyond familiar conditions.
| Group | Number recorded with both group fields known |
|---|---|
| North AM | 6 |
| North PM | 0 |
| South AM | 0 |
| South PM | 3 |
| Unclassified site or slot | 2 |
The total is 6 + 0 + 0 + 3 + 2 = 11. A zero in this table means the supplied records contain no observation classified in that group. It cannot show that the group had no birds. R08 and R09 belong in unclassified because each lacks a usable group field. R04 still counts for North AM, even though its span is unknown. If you draw a bar chart, label the vertical axis “recorded observations” and keep the unclassified category visible. The chart should not be titled “all birds in both places”.
The original CodeAI video explains why training examples influence a model. Use it to ask what could go wrong if examples come mainly from one condition. Our six North AM observations and three South PM observations do not test a model's accuracy in North PM. A useful next collection plan would define comparable observation periods, include both places in both slots and report any group still missing.
Transfer the results to another fictional dataset
For a fictional library, measure how many minutes an anonymous trolley of returned books waits before sorting. A record could have an event ID, location, period and wait in minutes. Use the same method for recording original rows, identifying exact duplicates, keeping a change log and showing which periods are covered. The meaning of the measured field changes. A real wait may be zero minutes if sorting starts immediately. A blank remains unknown. You must agree anew which locations and periods are allowed and which source can confirm a value.
Worked case. T1 at the entrance in the morning records 0 minutes. T2 at the entrance in the morning has no time. T3 at the reading room in the afternoon records “2” with no unit. Test the rules: T1 stays a valid zero; T2 stays unknown; T3 needs a unit check. None of these decisions estimates how long every trolley waits. If the group data cover only the entrance in the morning and the reading room in the afternoon, plan the missing combinations before comparing locations.
The BTO video is an example of comparing sound characteristics. If you switch from measuring a span to listening for a song, you must define different features and decide how they will be reviewed. You can still log uncertainty and test coverage. The video is optional and the written library case is the transfer task.
Finish by writing a short evidence note. Name the raw table, state the number of review points you found, record a boundary case with its expected and observed results and identify a missing sample group. Include one item for a person to verify. A neat chart and a clean table can still come from an uneven or incomplete sample.
Interactive Tasks
Quiz: Test Your Knowledge
Why keep the raw table? (It lets you check what was received and what changed) (!It makes every measurement accurate) (!It supplies any numbers that are missing) (!It means no audit is necessary)
Why can R02 be omitted from the analysis? (It repeats the same observation and the other fields agree) (!Its bird label appears in other observations) (!An AM record should never be used) (!The first two rows both give positive spans)
What belongs in the cleaned span cell for R04? (Unknown because the span was not recorded) (!Zero because the cell was blank) (!The mean of the following two rows) (!The previous observation’s span)
What is 220 millimetres in centimetres? (22 centimetres) (!2200 centimetres) (!220 centimetres) (!2.2 centimetres)
What should happen when R11 has an unknown unit? (Keep the original reading and check the unit before converting it) (!Treat it as centimetres without checking) (!Treat it as millimetres without checking) (!Use the same value as R12)
What does North PM zero mean in the coverage table? (No retained observation was assigned to North PM) (!There were no birds in North in the afternoon) (!North PM observations all had a span of zero) (!Every bird was counted in that period)
Who can confirm what a new unlisted species alias means? (A responsible recorder using the original source and label rules) (!A spreadsheet choosing the shortest spelling) (!The previous row regardless of its ID) (!A chart using the most frequent class)
Which result matches the classroom span rule? (Exactly 100 centimetres is allowed) (!Exactly 0 centimetres is allowed) (!1001 millimetres is allowed) (!A missing number passes the range test)
Which library value can be valid even though zero was invalid for span? (A wait of zero minutes) (!An unknown unit) (!An omitted event identifier) (!A morning record with no time information)
Which next plan gives better evidence about the missing groups? (Use comparable periods at both sites and record the group for each observation) (!Copy North AM rows until there are more rows) (!Guess where every unclassified record belongs) (!Publish the existing chart as the count of all birds)
Memory Game
| Raw record | What was originally received |
| Duplicate | An extra copy of the same observation |
| Label | Assigned answer or category for an observation |
| Unit | What the measurement number counts in |
| Sample | Part of the group studied |
| Coverage | Which parts of that group appear in the records |
Drag and Drop
| Missing span | Keep the value unknown and seek evidence |
| Exact repeated observation | Keep one copy and record the reason |
| Millimetres supplied | Use the documented conversion |
| Ambiguous species label | Refer the classification for review |
| Unverified site code | Keep the observation outside the confirmed groups |
Crossword Puzzle
| DUPLICATE | What is a second copy of the same observation? |
| LABEL | What gives the assigned category? |
| COVERAGE | What shows which groups appear in the records? |
| SAMPLE | What is the part of a larger group that you investigate? |
| UNKNOWN | How do you mark an unavailable measurement? |
| BOUNDARY | What do you test when you try a value at the edge of an allowed range? |
LearningApps
Optional extra practice. Choose an appropriate activity with your teacher. If the external collection is unavailable, use the native activities and independent tasks in this course.
Cloze Text
Open Tasks
Easy
- Label the fields: Identify an observation identifier, a feature, a unit and a label in R01. Explain one difference between the identifier and the label.
- Compare two nearby rows: Compare R01 and R02. List the matching fields that justify keeping just one observation.
- Handle a blank: Write an audit line for R04. Explain what you would need before recording any number.
- Convert a value: Record the original R06 number and unit. Convert to centimetres and write the operation.
Standard
- Audit ten places: Find the ten review points using the raw list first. Mark your work against the worked audit and write a defensible reason for at least nine.
- Compare valid and unclassified: Explain why R04 can count towards North AM while R08 and R09 must stay unclassified.
- Draw a labelled chart: Chart North AM, North PM, South AM, South PM and unclassified. Add a caption that gives the total and clearly describes what the zeros mean.
- Test an edge rule: Write expected results for 100 cm, 1001 mm and 0 cm. Apply the rule, compare with your predictions and note why a conversion comes before the range check.
Advanced
- Handle a conflicting duplicate: Imagine another O01 card gives 23 cm. Explain why this does not meet the exact-repeat rule. Write a source check and what you will retain while waiting.
- Design a follow-up sample: Plan equal-length observation periods in both places and time slots. State what your improved sample could test and name a remaining limitation.
- Apply the rules to a new domain: Write a library data dictionary and clean three example rows. Identify two checks that transfer and one measurement rule that must change.
- Publish a careful evidence note: Prepare a short written or spoken report covering identified issues, one test result, one missing condition and one decision a person needs to check. Use the fictional data only.
Learning Check
- Calculate issue coverage: A learner finds nine planted review points. What percentage is that and what else does the audit need?
- Distinguish unknown and zero: Why is guessing zero for R04 a poor correction? Give one check.
- Resolve one unit conversion: Explain the treatment for R06 and R11 without losing evidence.
- Evaluate a coverage claim: Why is “no birds in South AM” an unsupported reading of the coverage table?
- Test a boolean choice at the boundary: Explain why 100 cm is allowed while 1001 mm is flagged.
- Transfer and identify a limit: Which rules from span cleaning apply to the trolley dataset and which must change?
Worked checks and assessment guidance
- Nine divided by ten times 100 is 90%. Each identified row needs an appropriate action and a reason supported by the rules or retained source.
- The source gives no span and the fictional span rule rejects zero. Run a blank test and keep the result unknown unless an original source supplies a value.
- R06 has a known mm unit, so 220 divided by 10 is 22 cm. R11 has no verified unit, so keep the raw entry and flag the converted span as unknown.
- South AM has zero classified observations in this import. No record was obtained for this comparison, and two observations are unclassified. A fair check would collect identified South AM observations under the same method.
- The upper bound includes 100 cm. 1001 mm converts to 100.1 cm, which exceeds it. A correct test states the units and runs the comparison after conversion.
- Preserve the raw record, check repeated IDs and units and represent unknowns explicitly. Zero wait is meaningful. Choose a wait rule and recording plan with the library context, then test missing slots before comparing places.
Learning evidence
Submit the ten-point audit with at least nine correctly found issues, a labelled coverage table or chart, a boundary-test log and a short library transfer example. State one uncertainty and the source or person who would check it. No actual school or bird survey is required.
OER and Wikipedia
Department for Education, computing programmes of study sets the KS2 expectations for collecting, analysing, evaluating and presenting data. The course develops that skill through twelve original fictional records. The allowed ranges and labels are exercise rules, not biological evidence.
Stratified sampling.PNG, Dan Kernler, CC BY-SA 4.0, original displayed unchanged. Erithacus rubecula with cocked head.jpg, Francis C. Franklin, CC BY-SA 3.0, linked as context.
CodeAI: AI Training Data & Bias introduces the relation between a model and its training examples. British Trust for Ornithology: Robin and Blackbird shows a different observation method. BTO BirdFacts: Blackbird lists the publisher’s video. The videos provide context and are not the source of the fictional lengths or counts.
Linked learning areas
aiMOOC Projects
Schulfach+


aiMOOCs


aiMOOC Projekte


MOOCwiki · Deutsch
Nach dem Lernen ist vor dem Lernen
Entdecke direkt den nächsten Lernkurs. Weitere Inhalte erscheinen, wenn Du weiter nach unten scrollst.
Zur MOOCwiki-HauptseiteMediathek
Mediathek wird aus dem Wiki geladen ...
Keine passenden Inhalte gefunden. Bitte ändere Suche oder Filter.
NEWSLernweltNOAH fragen