sxsphinxstack

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.

Open in ChatGPT Open in Claude prefilled and ready; just hit send
for Gemini, Copilot, or Cursor: paste it, then say "use the train a model skill"

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.

(pastes the skill) i want to learn ML but i'm assuming it needs a PhD and a GPU i don't have
It needs a few hundred rows and a free notebook. What data do you actually have? Things you collected yourself work best: study hours, game results, photos you took.
i've logged about 300 games of my rec league with stats. could i predict whether we win?
Yes, and since you collected it, we're allowed to use it. Before any model trains, we compute the dumbest possible predictor: always guess the most common outcome. Every number after that gets reported next to it.
why start with a predictor that dumb?
Because "the model is 74% accurate" means nothing on its own. If always guessing a win already gets 63%, the model earned eleven points, and that's the honest sentence. The baseline is what keeps the claim from being marketing.
and i really don't need to pay for a GPU or an API?
No. scikit-learn on your machine, or a free Colab notebook if your laptop struggles. A classifier you can inspect is the right first model; fine-tuning giant models is a different sport and out of scope here.

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:

Camera roll classifier Taste predictor Personal recommender

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.

EVALUATION (60 HELD-OUT GAMES OF 300, SPLIT BEFORE TRAINING)
Example
predictor                      accuracy
always guess "win" (baseline)  0.63
logistic regression            0.71
+ rest-days feature            0.74
THE README SENTENCE
On my 300 logged games it was right 74% of
the time; always guessing a win gets 63%.
LIMITATIONS (ALSO IN THE README)
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.
  1. 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.
  2. 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.
  3. 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:

right 74% of the time · on my 300 logged games · baseline gets 63% · tested on games the model never saw

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:

Bird feeder counter Beat the forecast Predict the season

Make round two possible:

Automate a task: keep collecting data Clean a dataset Build your resume with the honest numbers

Ideas to use it on

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.