# Train a Classifier > A free classifier trainer that runs in the browser: drop or paste a CSV or TSV file, pick the column to predict, and four kinds of model are trained and compared by cross-validation. You get the best one's accuracy against always guessing, its mistakes, how much each column matters, readable decision-tree rules and your CSV back with predictions. https://train-classifier.skillsafe.ai/ ## What it does (free, no sign-in, nothing uploaded) - Reads CSV, TSV, semicolon- and pipe-separated text (quoted fields, a byte-order mark, CRLF), or cells pasted from a spreadsheet. Up to 20,000 rows are read. - Picks the column to predict: one named like an outcome (label, class, status, churned, species...) or else the last column with 2 to 20 different values. Any such column can be chosen instead. - Learns from the other columns: number columns are scaled, category columns become yes/no flags (the 15 commonest values), blanks count as the column average. ID-like columns, free text and single-value columns are left out. - Trains logistic regression (C = 0.1, 1, 10), a decision tree (depth 3, 5, 8), k-nearest neighbours (3, 7, 15) and Gaussian naive Bayes, and compares all ten by stratified 5-fold cross-validation (3 or 10 folds as options) from a fixed seed on up to 3,000 labelled rows. The best macro F1 wins; ties go to the simpler model. Results were checked against scikit-learn on the same folds. - Shows accuracy, macro F1, balanced accuracy and ROC AUC (two classes), next to always guessing the commonest class; a confusion matrix; precision and recall per class; permutation importance per column; decision-tree rules in the file's own units; and cautions such as a rare class, a class mostly missed, a small file or one column doing all the work. - Rows with no value in the column to predict are predicted by the winner, trained on all labelled rows. - Exports: the CSV with `predicted_`, `confidence`, `correct` and `how` columns; a CSV of every model's scores; the rules as text; a Markdown summary. ## Optional AI step (signed-in, metered) "Explain the result with AI" writes a short plain-words explanation: how good the model is against guessing, which columns it relies on, why the commonest mix-ups happen, advice for each caution and next steps. It is sent only a summary of what the page measured (class sizes, scores, mix-up counts, column names with their importance, the cautions) - never the rows. The page keeps only columns, mix-ups and cautions it sent, rejects any text with numbers in it, and flags causal claims or a skipped caution. - API: https://train-classifier.skillsafe.ai/api.html - Input fields: `task` ("explain_model"), `facts` (JSON text: target, classes, rows_labelled, rows_checked, rows_unlabelled, folds, chosen, scores, baseline, models, per_class, mix_ups, columns, columns_total, flags). - Output: one JSON object `{"task":"explain_model","summary":"...","drivers":[{"column","note"}],"mix_ups":[{"actual","predicted","note"}],"cautions":[{"flag","advice"}],"next_steps":["..."]}`. ## Source Adapted from the agent skill @dkyazzentwatwa/classification-helper from dkyazzentwatwa/chatgpt-skills (https://github.com/dkyazzentwatwa/chatgpt-skills): https://skillsafe.ai/skill/@dkyazzentwatwa/classification-helper . An independent JavaScript implementation; no upstream code is used.