v1.9.0 — split, and column importance
Both of these exist because a default lies.
michi split
A random split is right until the rows aren't independent — and then it's confidently wrong.
michi split data.csv --target churned --group customer_id
michi split data.csv --time signup_date --test-size 0.25| Strategy | When |
|---|---|
stratified |
Default for a classification target — an unstratified split on imbalanced data can starve a fold |
group |
Rows share an entity. Four of a customer's rows in training and one in test isn't generalisation, it's memory |
time |
A series. A test set drawn from before the training rows asks the model to predict the past |
random |
Everything else — and it now says plainly what it cannot promise |
The summary states the property the split was chosen to give, then verifies it:
No value of customer_id appears on both sides — the leak a random split
would have caused is absent.
If a group does span both sides, it says so loudly rather than printing a guarantee that didn't hold.
eval --importance
column drop when shuffled ±
─────────────────────────────────────────────────────────
age +0.2932 0.00899
salary +0.16 0.0118
region +0.04764 0.0092
signup_date +0.000405 0.00282 within noise
What this model uses, not what matters: a column it ignores may still drive
the outcome, and two correlated columns split the credit between them.
Measured through predict and nothing else — so a PyTorch network and a random forest are measured identically, with no per-model introspection for michi to keep working forever.
Each column is shuffled several times and the spread reported, because an importance smaller than its own noise is not a finding. Those rows are marked rather than hidden: a column measured as unimportant is a result.
The wording is load-bearing. Reporting a bare ranking has talked people into deleting a feature that mattered, so the caveat sits under the table rather than in the docs.
Also lands as a chart in michi ui, and 分 split joins the CLI stage map.
Fixed
--importance was declared as a flag and never passed to the evaluator — it silently did nothing. Caught by running it, not by a test.
Install: pip install komichi