Skip to main content

Entity prioritization and escalation detection using GLMM statistical models

Project description

Priorityx: Entity prioritization and escalation detection using GLMM statistical models

PyPI version Downloads Tests Python License

Entity prioritization and escalation detection using GLMM statistical models

Installation

pip install priorityx

Quick Start

import pandas as pd
import priorityx as px

df = pd.read_csv("data.csv")

# Default: volume x growth (single GLMM)
results, stats = px.fit_priority_matrix(
    df,
    entity_col="service",
    timestamp_col="date",
    temporal_granularity="quarterly",
)
# Returns: entity, x_score, y_score, count, quadrant

px.plot_priority_matrix(results, entity_name="Service", save_plot=True)

Custom Axes

# Custom Y axis: volume × resolution_days (two GLMMs)
results, _ = px.fit_priority_matrix(
    df,
    entity_col="service",
    timestamp_col="date",
    y_metric="resolution_days",
)

# Custom both axes: disputed_amount × paid_amount
results, _ = px.fit_priority_matrix(
    df,
    entity_col="service",
    timestamp_col="date",
    x_metric="disputed_amount",
    y_metric="paid_amount",
)

Composite Indices

# Add entity metrics
metrics = px.aggregate_entity_metrics(
    df,
    entity_col="service",
    duration_start_col="opened_at",
    duration_end_col="closed_at",
    primary_col="exposure",
    secondary_col="recovery",
)
results = results.merge(metrics, left_on="entity", right_on="service", how="left")

# Add weighted indices: RI (Risk), SQI (Service Quality), EWI (Early Warning)
results = px.add_priority_indices(
    results,
    volume_col="count",
    growth_col="y_score",
    severity_col="total_primary",
    resolution_col="mean_duration",
    recovery_col="secondary_to_primary_ratio",
    # customize weights (default shown)
    w_volume=0.4, w_growth=0.4, w_severity=0.2,
    w_resolution=0.5, w_recovery=0.5,
    w_risk=0.7, w_quality=0.3,
)

# Top priority entities
top_risks = results.nlargest(10, "EWI")

Features

  • GLMM-based priority matrix (Q1–Q4) with entity-level intercept/slope insights
  • Priority-based transition timeline (Crisis / Investigate / Monitor / Low) with spike markers (*X, *Y, *XY)
  • Cumulative movement tracking and trajectory visualizations
  • Transition driver analysis that surfaces top subcategories causing quadrant shifts with spike summaries
  • Deterministic seeding option for reproducible GLMM runs (set PRIORITYX_GLMM_SEED)

Use Cases

IT incidents, software bugs, compliance violations, performance monitoring.

Documentation

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

priorityx-0.5.0.tar.gz (263.5 kB view details)

Uploaded Source

Built Distribution

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

priorityx-0.5.0-py3-none-any.whl (55.3 kB view details)

Uploaded Python 3

File details

Details for the file priorityx-0.5.0.tar.gz.

File metadata

  • Download URL: priorityx-0.5.0.tar.gz
  • Upload date:
  • Size: 263.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for priorityx-0.5.0.tar.gz
Algorithm Hash digest
SHA256 524286e4e816301de7e108dd394fd9c162c5a9e83f1d01ee6af16d6bdaae1364
MD5 9cb5bdd5c495f90a1c14f6319c0ee96a
BLAKE2b-256 41c4507967effa6cc034f3985f673916c9ebccbfd2466e61d18ad97b3c7af280

See more details on using hashes here.

Provenance

The following attestation bundles were made for priorityx-0.5.0.tar.gz:

Publisher: release.yml on okkymabruri/priorityx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file priorityx-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: priorityx-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 55.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for priorityx-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85a848bdff7442edf7845aabda3b2b9e5772c9de6cf21fe0c2c5a078a0377c43
MD5 b6abd946279952b35e589eafb4578690
BLAKE2b-256 d3ff031aa1a3e71392ab098f0b1e74fcd716b983aba96ad85d531fc69521f504

See more details on using hashes here.

Provenance

The following attestation bundles were made for priorityx-0.5.0-py3-none-any.whl:

Publisher: release.yml on okkymabruri/priorityx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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