● model training console · 05 // deployed systems NEW
Your Machine-Learning Tutor
Knowledge-Aware Model Interpreter
A Python library that builds a model from your data — then explains what it found, in plain English. Built for the rest of us: honest about what it knows, and patient enough to teach you why.
// the magic moment — three lines, one plain-English verdict
You hand it a messy spreadsheet, type three lines, and kami tells you what your data can predict, how good the model is, how much to trust it, and exactly what to do next. No metrics to google. No charts to decode.
load · clean · learn
from ablevlabs import kami df = kami.load("houses.csv") # read it df = kami.clean(df) # tidy it result = kami.train(df, target="price") # learn from it
====================================================================== WHAT KAMI FOUND ====================================================================== Question Can 'price' be predicted from the other columns? Answer Yes - and quite well. How good R2 = 0.97. In plain terms, the model explains about 97% of why 'price' changes from one row to the next. Typical miss the model is usually off by about 17324 (e.g. predicted 159179, actual 173500). Verdict [*****] Excellent Confidence Moderate - 60 unseen test rows. What we learned: - 'size_sqft' and 'age_years' look most related to 'price' (related to, not necessarily the cause). - There's real signal here - your columns do help predict 'price'. Do next kami.feature_importance(result) ======================================================================
// what it is
Kami does the modelling for you — it figures out whether you're predicting a number or a category, cleans the data, trains a solid model the right way, and scores it on data it has never seen. Then it turns the result into a sentence you can actually understand.
It favours clear explanations and safe defaults over raw speed and endless knobs. It's the friend who teaches you to ride the bike — and when you outgrow it, the model it hands you is plain scikit-learn, so you walk straight into the big leagues with it already in hand.
// it doesn't just model — it teaches
Stuck on a concept? Ask about any model and get a story, not a textbook. Hit a word you don't know? Kami translates the jargon. Every number comes with a sentence — and every sentence is one you can follow.
kami.learn("RandomForest")
kami.learn("RandomForest")
====================================================================== KAMI ACADEMY - RANDOM FOREST ====================================================================== Difficulty: Beginner (Kami's default model) THE IDEA Ask one person to guess and they might be biased. Ask a hundred different people and average their guesses, and the errors tend to cancel out. A Random Forest grows hundreds of decision trees, each on a random slice of your rows and columns, then averages their votes. The crowd beats the individual. GOOD FIT WHEN + Almost any table + Mixed data and missing values + You want strong results with no tuning MAYBE NOT WHEN - You need maximum speed - You need a model you can read as one simple rule ======================================================================
kami.translate("overfitting")
kami.translate("overfitting")
'Overfitting' in plain English:
The model memorised the training data instead of learning the general
pattern - so it looks great on data it has seen, but does poorly on new data.
Why it matters:
It gives false confidence: it will likely disappoint on the data you
actually care about. Cross-validation helps you catch it.
// charts that explain themselves
Kami draws the charts you'd expect — histograms, scatter plots, bar and pie charts, a correlation heatmap — but it never just hands you a picture and walks away. Each one prints a plain-English note telling you what you're looking at and what to notice. And if you're not sure which chart even fits your data, kami.suggest_charts(df) tells you, with copy-ready code.
…and the caption Kami prints with each one — so you read the picture instead of guessing at it:
kami.hist(df, 'price') What you're looking at: how often each range of 'price' shows up - tall bars are common values, and the overall spread tells you how varied 'price' is. Your data: 'price' ranges from 29000 to 428800, with most values near 227750. kami.scatter(df, 'size_sqft', 'price') What you're looking at: each dot is one row, placed by its 'size_sqft' (left-right) and 'price' (up-down). A clear upward or downward drift means they move together; a shapeless cloud means little relationship. Your data: 'size_sqft' and 'price' show a strong positive relationship (correlation +0.96).
not sure which chart? ask kami
kami.suggest_charts(df)
Kami: Chart ideas for your data (3 numeric, 1 category column(s)):
See how ONE column is spread out:
kami.hist(df, 'size_sqft') # the shape of a number column
kami.bar(df, 'neighborhood') # how many rows per category
kami.pie(df, 'neighborhood') # the same, as shares of the whole
See how columns RELATE to each other:
kami.scatter(df, 'size_sqft', 'bedrooms') # do two numbers move together?
kami.heatmap(df) # every numeric pair at once
A quick overview of everything at once:
kami.quickplot(df)
// guardrails
Quietly, automatically, on every run, kami watches for the traps that burn beginners (and plenty of pros). When something looks too good to be true, it says so before you stake anything on it.
// how it works
Point kami at a CSV or a DataFrame. It reads it and shows you what's inside.
Text-numbers, dates, missing values, rare categories — handled automatically.
It picks a model, scores it on unseen data, and explains the result out loud.
You get a real result object back. result.raw is the underlying scikit-learn model,
and result.predict(new_row) makes predictions on new data — so kami is a starting point, never a dead end.
// cheat sheet
install / upgrade & import
# install or upgrade to the latest pip install -U ablevlabs from ablevlabs import kami
train a model — and get the explanation
df = kami.load("houses.csv") df = kami.clean(df) result = kami.train(df, target="price") # trains + explains champ = kami.bakeoff(df, target="price") # races models, picks a winner
predict on new data
new_row = result.example_row() # a filled-in template to edit new_row["size_sqft"] = 2200 kami.predict(result, new_row)
understand & visualise
kami.feature_importance(result) # what mattered, in plain words kami.plot_predictions(result) # see how close it got kami.suggest_charts(df) # which charts fit your data
learn the craft
kami.learn("GradientBoosting") # a lesson on any model kami.translate("R2") # any jargon term, decoded kami.roadmap() # the whole workflow, step by step
| train() argument | what it does |
|---|---|
target | The column you want to predict. Required. |
explain | 'silent', 'guide' (default), or 'teacher' — how much kami talks. |
validate | 'holdout' (default) or 'cross' for cross-validation. |
missing | 'fill' (default) or 'drop' for rows with gaps. |
ignore | A list of columns to leave out of the model. |
// start here
One line to install, three to your first explained model. Kami meets you exactly where you are — and grows with you when you're ready for more.