Skip to main content

Examples

Six complete workflows, each ported from a canonical, citable R original and worked backward from a realistic end model: the model’s requirements decide which of the four stages the recipe needs. Every report executes at build time; each example also links a line-matched R ↔︎ Python side-by-side.

Example Model Missing Wrangle Model prep Multivar
Ames mini · R↔︎Py
from TMwR ch. 8
lm none log, dummy none none
Ames realistic · R↔︎Py
from TMwR ch. 8
lm none log, other, dummy interact, ns none
Ames xgboost · R↔︎Py
from TMwR ch. 13
xgboost none novel*, one-hot, zv† none none
Concrete KNN · R↔︎Py
from TMwR ch. 15
KNN none none normalize none
Beans PCA · R↔︎Py
from TMwR ch. 16
none none zv†, orderNorm normalize PCA
Credit glmnet · R↔︎Py
from recipes vignette
glmnet impute ×2 other, dummy, zv† normalize none

* not yet built in mlfeatures; the report runs the buildable subset, and the side-by-side marks the gap in red where it occurs. † zero-variance filter; filters sit beside the stages rather than in them, shown here where they run.

Running the examples locally

The reports execute with the examples extra:

uv sync --extra examples
uv run quarto render examples   # or: great-docs build

Datasets ship with the package and load from mlfeatures.data (from mlfeatures.data import ames). They were exported from R’s modeldata package (ames, concrete, credit_data) and the dry-beans data from Koklu & Ozkan via the beans package; see the mlfeatures.data reference page for each dataset’s shape, target, and source.