Skills / Train a model
Train a model
Train their first machine learning model honestly. A small model on data they collected or may legitimately use, evaluated against a baseline, shipped as a demo page. Teaches what accuracy claims mean. Use when they say "I want to learn ML", "train a model", or bring a prediction idea.
Use this skill. Nothing to install.
Don't have an agent? · Raw file: skills/train-a-model.md
Watch the first two minutes
This is how a session goes, including the part everyone is afraid of. Click through it.
Scripted example of a real session.
Doesn't machine learning need a PhD?
A first honest model needs arithmetic and discipline. The model itself is a few lines of scikit-learn; the real work is the part no degree gates: splitting off test data before you touch anything, computing a baseline before training, and describing the result in words that don't oversell it. A few hundred rows you collected yourself teach everything the lesson requires. These projects are all first models of exactly that size:
What you end up with
A trained model in a repo, a demo someone else can try, and an evaluation you can defend. The README's table is the heart of it.
predictor accuracy always guess "win" (baseline) 0.63 logistic regression 0.71 + rest-days feature 0.74
On my 300 logged games it was right 74% of the time; always guessing a win gets 63%.
Trained on one season of one league. Next season's teams, or anyone else's league, would likely score worse. Rest-days helped; opponent strength isn't in the data at all.
- The baseline row is non-negotiable. Without 0.63 on the page, 0.74 sounds either amazing or terrible. Next to it, it's exactly what it is.
- The extra feature came from error analysis. You look at the games the model got wrong, one at a time, notice a pattern, add one feature, re-evaluate the same way. One round, then stop; the loop matters more than the score.
- The test set was used once. Sixty games went in a drawer at the start and came out at the end. That's what makes the numbers mean something.
Anatomy of an honest accuracy claim
The skill drills one sentence shape, because most accuracy claims in the wild are missing at least two of these parts:
- A The number, plainly. Never "the AI knows".
- B The dataset and its size, right beside the number.
- C The dumb baseline, so the reader can see what the model actually earned.
- D Held-out test data, used once. Without this the number is a rehearsal, and it doesn't count.
Questions people actually ask
Do I need the math?
To use logistic regression or a small tree honestly, no. You need to understand your own evaluation: what the split is, what the baseline is, and what could still make the number misleading. The skill makes you able to explain all three in your own words, which is more than many accuracy claims online can offer.
Do I need a GPU or a paid API?
No. scikit-learn runs on any laptop, and a free Colab notebook covers you if yours struggles. Nothing in the skill costs money, and fine-tuning large models is deliberately out of scope.
Where do I get data?
The best source is your own life: things you logged, games you played, photos you took. Otherwise an open dataset whose license you actually read. The skill rules out scraping people's content and anything containing personal information about others.
Is 74% accuracy good?
Alone, unanswerable; that's the lesson. Next to a 63% baseline on 300 examples, it's a real improvement stated honestly. A model at 91% against a 90% baseline gets described exactly that way too.
Can this go on my resume?
Yes, with the honest numbers as written, and it reads well precisely because it's verifiable: repo, README, baseline, limitations. The build-resume skill turns it into a line a screener can check.
Where to go from here
More first models with data you can legitimately use:
Make round two possible:
Ideas to use it on
- Beat the forecast — For one month, predict tomorrow's high temperature for your exact location and score yourself against the official forecast.
- An image classifier for your own photos — Train an image classifier on categories from your own camera roll: your dog vs other dogs, sketchbook pages vs lecture notes, the climbing gym vs the skatepark.
- Count something real with a camera — Point a camera you own at something countable in your world (birds at the feeder, cars in your driveway, bees at the balcony planter) and build a system that counts visits automatically.
- A text classifier for your own writing — Train a classifier on text you already own: your notes, journal entries, essays, saved snippets, or drafts, sorted into categories you actually use.
- A recommender trained on your own ratings — You have years of opinions about books or movies.
- Predict the season — Can you predict how your team's remaining games go, and prove you called it before kickoff?
- Will you actually like this track — Request your full listening-history export and build a model that predicts whether you will like a track you have not heard yet.
Curious? Read the full skill — the exact instructions your agent gets
--- name: train-a-model category: code description: Train their first machine learning model honestly. A small model on data they collected or may legitimately use, evaluated against a baseline, shipped as a demo page. Teaches what accuracy claims mean. Use when they say "I want to learn ML", "train a model", or bring a prediction idea. --- # train-a-model Walk someone through their first honest machine learning project: a small model, data they are allowed to use, an evaluation that compares against a dumb baseline, and a demo. The lasting lesson is epistemic. Knowing what a model's number means and refusing to oversell it. ## Ground rules - Data must be theirs or clearly licensed: something they collected (their study hours, their game results, photos they took) or an open dataset with a license they read (UCI, Kaggle open datasets, government open data). No scraping people's content, nothing with personal information about others. Small is fine; a few hundred rows teaches everything. - Free and local: Python with scikit-learn, or a free Colab notebook if their machine struggles. No paid APIs, no GPU rental. Fine- tuning giant models is out of scope; a classifier or regressor they can inspect is the right first model. - The baseline is non-negotiable. Before any model trains, compute the dumbest predictor: most common class, or the mean. Every later number is reported next to it. A model that beats 90% baseline accuracy with 91% gets described exactly that way. - Split before you touch. Create train, validation, and test sets. The test set goes in a drawer and is used once, after model choices are finished. Explain leakage with one concrete example from their own dataset, and check for it together. - Honest words only, in the README and out loud: "on my 300 examples it was right 84% of the time; always guessing the majority gets 76%". Never "the AI knows", never an accuracy claim without the baseline and the dataset size beside it. ## The path 1. Pick the question and the data: what is being predicted, from what features, and why they are allowed to use this data. Load it and look at twenty raw rows together before anything else. 2. Baseline first: majority class or mean, scored on the validation split made at the start. Write the number down. 3. Train a simple model (logistic regression or a small tree or forest). Score on the validation split. Compare with the baseline in one sentence they say out loud. 4. Look at validation mistakes, one at a time. Which examples fool it, and is there a reason? One round of improvement (a better feature, more data, a different model), then re-evaluate the same way. Stop after one round; the loop matters more than the score. Freeze the chosen method, then evaluate the baseline and model on the untouched test set once. Do not choose another model after seeing that result. 5. Demo: a small page or notebook where a new input gets a prediction. If the model exports to JSON or ONNX easily, a static page works; otherwise the demo is the notebook, shipped in the repo with outputs visible. 6. README in their words: the question, the data and its origin, the baseline, the result, and a limitations paragraph saying where it would fail (new school, next season, different camera). ## Done - A trained model on legitimate data, in a repo with the code - Validation results used for model choice and one final baseline/model result on the untouched test set, all reported in the README - One error-analysis round with the change it prompted - A runnable demo (page or notebook) someone else can try - They can explain train/test split, baseline, and one way their evaluation could still be misleading Then: automate-a-task to keep collecting the data that would make round two real, or build-resume with the honest numbers as written.








