locked
Dynamically adding new variables to WetGrassSprinklerRain model at runtime? RRS feed

  • Question

  • I am looking at the WetGrassSprinklerRain code and I'm trying to adapt it to my own problem where there are even more variables. My problem is a bit simpler, though there are many more variables. I have a file defining a list of ~150 DNA mutations (one per line) that are associated with some disease. The model I'm imagining is just ~150 nodes, each representing one mutation, all pointing to a single node representing the disease. However, I do not really want to hard code defining the priors and parameters as in the constructor of the WetGrassSprinklerRain example. Rather, I'd like to just keep them in a collection object like a Dictionary and then iterate through that collection to define those priors and parameters. I think I am able to do that without much issue, but then I get to the disease node (analogous to WetGrass) and I don't know what to do because it seems that it is defined as a 2D jagged array in the example and in my case it would be a ~151D jagged array. Is there any way to code what I am describing and construct a discrete bayesian network with n variables dynamically at runtime? Sorry if my question is confusing as I am new to Bayesian Networks and Infer.Net

    Thanks,

    -Paul


    • Edited by pcherng Friday, August 2, 2013 10:30 PM typoe
    Friday, August 2, 2013 10:07 PM

Answers

  • A discrete Bayes net where a node has 150 parents would need an enormous conditional probability table to define that node.  I don't think you want to do that.  Perhaps what you want is a more structured model such as Multi-class classification or Gaussian Process classifier.
    • Marked as answer by pcherng Monday, August 5, 2013 5:28 PM
    Monday, August 5, 2013 12:28 PM
    Owner

All replies

  • A discrete Bayes net where a node has 150 parents would need an enormous conditional probability table to define that node.  I don't think you want to do that.  Perhaps what you want is a more structured model such as Multi-class classification or Gaussian Process classifier.
    • Marked as answer by pcherng Monday, August 5, 2013 5:28 PM
    Monday, August 5, 2013 12:28 PM
    Owner
  • You are right! The multi-class classification model seems to be exactly what I needed! Thanks for pointing me in the right direction.

    -Paul

    Monday, August 5, 2013 5:28 PM