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 sparse matrix speed-up in lme, you might want to use scikit-sparse, but you need to install some system deps first:

# mac
brew install suite-sparse

# debian
sudo apt-get install libsuitesparse-dev

then

pip install "hea[fast]"

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.7

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.7
File Size Uploaded
hea-0.1.7.tar.gz 1.5 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for hea 0.1.7
File
hea-0.1.7-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
hea-0.1.7-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
hea-0.1.7-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
hea-0.1.7-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.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
hea-0.1.7-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
hea-0.1.7-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 17.6 MB

Release files / hea-0.1.7.tar.gz

Download URL hea-0.1.7.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
8d398d2e9d12d0acbd52db367285ebd13b6190dc9b5929b7de1915bc619f4360
BLAKE2b-256 checksum
How to use checksums
d1db425acaad657457172479ebd0741142bd05ae5817d677e42f0f252279bb3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

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

Download URL hea-0.1.7-cp310-abi3-win_amd64.whl
Size 2.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d71c73d906ea8150ba7777e0301bc750258f29f1abca40b8ee777b502e77d7d4
BLAKE2b-256 checksum
How to use checksums
ac35f7f0b7ab1452ed630b7a1a18652c2bd8ac4c486fbb83d0da7da936d91714
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

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

Download URL hea-0.1.7-cp310-abi3-musllinux_1_2_x86_64.whl
Size 2.5 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
8eaf6298b7b911e656bf9600a2dc9fb903bebc5f19e3bca341697dadc9bbf0ef
BLAKE2b-256 checksum
How to use checksums
bb8ac3e831f6107e80b4831ff189dfdcac7c1d9f81fe1569a39728f2926a4a17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

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

Download URL hea-0.1.7-cp310-abi3-musllinux_1_2_aarch64.whl
Size 2.4 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
1e0a7511d91e45752f0950b631416f1e70c8ae22bf0f1275d9a553e6a534e14d
BLAKE2b-256 checksum
How to use checksums
dd322dc69ebcac98f785f1b7acb6cf50e66ba91a1dbfd7fc59003e141cd55c43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

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

Download URL hea-0.1.7-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.3 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
8fb02f7fe12605012f60aeae6fb82eaea12d51ffefa2ed41ee8914e6e8dac2e1
BLAKE2b-256 checksum
How to use checksums
64a83f0be1654d15b5893f321e4012aa346709dd3f0ced4baa422a8be6ba32d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

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

Download URL hea-0.1.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.3 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
26b8e14df2eeb3ddb8b0c5897540f6c2a82f1ea069289030f96f16f90d3b2ed6
BLAKE2b-256 checksum
How to use checksums
49299cdf7788dfe49654b981b982d3b00b3c0408b9a82ca313679e4883498426
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

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

Download URL hea-0.1.7-cp310-abi3-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ca4c2dd6833cc5a8734af4edeb9c1a109815030eec1b88a12418e80e27509b70
BLAKE2b-256 checksum
How to use checksums
a64896b71eb7e806b9c326dee70f97a13d057128baa80283d1201536a27b09c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

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

Download URL hea-0.1.7-cp310-abi3-macosx_10_12_x86_64.whl
Size 2.2 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
82ce24a1dc9f1e504c5771e93b217e2c516c3b8169945230b342156196234b7e
BLAKE2b-256 checksum
How to use checksums
e51416482542e84afd6b7d009c5033c2eab9cfc89801485c088223f1c343fa81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

8 release files

0.1.10

8 release files

0.1.9

8 release files

0.1.8

8 release files

This release

0.1.7 This release

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