
Investigate cython or other components for speeding up code

Develop internal "dai-like smallset" or varset object rather than sortedcontainers
  -- also need sorting for factor lists?  simplest route?

(W)MBE code; incremental builds; fast scope-based plus content based

Basic IS methods: structure?  how to describe a proposal?
  * basic proposal: has sample() function?
  * factored proposal: isBN()=True

Bayes Net objects?  Describing sample-able objects?

Clean Gibbs & MH methods

Standard algos: DD, BP, TRW, MF -- reparameterization versions vs "external" ?
  -- think through locking of factors

Learning
  Moment-based direct (Chow-liu like)
  SGD likelihood; pseudo-likelihood
  IPF (exact/approx expectation?)
  CD  (sgd with LL approximation? persistent?  adaptable to LBP, DD, etc?)
  ... ?


Generalized variational -- joingraph? region graphs?
  ** join graph: cliques & separators; construct from minibucket tree; 
      ** merge to minimality?
      ** message passing? decision node assignment?  


Ising models
  * Demos: rainfall, voting patterns ?
  * Methods: partition function, loopy BP, etc
  * Structure learning: chow liu, L1 regression, MultWeights, etc
    * Options: neighborhood combination methods; parameter setting
  * Parameter (re)learning:  ML SGD, IPF; MPL (penalties?), moment-based, etc.
  * Conversion to/from Boltzmann parameters?  (Test via RBM methods?)

Gaussian models
  * Demos? Time series, target tracking? ??
  * Todo: lots

RBM models
  * Direct with npy or using pytorch?
  * deep vs shallow? conditional vs generative?


Structure Learning:
  * Constraint-based
    * PC-like (orig, stable, diff indep tests, etc)  [skeleton? CPDAG?] [rank corr; dual PC?]
    * Grow-Shrink-like (ISMB, etc); Markov blanket
  * Score-based
    * BIC-penalized LP relaxation?
    * L1 regularized Lasso-like variants?
  * MB to graph
    * CPDAG
    * MB merging: AND/OR/min/confidence?
  * Extras
    * Ising vs Discrete (use 1-hot?) vs Cts?
    * Incorporation of missing data?
    * Representing prior info: max degree / parents; known/forbid edges; known MBs (eg to CPDAG); scores?
    * Latent variables?


Demos:
  * Bayes nets
  * Exact inference; variable elim, JTs, etc
  * Approximate inference: MCMC, LBP, MF, DD, ...
  * Learning: Chow-Liu
  * Learning: Loopy
  * Ising models
  * RMB models
  * RecSys
  * EM HMM
  * EM general ?
  * Sparse factors?
  * Influence diagrams


Interfacing fucnctions?
  factor list => clique list?  => factor list again?  (FactorSet, CliqueSet)
  "empirical": clique list + data => factor list of moments
    (moment file? = some forgotten output format from uai competitions?)
  

 
CRF representations?
  p(y|x) \propto exp( \sum_k [ w_0k 1(y=k) + \sum_i w_ik Xi 1(y=k) ] )
    Xi may be 0/1 or real-valued
    => Phi(x,y) = [y] x [1 X]
  crf file = uai file, cliques and factors of the crf
     : includes "extra" variables for each conditional potential, Xclq, cardinality 1+# of Xis in f(y|x)
     : this is one parameter per entry in the Phi(x,y) table
  crfx file = observation data for a data set
     : format: { # extra vars Xclq in crf file; for each: id col1 col2 col3 ... }
               { # samples stored in the file; one row each with the columns of X }
  logistic regression example?
  crf: UAI file with two vars: x0=y={0,1} and x1=X={0,...n}; one clique (y,X); table of values
  crfx: { 1\\ 1 0 1 2 3 4 .. n\\ X^0_0 ... X^0_n\\ X^1_0 ... X^1_n\\ ... }

  parameter sharing? harder?




File formats?
    ProbModelXML: http://leo.ugr.es/pgm2012/submissions/pgm2012_submission_43.pdf
    DNET_1: https://www.norsys.com/downloads/DNET_File_Format.txt
    Elvira: http://leo.ugr.es/elvira/devel/Formato/formato.html
    XML BIF: http://www.cs.cmu.edu/~fgcozman/Research/InterchangeFormat/
    MSBNx: http://research.microsoft.com/en-us/um/redmond/groups/adapt/msbnx/
    XDSL: (GeNIe, etc.)
    Cassandra's Format: http://www.pomdp.org/code/pomdp-file-grammar.shtml
    SPUDD:
    pomdpX: http://bigbird.comp.nus.edu.sg/pmwiki/farm/appl/index.php?n=Main.PomdpXDocumentation
    PPDDL:
    RDDL:
    UAI: http://graphmod.ics.uci.edu/uai08/FileFormat
    NET
    DSC




## write XDSL format? ex:
https://github.com/hackl/pybn/blob/master/pybn/network.py


