Git Product home page Git Product logo

thomas-core's People

Contributors

daanknoors avatar mellesies avatar

Watchers

 avatar  avatar

Forkers

daanknoors

thomas-core's Issues

Support greedy network learning

Description

BayesianNetwork should support some form of network structure learning based on input data. A simple method would be a greedy algorithm that selects nodes and edges based on mutual information.

Approach

  1. User loads input data and defines max degree network, i.e. the max number of parents that any node can have in the network.
  2. Select first node randomly from the available columns in the input data.
  3. For all remaining nodes: select each node that has the highest mutual information with (some of) the existing nodes in the network, bounded by the max degree network.
  4. Calculate the conditional probabilities of all the nodes in the network and instantiate BayesianNetwork

Erroneous alignment of Factors during multiplication

When multiplying two factors with similar indices, pandas will wrongly assume that the indices should be aligned.

Example:

fAC = Factor(
    [0.6, 0.4], 
    {'A': ['a1', 'a0'], 'C': ['x1', 'x0']}
)

fAB = Factor(
    [0.6, 0.4], 
    {'A': ['a1', 'a0'], 'B': ['x1', 'x0']}
)

fAC * fAB 
# --> factor(A,C) or factor(A,B), depending on the order of multiplication.
# Pandas will wrongly assume that indices of B and C are the same thing and will happily
# multiply the columns :-(.

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.