Skip to main content

Generating nomograms of logistic regression models

Project description

Project Description

simpleNomo is a python package for generating nomograms of logistic regression models with only model coefficients and variables ranges.

Backgroud

Nomogram, a graphical calculator, has adequately solved the problem of inconvenient calculation. Nomogram is a chart consisting of several arranged lines for visualization of logistic regression model. With the development of the electronic calculators and computers, nomograms become less popular these days. However, they are still very prevalent in the condition without the computation sources. There are several tools for generating nomograms. They are available in SAS, Stata, as well as rms and hdnom packages in R language.

However, these tools either lack an integrated toolbox such as SAS or take input only from model trained within the programming language like hdnom and rms. In this case, it is difficult for converting existing works that established logistic regression models but not published the training data or developed nomograms. Therefore, plenty of works will stagnate into logistic regression models with good performance rather than meaningful clinical applications.

simpleNomo is a straightforward framework for creating nomograms for logistic regression models. PyNG can accepts only the coefficients and range of predictors in a logistic regression model as inputs.

Requirements

pandas==1.2.4
numpy==1.21.5
matplotlib==3.5.1

To install

pip install simpleNomo

Or more specifically at https://github.com/Hhy096/nomogram.

Function Introduction

nomogram(path, result_title="Positive Risk", fig_width=10, single_height=0.45, dpi=300,
         ax_para = {"c":"black", "linewidth":1.3, "linestyle": "-"},
         tick_para = {"direction": 'in', "length": 3, "width": 1.5,},
         xtick_para = {"fontsize": 10, "fontfamily": "Songti Sc", "fontweight": "bold"},
         ylabel_para = {"fontsize": 12, "fontname": "Songti Sc", "labelpad":100, 
                        "loc": "center", "color": "black", "rotation":"horizontal"},
         total_point=100)

Example

Check https://github.com/Hhy096/nomogram for more examples.

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

simpleNomo-1.0.0.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file simpleNomo-1.0.0.tar.gz.

File metadata

  • Download URL: simpleNomo-1.0.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for simpleNomo-1.0.0.tar.gz
Algorithm Hash digest
SHA256 65a8c67f05f655e8179b9acb94b6e4f40313e7eec4a1e60481044b03890f0fff
MD5 3313acc911cb847093f1984d68bf2029
BLAKE2b-256 48c6ad37a5132923e764efda102c8b5b6eda1cff6a04ad27d6c831fd2bfabf4c

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