Machine learning basics
Classification, regression and object detection
The kinds of questions a PetalEdge model can answer, and how to pick the right one.
On this page
The idea in one minute
Every machine-learning model answers a question. The kind of question decides which learning block you use.
| Task | The question | The answer looks like | Example |
|---|---|---|---|
| Classification | Which label is this? | One label from a fixed list | wave, idle or shake |
| Regression | How much? | A number | Speed: 3.2 |
| Object detection | What is in the picture, and where? | A list of objects with positions | box at (40, 60), helmet at (120, 30) |
| Anomaly detection | Is this normal? | A score; high means unusual | Machine sound score 0.9 (unusual) |
Classification
A classification model picks one label from the labels you created. It gives a score to every label, and the highest score wins.
Example: a motion model sees one second of sensor data and answers wave 0.90, shake 0.07, idle 0.03. The prediction is wave.
Regression
A regression model predicts a number instead of a label. Your labels must be numbers, for example 0, 1.5 or 3. The model can also give values in between, such as 2.1.
Example: predict how fast someone is pedalling from a wrist sensor.
Object detection
An object detection model looks at an image and finds each object in it. One image can contain many objects. PetalEdge has two styles:
- Boxes: the model draws a rectangle around each object (Vision Pro, EdgeDetect Lite).
- Centres: the model marks the centre of each object, which is enough for counting (NanoVision).
Face recognition is a related task: FaceRec-Edge finds faces and says who each one is.
Anomaly detection
An anomaly detection model learns only what normal looks or sounds like. When something new is too different, it gets a high anomaly score. You don't need examples of every possible fault, which is useful because faults are rare.
A simple example
You run a small workshop and want three things:
- Tell whether a drill is on or off from its sound → classification (Audio).
- Notice when the drill sounds strange → anomaly detection (Audio).
- Count the screws in a tray from a photo → object detection (Image, NanoVision).
Where you use this in PetalEdge
| Project type | Tasks available |
|---|---|
| Image | Object detection (NanoVision, Vision Pro, EdgeDetect Lite), face recognition (FaceRec-Edge) |
| Motion | Classification, regression |
| Audio | Classification, anomaly detection |