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.0.tar.gz (2.5 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.0-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nomogram_explainer-1.0.0.tar.gz
  • Upload date:
  • Size: 2.5 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.0.tar.gz
Algorithm Hash digest
SHA256 7ed9312d9622f000fe489139c7ad92112bd897bba92a1d40a2b0ae719a54997f
MD5 8e32caf3700477849f79a66736cfe49e
BLAKE2b-256 31f0d5abf5c5f28d85b5b1386c563e0ceb2573a303b8f9a9391f7f7ea177cc80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nomogram_explainer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a995560e8daa2bbf9d64bff1c74f3298641ab9d377aebe1c1376fa1ecadf8404
MD5 10a46115064cb2ecc2ead82f1ada6817
BLAKE2b-256 ee595d527d5a62206bc8dbc1e39f927bf717d2edd629cff9f270c9c2b8fb475b

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