The first step for integrating crepo should imply to integrate the new convex hull functionality from isipta21benchmark branch to the dev. In short, these are a set of CH methods defined at ConvexHull.Method that can be applied to a matrix of doubles, a VertexFactor or applied during inference (with VE) after each marginalization.
A summary of this functionality is:
DAGModel model = (DAGModel) IO.readUAI("./models/pgm-vcredal.uai");
VertexFactor vf = (VertexFactor) model.getFactor(0);
// Apply convexhull to a matrix of doubles
ConvexHull.as(ConvexHull.Method.QUICK_HULL).apply(vf.getData()[0])
ConvexHull.as(ConvexHull.Method.LP_CONVEX_HULL).apply(vf.getData()[0])
ConvexHull.as(ConvexHull.Method.REDUCED_HULL_2).apply(vf.getData()[0])
//Apply to a factor (functional method)
VertexFactor r = vf.convexHull(ConvexHull.Method.DEFAULT);
//Apply to a factor (inline method)
vf.applyConvexHull(ConvexHull.Method.REDUCED_HULL_3);
//Variable elimination with convex hull (after marginalization)
CredalVariableElimination inf = new CredalVariableElimination(model);
inf.setConvexHullMarg(ConvexHull.Method.REDUCED_HULL_3);
inf.query(0);
inf.setConvexHullMarg(ConvexHull.Method.REDUCED_HULL_2);
inf.query(0);
The first step for integrating crepo should imply to integrate the new convex hull functionality from isipta21benchmark branch to the dev. In short, these are a set of CH methods defined at
ConvexHull.Method
that can be applied to a matrix of doubles, a VertexFactor or applied during inference (with VE) after each marginalization.A summary of this functionality is: