Skip to main content

hea: Linear Models with Python

hea v. (Cantonese)

  1. to kill time; to hang around
  2. to do something without putting much care or effort into it.
  3. to go through the motions; to give a carefree response; to beat around the bush; to treat someone lightly
  4. 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. :)

Install

pip install hea

for core functionalities.

or if you want to load the example datasets:

pip install "hea[data]"

Usage

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.

Metadata

Release files for hea 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hea 0.1.9
File Size Uploaded
hea-0.1.9.tar.gz 1.8 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for hea 0.1.9
File
hea-0.1.9-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
hea-0.1.9-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
hea-0.1.9-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
hea-0.1.9-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
hea-0.1.9-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
hea-0.1.9-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
hea-0.1.9-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 20.7 MB

Release files / hea-0.1.9.tar.gz

Download URL hea-0.1.9.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
eeb08b716c3aa3631e84e048f251240b59f837da92c73fc1b933b02081c7c8a5
BLAKE2b-256 checksum
How to use checksums
2067a221a9fe93549a815767850572b3a4d97e962f7e0cf4a0ffab63ea9c6871
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / hea-0.1.9-cp310-abi3-win_amd64.whl

Download URL hea-0.1.9-cp310-abi3-win_amd64.whl
Size 2.6 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4f29cc6213be98c93ec32389ef2dda3b965bdcfcf65ca6a5505295a424c5de03
BLAKE2b-256 checksum
How to use checksums
64dec655c3342746739ba7c95b29c4f03be331a83ca323e88a65b156cdc235c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / hea-0.1.9-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL hea-0.1.9-cp310-abi3-musllinux_1_2_x86_64.whl
Size 2.9 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
e4eb5cb8e18f4439a95369628fb4dd6be476798247b1bc81640b764b06a39e4b
BLAKE2b-256 checksum
How to use checksums
017508f2518d8a4c584b481092096b6fde8e6e14e9ceef2655d7837f73eda59a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / hea-0.1.9-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL hea-0.1.9-cp310-abi3-musllinux_1_2_aarch64.whl
Size 2.8 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
1eb7cdb72122a131b36cce7cb9067c2794c3ba043806ae524ac3464e3c83661e
BLAKE2b-256 checksum
How to use checksums
bfce77474f7390950e9feb135ce4ef0107d0dfb1ce578e84999c81c1497ae1c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / hea-0.1.9-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL hea-0.1.9-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.7 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
3ae65fb6f45e4a8ce068ecd8498511b3d5d3cd2688a94e669c670661f8e0ed22
BLAKE2b-256 checksum
How to use checksums
90646710ebec1f23f7b5a97b7ff75202a2d5e66a8d69bac13833b5b1ad62ca6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / hea-0.1.9-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL hea-0.1.9-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.7 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
b07901ed7e690bf8518ea331772049da23a4a8d5319bf93f84e3c52534162e90
BLAKE2b-256 checksum
How to use checksums
0b6737f2fc512fe8438a8192fcea4e960e626529d5fb530bac58faddee2772a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / hea-0.1.9-cp310-abi3-macosx_11_0_arm64.whl

Download URL hea-0.1.9-cp310-abi3-macosx_11_0_arm64.whl
Size 2.6 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4280b620ac1d8cdbc65c87cf4aa7a5a2f14ca304819f9dd6ed2ad9e80708e2c7
BLAKE2b-256 checksum
How to use checksums
c6ede404869186e91ef0c5dbb0b32a97e33e4ed0359020a66449872c5b77ffdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / hea-0.1.9-cp310-abi3-macosx_10_12_x86_64.whl

Download URL hea-0.1.9-cp310-abi3-macosx_10_12_x86_64.whl
Size 2.6 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a6fe15ec6346ca7310a7abe0eec02ca31162d9405626490c79181fdae6606d92
BLAKE2b-256 checksum
How to use checksums
e638bb27374b80229735ffb1be272dd6658e7492e2eecf0fb724801ee0869f7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

8 release files

0.1.10

8 release files

This release

0.1.9 This release

8 release files

0.1.8

8 release files

0.1.7

8 release files

0.1.6

8 release files

0.1.5

8 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page