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.1.tar.gz (4.9 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.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nomogram_explainer-1.0.1.tar.gz
  • Upload date:
  • Size: 4.9 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.1.tar.gz
Algorithm Hash digest
SHA256 f3599757fcc66b738dcab3e829c9c7199c897ae86f6db93234e21221dacdfce8
MD5 ee9735e60b747d15548ea955f61bd103
BLAKE2b-256 7352169a9a8bf3631135ff2258c0e0b662a7d18a5a1a5e6a00364dee24bff3f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nomogram_explainer-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1bb5e5ce1ffa02815038f6c5560d5ecd60a9b65dc3d2aa7c798d3fc4680c5152
MD5 c8bda0fed2090aa77fa6da32ef22595a
BLAKE2b-256 0aad25e76ba6c2bd074f34ebedc1f5b4a173430e8a301790de7f27faf96c9acf

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