Chapter 20 | Inside the Mind of Artificial Intelligence

Train a tiny classifier, predict a word, and build a study helper. All data are invented or supplied in this file. No internet connection or personal information is needed.

1. Teach a tiny model

Six synthetic training points have a texture score and a class label. Train the model, then move the test feature slider. The extra conflicting example has a high texture score but class 0.

Class 1 estimate
The four synthetic test labels are predefined: 0.15 and 0.45 are class 0, 0.55 and 0.85 are class 1. This is not a real fruit dataset.

2. Predict the next word

3. Ask a study assistant

Ask about GPS, a hash, barcodes or QR codes. The assistant retrieves one of four notes; it does not generate new facts.

Read the four notes

Read the JavaScript

These functions are the same as in the book. Copy them to your own editor to modify them.

Return to the companion index