Git Product home page Git Product logo

bayesiannetwork's Introduction

Features

  • Create interactive Bayesian Network models in the cloud
  • Learn the structure of your network with powerful structural learning algorithms
  • Learn the paramaters of your network with effective paramater learning methods
  • Measure the importance of connections in your network with node and network measures
  • Generate data from your network and export to your favorite app

Overview

BayesianNetwork is a Shiny web application for Bayesian Network modeling and analysis, powered by the excellent bnlearn and networkD3 packages. This app is a more general version of the RiskNetwork web app. To learn more about our project, check out this publication. For even more background, see this publication.

Getting Started

To install BayesianNetwork in R:

install.packages("BayesianNetwork")

Or to install the latest developmental version:

devtools::install_github('paulgovan/BayesianNetwork')

To launch the app:

BayesianNetwork()

Or to access the app through a browser, visit paulgovan.shinyapps.io/BayesianNetwork.

Example

Dashboard

Launching the app brings up the Dashboard. The Dashboard is basically a landing page that gives a brief introduction to the app and includes two value boxes, one each for the number of nodes and arcs in the network.

BayesianNetwork comes with a number of simulated and "real world" data sets. This example will use the "Sample Discrete Network", which is the selected network by default.

Dashboard

Structure

Click Structure in the sidepanel to begin learning the network from the data.

The Bayesian network is automatically displayed in the Bayesian Network box.

In order to learn the structure of a network for a given data set, upload the data set in csv format using The Network Input box. Again, this example uses the "Sample Discrete Network", which should already be loaded.

Select a learning algorithm from the Structural Learning box. A number of different stuctural learning algorithms are currently supported, including:

  • Constraint-based algorithms
  • Score-based algorithms
  • Hybrid-structure algorithms
  • Local discovery algorithms

To view the network score, select a score function from the The Network Score box.

Structure

"Sample Discrete Network" contains six discrete variables, stored as factors with either 2 or 3 levels. The structure of this simple Bayesian network can be learned using the grow-shrink algorithm, which is the selected algorithm by default.

Try different combinations of structural learning algorithms and score functions in order to see the effect (if any) on the resulting Bayesian network.

Parameters

Select the grow-shrink algorithm once again and then click Parameters in the sidepanel in order to learn the parameters of the network.

The selected paramaters are automically displayed in the Network Paramaters box.

Select a learning algorithm from the Parameter Learning box. This app supports both maximum-likelihood and Bayesian estimation of the parameters. Note that Bayesian parameter learning is currently only implemented for discrete data sets.

Then select the type of chart to display in the Paramter Infographic box and, for the discrete case, choose your preferred node.

Parameters

For example, the selected node A is a discrete node with three levels: a, b, and c.

Measures

Click Measures in the sidepanel to bring up a number of tools for classical network analysis.

The Measures tab has a number of node and network measures. The node measures include:

  • Markov blanket
  • Neighborhood
  • Parents
  • Children
  • In degree
  • Out degree
  • Incident arcs
  • Incoming arcs
  • Outgoing arcs

Select a node measure in the Node Control box and the result will be displayed in the Node Measure box.

The Network Control box contains different options for hierarchical clustering of the network. Select the type of dendogram to display (row, column, both, or none) and the resulting dendogram(s) will be displayed along with the adjacency matrix in the Network Measure box.

Measures

Simulation

Finally, click Simulation in the sidepanel in order to simulate data from the network for future use.

Simply enter the sample size N in the Network Simulation box and click Download in order to download a random sample of data from the Bayesian network.

Simulation

Future Work

This package is very much still in development and mutiple improvements are planned, including:

  • Bayesian Inference
  • Expert Kowledge

Please let us know if there are things you would like to see added (or problems with the app!) by opening up an issue using the GitHub issue tracker at https://github.com/paulgovan/BayesianNetwork/issues

Source Code

BayesianNetwork is an open source project, and the source code is available at https://github.com/paulgovan/BayesianNetwork

Contributions

Contributions are welcome by sending a pull request

License

BayesianNetwork is licensed under the Apache licence. © Paul Govan (2015)

bayesiannetwork's People

Contributors

paulgovan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.