Skip to main content

Drawing the nomogram with python, and explain the model with nomogram-drived data

Project description

Linear algorithms, such as logistic regression and Cox regression, remain popular in clinical model building. A prerequisite for these linear algorithms is the existence of a linear relationship among variables. When a linear algorithm performs well on a dataset, it validates this prerequisite. Consequently, relevant packages can be utilized to explain the predictions of the linear model through global and local methods.

It is often claimed that linear models possess self - explanatory properties, using coefficients like beta or odds ratios (OR) to show the contribution of variables to the prediction. However, this is not entirely accurate. From the perspective of global model explanation, beta values or ORs are not comparable across variables. Thus, it is impossible to determine which variable is more important. Regarding local model explanation, the indicator should reflect the current contribution of case - specific values to the case - specific prediction. But beta or OR values are consistent across cases and cannot capture differences between different cases. In conclusion, beta or OR values cannot be regarded as a proper explanation of the linear model.

The nomogram algorithm is suitable for explaining linear models, yet this functionality has not been fully incorporated. Therefore, this package was developed to address this need. Two types of values are employed to explain the model globally and locally. One is the metadata, which is the product of beta values and variables, and the other is the nomogram score.

  1. function introduction

preprare the data

golable explaination

partial explaination

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

nomogram_explainer-1.0.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

nomogram_explainer-1.0.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file nomogram_explainer-1.0.2.tar.gz.

File metadata

  • Download URL: nomogram_explainer-1.0.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for nomogram_explainer-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b6cef802f18721d9dd8bdeb021a25c92e126752578c09827da087ec6da27e85b
MD5 82d353674f5cacc4e114db04567af88a
BLAKE2b-256 d7ec55e4b5d0c89b8149352b7ac755163f74dc90052b45cf9be868ff59b91a2a

See more details on using hashes here.

File details

Details for the file nomogram_explainer-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nomogram_explainer-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6d313ce996fd58bd9f29ce7823dfccb89f7025a444bf2ccd32df3ab7e27565d0
MD5 124fd1e294822b43d578992aefc88677
BLAKE2b-256 32ea83821bced806c9cfab305e43b1cfe3a1e363eee81dd45247ee928ca19435

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