{"id":26772943,"url":"https://github.com/paulgovan/bayesiannetwork","last_synced_at":"2025-04-06T07:12:59.200Z","repository":{"id":56937065,"uuid":"42831223","full_name":"paulgovan/BayesianNetwork","owner":"paulgovan","description":"Bayesian Network Modeling and Analysis","archived":false,"fork":false,"pushed_at":"2023-07-15T21:25:29.000Z","size":70409,"stargazers_count":115,"open_issues_count":5,"forks_count":39,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-04-25T23:44:34.379Z","etag":null,"topics":["bayesian-networks","learning-algorithm","network-measures","r"],"latest_commit_sha":null,"homepage":"http://paulgovan.github.io/BayesianNetwork/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulgovan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-09-20T21:56:29.000Z","updated_at":"2024-03-17T07:44:23.000Z","dependencies_parsed_at":"2023-01-21T23:52:06.833Z","dependency_job_id":"76a4b1fb-e957-4a51-a706-d4a639970de8","html_url":"https://github.com/paulgovan/BayesianNetwork","commit_stats":{"total_commits":128,"total_committers":1,"mean_commits":128.0,"dds":0.0,"last_synced_commit":"d31c5996ebd7d3b1242fa86eb1ac80b5660646ae"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgovan%2FBayesianNetwork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgovan%2FBayesianNetwork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgovan%2FBayesianNetwork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgovan%2FBayesianNetwork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulgovan","download_url":"https://codeload.github.com/paulgovan/BayesianNetwork/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445671,"owners_count":20939958,"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":["bayesian-networks","learning-algorithm","network-measures","r"],"created_at":"2025-03-29T01:30:22.866Z","updated_at":"2025-04-06T07:12:59.183Z","avatar_url":"https://github.com/paulgovan.png","language":"HTML","readme":"\n\u003c!-- badges: start --\u003e\n\n[![CRAN\nstatus](https://www.r-pkg.org/badges/version/BayesianNetwork)](https://CRAN.R-project.org/package=BayesianNetwork)\n[![CRAN\nchecks](https://badges.cranchecks.info/summary/BayesianNetwork.svg)](https://cran.r-project.org/web/checks/check_results_BayesianNetwork.html)\n[![](http://cranlogs.r-pkg.org/badges/grand-total/BayesianNetwork)](https://cran.r-project.org/package=BayesianNetwork)\n[![](http://cranlogs.r-pkg.org/badges/last-month/BayesianNetwork)](https://cran.r-project.org/package=BayesianNetwork)\n[![DOI](http://joss.theoj.org/papers/10.21105/joss.00425/status.svg)](https://doi.org/10.21105/joss.00425)\n\u003c!-- badges: end --\u003e\n\n# BayesianNetwork\n\nBayesianNetwork is a [Shiny](https://shiny.posit.co/) web application\nfor Bayesian network modeling and analysis, powered by the\n[bnlearn](https://www.bnlearn.com/) package. To learn more about this\nproject, check out this\n[paper](https://joss.theoj.org/papers/10.21105/joss.00425).\n\n# Getting Started\n\nTo install BayesianNetwork in [R](https://www.r-project.org):\n\n    install.packages(\"BayesianNetwork\")\n\nOr to install the latest developmental version:\n\n    devtools::install_github('paulgovan/BayesianNetwork')\n\nTo launch the app:\n\n    BayesianNetwork::BayesianNetwork()\n\nOr to access the app through a browser, visit\n[paulgovan.shinyapps.io/BayesianNetwork](https://paulgovan.shinyapps.io/BayesianNetwork/).\n\n# Example\n\n## Home\n\nLaunching the app brings up the Home tab. The Home tab is basically a\nlanding page that gives a brief introduction to the app and includes two\nvalue boxes, one each for the number of nodes and arcs in the network.\nThe following figure shows the basic Home tab.\n\n![](https://github.com/paulgovan/BayesianNetwork/blob/master/inst/images/Dashboard.PNG?raw=true)\n\nBayesianNetwork comes with a number of simulated and “real world” data\nsets. This example will use the “Sample Discrete Network”, which is the\nselected network by default.\n\n## Structure\n\nClick Structure in the sidepanel to begin learning the network from the\ndata. The Bayesian network is automatically displayed in the Bayesian\nNetwork box.\n\nIn order to learn the structure of a network for a given data set,\nupload the data set in csv format using The Data Input box. Data should\nbe numeric or factored and should not contain any NULL/NaN/NA values.\nAgain, this example uses the “Sample Discrete Network”, which should\nalready be loaded.\n\nSelect a learning algorithm from the *Structural Learning* box. The\nclasses of available structural learning algorithms include:  \n\n* Constraint-based algorithms \n* Score-based algorithms\n* Hybrid-structure algorithms \n* Local discovery algorithms\n\nTo view the network score, select a score function from the The Network\nScore box.\n\n![](https://github.com/paulgovan/BayesianNetwork/blob/master/inst/images/Structure.PNG?raw=true)\n\n“Sample Discrete Network” contains six discrete variables, stored as\nfactors with either 2 or 3 levels. The structure of this simple Bayesian\nnetwork can be learned using the grow-shrink algorithm, which is the\nselected algorithm by default.\n\nTry different combinations of structural learning algorithms and score\nfunctions in order to see the effect (if any) on the resulting Bayesian\nnetwork.\n\n## Parameters\n\nSelect the grow-shrink algorithm once again and then click Parameters in\nthe sidepanel in order to learn the parameters of the network. The\nselected parameters are automically displayed in the *Network\nParameters* box.\n\nSelect a learning algorithm from the Parameter Learning box. This app\nsupports both maximum-likelihood and Bayesian estimation of the\nparameters. Note that Bayesian parameter learning is currently only\nimplemented for discrete data sets. Then select the type of chart to\ndisplay in the Parameter Infographic box and, for the discrete case,\nchoose the preferred node. For example, the selected node *A* is a\ndiscrete node with three levels: *a*, *b*, and *c*.\n\n![](https://github.com/paulgovan/BayesianNetwork/blob/master/inst/images/Parameters.PNG?raw=true)\n\n## Inference\n\nClick Inference in the sidebar to add evidence to the network. Select\nevidence to add to the model using the Evidence box and select a\nconditional event of interest using the Event box. The resulting\nconditional probabilities are automatically displayed in the Event\nParameter box. For example, the following figure shows the conditional\nprobability of event *B*, given evidence of *c* for node *A*. Changing\nthe evidence for node *A* to *a* or *b* similarly changes the\nconditional probability of event *B*. Note that inference is currently\nnot supported for continuous variables.\n\n![](https://github.com/paulgovan/BayesianNetwork/blob/master/inst/images/Inference.png?raw=true)\n\n## Measures\n\nClick Measures in the sidepanel to bring up a number of tools for\nclassic network analysis. The Measures tab has a number of node and\nnetwork measures. The node measures include: \n\n* Markov blanket\n* Neighborhood \n* Parents \n* Children \n* In degree \n* Out degree \n* Incident arcs \n* Incoming arcs \n* Outgoing arcs\n\nSelect a node measure in the Controls box and the result will be\ndisplayed in the Node Measure box.\n\nThe Controls box also contains different options for displaying\nhierarchical clusters/dendograms for the network. Select the type of\ndendogram to display (row, column, both, or none) and the resulting\ndendogram(s) will be displayed along with the adjacency matrix in the\nAdjacency Matrix box.\n\n![](https://github.com/paulgovan/BayesianNetwork/blob/master/inst/images/Measures.PNG?raw=true)\n\n## Editor\n\nFinally, click Editor in the sidepanel in order to bring up the\ninteractive code editor. Some example markdown is automatically\ndisplayed in the Editor box. Click the Run button to knit the code and\nthe resulting report will be displayed in the body of the app.\n\n![](https://github.com/paulgovan/BayesianNetwork/blob/master/inst/images/Simulation.PNG?raw=true)\n\nNote that the Editor is only available in the package (not on\nshinyapps.io).\n\n## Code of Conduct\n\nPlease note that the BayesianNetwork project is released with a\n[Contributor Code of\nConduct](http://paulgovan.github.io/BayesianNetwork/CODE_OF_CONDUCT.html).\nBy contributing to this project, you agree to abide by its terms.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulgovan%2Fbayesiannetwork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulgovan%2Fbayesiannetwork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulgovan%2Fbayesiannetwork/lists"}