simpleNomo


NamesimpleNomo JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/Hhy096/nomogram
SummaryGenerating nomograms of logistic regression models
upload_time2023-04-01 14:46:15
maintainer
docs_urlNone
authorHaoyang Hong
requires_python
licenseMIT
keywords python nomogram logistic regression
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
### 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
```txt
pandas==1.2.4
numpy==1.21.5
matplotlib==3.5.1
```

#### To install
```terminal
pip install simpleNomo
```
Or more specifically at <https://github.com/Hhy096/nomogram>.

#### Function Introduction
```python
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)
```
- **path:** Path of the excel that reserves the model coefficients and variabels range. The template of excel can be downloade at https://github.com/Hhy096/nomogram/blob/main/template.xlsx.
- **result_title:** Title for the predictive name. Default "Positive Risk".
- **fig_width:** Width for the figure. Default 10.
- **single_height:** Hight for each axis of the nomogram. Default 0.45.
- **dpi:** The resolution in dots per inch. Default 300.
- **ax_para:** The parameters for axises in the nomogram. You can find more from *Other Parameters* part in https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.axhline.html.
- **tick_para:** The parameters for probability matching axis. You can find more in https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.tick_params.html.
- **xtick_para:** The parameters for x-ticklables of axises. You can find more paramters in https://matplotlib.org/stable/api/text_api.html#matplotlib.text.Text.
- **ytick_para:** The parameters for y-ticklabels of axises. You can find more paramters in https://matplotlib.org/stable/api/text_api.html#matplotlib.text.Text.
- **total_point:** The maximum point for aixes. Default 100.


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


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Hhy096/nomogram",
    "name": "simpleNomo",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,nomogram,logistic regression",
    "author": "Haoyang Hong",
    "author_email": "haoyanghong@link.cuhk.edu.cn",
    "download_url": "https://files.pythonhosted.org/packages/48/c6/ad37a5132923e764efda102c8b5b6eda1cff6a04ad27d6c831fd2bfabf4c/simpleNomo-1.0.0.tar.gz",
    "platform": null,
    "description": "\n### Project Description\n\nsimpleNomo is a python package for generating nomograms of logistic regression models with only model coefficients and variables ranges.  \n\n#### Backgroud\nNomogram, 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.\n\nHowever, 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.  \n\nsimpleNomo is a straightforward framework for creating nomograms for logistic regression models. PyNG can accepts only the coefficients\nand range of predictors in a logistic regression model as inputs.\n\n#### Requirements\n```txt\npandas==1.2.4\nnumpy==1.21.5\nmatplotlib==3.5.1\n```\n\n#### To install\n```terminal\npip install simpleNomo\n```\nOr more specifically at <https://github.com/Hhy096/nomogram>.\n\n#### Function Introduction\n```python\nnomogram(path, result_title=\"Positive Risk\", fig_width=10, single_height=0.45, dpi=300,\n         ax_para = {\"c\":\"black\", \"linewidth\":1.3, \"linestyle\": \"-\"},\n         tick_para = {\"direction\": 'in', \"length\": 3, \"width\": 1.5,},\n         xtick_para = {\"fontsize\": 10, \"fontfamily\": \"Songti Sc\", \"fontweight\": \"bold\"},\n         ylabel_para = {\"fontsize\": 12, \"fontname\": \"Songti Sc\", \"labelpad\":100, \n                        \"loc\": \"center\", \"color\": \"black\", \"rotation\":\"horizontal\"},\n         total_point=100)\n```\n- **path:** Path of the excel that reserves the model coefficients and variabels range. The template of excel can be downloade at https://github.com/Hhy096/nomogram/blob/main/template.xlsx.\n- **result_title:** Title for the predictive name. Default \"Positive Risk\".\n- **fig_width:** Width for the figure. Default 10.\n- **single_height:** Hight for each axis of the nomogram. Default 0.45.\n- **dpi:** The resolution in dots per inch. Default 300.\n- **ax_para:** The parameters for axises in the nomogram. You can find more from *Other Parameters* part in https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.axhline.html.\n- **tick_para:** The parameters for probability matching axis. You can find more in https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.tick_params.html.\n- **xtick_para:** The parameters for x-ticklables of axises. You can find more paramters in https://matplotlib.org/stable/api/text_api.html#matplotlib.text.Text.\n- **ytick_para:** The parameters for y-ticklabels of axises. You can find more paramters in https://matplotlib.org/stable/api/text_api.html#matplotlib.text.Text.\n- **total_point:** The maximum point for aixes. Default 100.\n\n\n#### Example\nCheck https://github.com/Hhy096/nomogram for more examples.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Generating nomograms of logistic regression models",
    "version": "1.0.0",
    "split_keywords": [
        "python",
        "nomogram",
        "logistic regression"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "48c6ad37a5132923e764efda102c8b5b6eda1cff6a04ad27d6c831fd2bfabf4c",
                "md5": "3313acc911cb847093f1984d68bf2029",
                "sha256": "65a8c67f05f655e8179b9acb94b6e4f40313e7eec4a1e60481044b03890f0fff"
            },
            "downloads": -1,
            "filename": "simpleNomo-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3313acc911cb847093f1984d68bf2029",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6139,
            "upload_time": "2023-04-01T14:46:15",
            "upload_time_iso_8601": "2023-04-01T14:46:15.040360Z",
            "url": "https://files.pythonhosted.org/packages/48/c6/ad37a5132923e764efda102c8b5b6eda1cff6a04ad27d6c831fd2bfabf4c/simpleNomo-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-01 14:46:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Hhy096",
    "github_project": "nomogram",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "simplenomo"
}
        
Elapsed time: 0.05402s