Skip to main content

Fast PQLseq

Project description

PQLseqPy

PQLseqPy is a fast implementation of a PQLseq in Python. It is inspired by PQLseq (Sun et al. 2019; PMID: 30020412), with added flexibility and significant performance improvements.

✨ Features

  • Supports Binomial family with logit link
  • Order-of-magnitude faster than PQLseq
  • Handles variance components (tau1, tau2) with options:
    • Fixed values
    • Inference from data
  • Stable Newton-Raphson updates with adaptive step size
  • Regularization for numerical stability
  • Easy to use API similar to statsmodels

📦 Installation

You can easily install PQLseqPy via Conda:

conda install -c bioconda PQLseqPy

🚀 Usage

import numpy as np
from PQLseqPy import GLMM

# Simulated data
n = 100
np.random.seed(0)
X = np.hstack((np.ones((n, 1)), np.random.randn(n, 2)))
Y = np.hstack((np.random.randint(0, 10, (n, 1)), np.random.randint(1, 10, (n, 1))))
G = np.random.randn(n, 500)
K = G @ G.T

# Fit model
res = GLMM(X, Y, K).fit()

# Summary
param, coef = res.summary()
print(param)
print(coef)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pqlseqpy-0.1.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pqlseqpy-0.1.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file pqlseqpy-0.1.2.tar.gz.

File metadata

  • Download URL: pqlseqpy-0.1.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pqlseqpy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fb87ba13ee4ade6738496e8d6d42fe411279fc132cf57d4adb8ad7a2b1155c32
MD5 af20dfd0a6601e98b44eeae7385064ee
BLAKE2b-256 d3f9a7b4efff986bf313ded15a9b7918a50bf9426ec11d4bf638ef0e99876605

See more details on using hashes here.

File details

Details for the file pqlseqpy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pqlseqpy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pqlseqpy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b76debe4915391298567dd9fea10658cc08742689fbee39d7b2a70cf2090d7c5
MD5 fca934b9b147d6e1ea2750a0da4733a4
BLAKE2b-256 85880efc23ee883799b24b0a3fa4dd7cdb63de19c48ec6044c80b45464c044fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page