{"id":13857533,"url":"https://github.com/ModelOriented/corrgrapher","last_synced_at":"2025-07-13T21:33:00.761Z","repository":{"id":56935534,"uuid":"247057010","full_name":"ModelOriented/corrgrapher","owner":"ModelOriented","description":"Visualize correlations between variables","archived":false,"fork":false,"pushed_at":"2020-10-10T16:15:06.000Z","size":156882,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-28T17:32:45.736Z","etag":null,"topics":["explanatory-model-analysis","model-visualization","xai"],"latest_commit_sha":null,"homepage":"https://ModelOriented.github.io/corrgrapher/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ModelOriented.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-13T11:33:41.000Z","updated_at":"2023-07-30T11:53:55.000Z","dependencies_parsed_at":"2022-08-21T01:10:17.288Z","dependency_job_id":null,"html_url":"https://github.com/ModelOriented/corrgrapher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModelOriented%2Fcorrgrapher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModelOriented%2Fcorrgrapher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModelOriented%2Fcorrgrapher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ModelOriented%2Fcorrgrapher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ModelOriented","download_url":"https://codeload.github.com/ModelOriented/corrgrapher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225920376,"owners_count":17545478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["explanatory-model-analysis","model-visualization","xai"],"created_at":"2024-08-05T03:01:39.886Z","updated_at":"2024-11-22T15:30:52.359Z","avatar_url":"https://github.com/ModelOriented.png","language":"R","readme":"# corrgrapher \u003cimg src=\"man/figures/logo.png\" align=\"right\" width=\"150\"/\u003e\n\n\u003c!-- badges: start --\u003e\n[![Travis build status](https://travis-ci.org/ModelOriented/corrgrapher.svg?branch=master)](https://travis-ci.org/ModelOriented/corrgrapher)\n[![Codecov test coverage](https://codecov.io/gh/ModelOriented/corrgrapher/branch/master/graph/badge.svg)](https://codecov.io/gh/ModelOriented/corrgrapher?branch=master)\n[![R build status](https://github.com/ModelOriented/corrgrapher/workflows/R-CMD-check/badge.svg)](https://github.com/ModelOriented/corrgrapher/actions)\n\u003c!-- badges: end --\u003e\n\n## Overview\n\nWhen exploring data or models we often examine variables one by one. This analysis is incomplete if the relationship between these variables is not taken into account. The corrgrapher package facilitates simultaneous exploration of the Partial Dependence Profiles and the correlation between variables in the model.\n\nThe package [corrgrapher](https://github.com/ModelOriented/corrgrapher) is a part of the [DrWhy.AI](http://drwhy.ai/) universe. \n\n## The solution - less numbers, more insights\n\nThis package aims to plot correlations between variables in form of a graph. Each node on it is associated with single variable. Variables correlated with each other (positively and negatively alike) shall be close, and weakly correlated  - far from each other. \n\nIt is achieved through a physical simulation, where the nodes are treated as points with mass (and are pushing each other away) and edges are treated as mass-less springs. The length of a spring depends on absolute value of correlation between connected nodes. The bigger the correlation, the shorter the spring.\n\nWhen you click on the node of the graph you can view the distribution or the Partial Dependence Plot for the selected variable.\n\n## Installation\n\nThe easiest way to get `corrgrapher` is to install it from CRAN:\n\n```{r}\ninstall.packages(\"corrgrapher\")\n```\n\nOr the the development version from GitHub:\n\n```{r}\ndevtools::install_github(\"ModelOriented/corrgrapher\")\n```\n\n## Examples\n\nFirst, load the package\n\n```\nlibrary('corrgrapher')\n```\n\n### For data sets\n\nFor data frames the `corrgrapher` shows correlation network and histograms/distributions for features.\n\n```\ndf \u003c- as.data.frame(datasets::Seatbelts)\ncgr \u003c- corrgrapher(df)\ncgr\n```\n\n\u003ccenter\u003e\n\u003cimg src=\"https://github.com/ModelOriented/corrgrapher/raw/master/inst/corrgrapher1.gif\"\u003e\n\u003c/center\u003e\n\n### For models\n\nFor models the `corrgrapher` shows partial dependencies. Use the `DALEX::explain()` function to create an adapter for any predictive model.\n\n```\nlibrary(DALEX)\nlibrary(ranger)\n\ntitanic_rgr \u003c- ranger(survived ~ ., data = titanic_imputed, classification = TRUE)\ntitanic_exp \u003c- explain(titanic_rgr, data = titanic_imputed, y = titanic_imputed$survived, verbose = FALSE)\ncgr \u003c- corrgrapher(titanic_exp)\ncgr\n```\n\n\u003ccenter\u003e\n\u003cimg src=\"https://github.com/ModelOriented/corrgrapher/raw/master/inst/corrgrapher2.gif\"\u003e\n\u003c/center\u003e\n\n## See also\n\nFeel free to take a look at articles about\n[introduction](https://modeloriented.github.io/corrgrapher/articles/Introduction.html) and [customization](https://modeloriented.github.io/corrgrapher/articles/Customization.html) at\n[package site](https://modeloriented.github.io/corrgrapher/index.html).\n\n\n## Acknowledgments\n\nWork on this package was financially supported by the Polish National Science Centre under Opus Grant number 2017/27/B/ST6/0130.\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FModelOriented%2Fcorrgrapher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FModelOriented%2Fcorrgrapher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FModelOriented%2Fcorrgrapher/lists"}