hea v. (Cantonese)
- to kill time; to hang around
- to do something without putting much care or effort into it.
- to go through the motions; to give a carefree response; to beat around the bush; to treat someone lightly
- to place things casually; to disperse (with an outward motion) (from wikitionary)
This project started as a laid-back exercise of implementing R's lmin Python many years ago. It was called lmpy at the time. I wanted to add lme and gam too, but didn't manage to go very far, mostly because the Python ecosystem back then still lacked general supports for generating the needed design matrices to fit such models. I come back to it from time to time, check community progress, tinker with it a bit myself, and slowly, try to do it with many generations of LLMs as they came along. It's kind of becoming my private benchmark for LLMs, and see at which point they can crack code porting from R to Python without too much hand holding. Until recently, they still couldn't. But since Claude Code with Opus 4.6, things started to change.
BTW, the name lmpy is blocked on PyPI due to the name is "too similar to some existing projects", so I asked Claude to brainstorm some other names and one of them is "hea, v., to measure" in Hawaiian, which is likely a hallucination. But I like it a lot, as it means something completely different in Cantonese and fit the vibe of this project nicely. :)
pip install heafor core functionalities.
or if you want to load the example datasets:
pip install "hea[data]"from hea import data
from hea.models import lm
gala = data("gala", package="faraway")
m = lm("Species ~ Area + Adjacent + Elevation + Nearest + Scruz", gala)
m.summary()See more examples.