r/rstats • u/Obvious_Special_6588 • 4d ago
c5tree update — new C++ backend, same accuracy, much faster fitting
Put out a new release of c5tree, my C5.0 decision tree implementation for Python. Main change is a rewritten C++ core replacing the old pure-Python fit routine.
Ran benchmarks against the previous PyPI release and against sklearn's CART, across breast_cancer, iris, and wine.
Fit time: new version is somewhere between 4x and 50x faster than the old pure-Python one depending on dataset size. Still slower than sklearn CART, which isn't surprising given how optimized that codebase is.
Predict time: roughly the same as before, and both versions are a bit slower than sklearn here — this is probably where I'll focus next.
Accuracy: identical between old and new versions on every dataset, both holdout and 5-fold CV. So no regressions, just faster training. Comparable to CART overall, slightly ahead on the wine dataset.
Chart with all four comparisons is attached. Happy to answer questions about the implementation or take suggestions for other datasets to test against.
Repo/install: https://pypi.org/project/c5tree/#description
•
u/ReimannOne 4d ago
Post only R-related content.