finds.dev← search

// the find

wepe/dive-into-ml-system

★ 230 · C++ · updated Jun 2018

Dive into machine learning system, start from reinventing the wheel.

A teaching exercise from 2018 that implements logistic regression in C++ with a ctypes Python wrapper, intended to show how ML libraries like XGBoost work under the hood. The README is in Chinese and the project was built as a one-time internal talk before the author left their research group. Aimed at students who want to see what's below the `import xgboost` line.

The ctypes bridging pattern is clearly demonstrated — C++ does the math, Python wraps it with a clean API. Using Eigen for linear algebra is the right call for a teaching project; it keeps the numeric code readable without rolling raw pointer arithmetic. The custom metric callback design is a reasonable approximation of how XGBoost exposes eval functions.

Abandoned since June 2018 — eight years of bit rot, Python 2 print statements, a compiled binary (`liblr.so`) checked into the repo. There are no tests, no build system beyond a one-liner Makefile, and no documentation beyond the README. The scope is a single algorithm (logistic regression) with no path to anything beyond it, so there's nothing to extend or learn from architecturally.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →