Capstone: Teach the Computer (and Use AI Wisely)


You’ve reached the end — of Phase IV and the whole course. You started the summer drawing a single line with a turtle. Now you can train an artificial intelligence. For your capstone, you’ll teach a computer to recognize something, present how well it learned, and then have the most important conversation of all: how to use AI wisely.

💡 In Colab.

Part 1: Teach the computer

Pick a model to train — the digit recognizer (images) or the penguin classifier (measurements) — and run the full five-step recipe. Here’s the digit version as a template:

from sklearn.datasets import load_digits
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import train_test_split

digits = load_digits()
X, y = digits.data, digits.target

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)

model = KNeighborsClassifier(n_neighbors=3)
model.fit(X_train, y_train)

print("My AI's accuracy:", model.score(X_test, y_test))

Part 2: Present it

A real ML project comes with a short report. Write yours as print statements:

print("=== MY MACHINE LEARNING PROJECT ===")
print("What it does: recognizes handwritten digits 0-9")
print("It learned from:", len(X_train), "example images")
print("Accuracy on new images:", round(model.score(X_test, y_test) * 100), "percent")
print("It struggles most with: messy or unusual handwriting")

Make it about your model — what it predicts, how many examples it learned from, its accuracy, and where it slips up. That’s exactly how professionals describe a model.

Make it your own 🚀

Train the model you want and report on it:

  • Digits: recognize handwriting (above).
  • Penguins: predict species (or sex) from measurements — your Phase III dataset, now powering an AI.
  • Your data: load titanic and predict survived, or any dataset with number features and a category to predict.

Run the five steps, tune it a little, and write your report.

Part 3: The most important part — using AI wisely

You’ve seen it all phase long: AI learns only from the examples it’s given. That one fact carries a big responsibility. Think and talk about these with a grown-up:

  • AI can be biased. If a face-recognition AI learned mostly from one group of people, it works worse for everyone else — not because it’s “mean,” but because its examples were lopsided. The people who choose the examples decide what the AI is good and bad at.
  • AI is confident, even when wrong. It gives a score, not a guarantee. A doctor, judge, or driver trusting an AI blindly is dangerous. AI should help people decide, not decide for them on big things.
  • AI doesn’t understand — it predicts. The writing AI didn’t mean anything; it guessed likely words. Treat its output as a draft to check, not the truth.
  • Your data is valuable. AI is built from data, often people’s data. Be thoughtful about what you share.

The takeaway isn’t “AI is scary.” It’s that AI is a powerful tool built by people, from examples chosen by people, so it’s only as fair, careful, and honest as the people who make and use it. Now that you’ve built one, you understand it better than most adults do. Use that wisely.

Think about it 🔮

A company builds an AI to pick the “best” job applicants by learning from who they hired in the past. What could go wrong? (If past hiring was unfair in any way, the AI learns and repeats that unfairness, confidently. It mirrors its examples. That’s why humans must check what AI learns from, and what it decides.)

What you learned in this final phase

  • You used real AIs (image, sentiment, text) and found where they fail.
  • You learned that ML means teaching from examples, with features → label.
  • You trained, tested, and tuned your own models with scikit-learn.
  • You learned to think critically about AI: bias, confidence vs. correctness, and responsibility.

🎉 You did it — the whole journey

Look back at your summer:

  • Phase I: you drew with code — loops, variables, functions, randomness.
  • Phase II: you built programs that think and talk — logic, data, projects.
  • Phase III: you became a data detective — loading, exploring, and charting real data.
  • Phase IV: you trained artificial intelligence — and learned to use it wisely.

From one turtle line to a working AI. That’s a real programmer’s journey, and you walked the whole thing. Where to next? Keep building — make a game, analyze data about something you love, train a model on your own examples. You have the tools now. The rest is your imagination. 🚀🐢🤖