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.1.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.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pqlseqpy-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 60a624eb5db3aaabfd6b01c0ec9610c9ba1ff4416af60f77da67da4fa83d054c
MD5 ab7b89c6e43bf42958aa480e657d7be7
BLAKE2b-256 74b0faad251cab3f4ce238e6940f7797b1c9d3bf652bfb63aa49bc8c9c4155dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pqlseqpy-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9825818e6532883a341ed3083d718a59f4c7e58794c9ba12e95dfb52b7aada95
MD5 3d6fb5664a7beb1ee13ecfb6a4b6f0b0
BLAKE2b-256 c120d9f46b7f0e4345a5e3d8d642efa63dbd553a66b07f3c520c85e84087ae4f

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