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.4.tar.gz (195.1 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.4-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nomogram_explainer-1.0.4.tar.gz
  • Upload date:
  • Size: 195.1 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.4.tar.gz
Algorithm Hash digest
SHA256 c446ae3f6ca470cbd1ac0c3093e7b3a0639bdf71fdc2ec4ca1560ab77730da42
MD5 1b8229869e4d232bc24a68687f0088f9
BLAKE2b-256 d948059f25089d3df467b7a927c803e575885c9bc8faec88cd4e22bbbef1179b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nomogram_explainer-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2b04eda64cea422461f436990fe8319c535276529e9a6b483a42170ab02d68b5
MD5 ca2c6bacffdc2727cca8c7ed3aaf28ab
BLAKE2b-256 3f50322b91df966e18085a6d78cbdead512db0e808cc7c9b8680c63f06fbe9fe

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