Search in sources :

Example 1 with EditableFactorNetwork

use of com.sri.ai.praise.core.representation.interfacebased.factor.api.EditableFactorNetwork in project aic-praise by aic-sri-international.

the class AnytimeExactBPTest3 method solveGabrielWithBoxing.

public static AEBPTestingDataFrame solveGabrielWithBoxing(Variable query, EditableFactorNetwork factorNetwork, long maximunTimeInSeconds, String PGMName) {
    println("\nSolving with Gabriel's Anytime - boxing\n");
    Predicate<Polytope> criteria = p -> ((IntensionalConvexHullOfFactors) p).getIndices().size() > 10;
    AEBP aebp = new AEBP(factorNetwork, query, criteria, true);
    /*while(aebp.hasNext()) {
			Polytope p = aebp.next();
			println(p);
		}*/
    return AEBPSolver.solve(aebp, query, maximunTimeInSeconds, 0, PGMName, "Boxing");
}
Also used : Polytope(com.sri.ai.praise.core.representation.interfacebased.polytope.api.Polytope) ExactBP(com.sri.ai.praise.core.inference.byinputrepresentation.interfacebased.core.exactbp.fulltime.core.ExactBP) Util.list(com.sri.ai.util.Util.list) TableFactor(com.sri.ai.praise.core.representation.interfacebased.factor.core.table.TableFactor) AEBPRPlotting(com.sri.ai.util.rplot.AEBPRPlotting) Factor(com.sri.ai.praise.core.representation.interfacebased.factor.api.Factor) Polytope(com.sri.ai.praise.core.representation.interfacebased.polytope.api.Polytope) File(java.io.File) AnytimeExactBP(com.sri.ai.praise.core.inference.byinputrepresentation.interfacebased.core.exactbp.anytime.rodrigo.AnytimeExactBP) Variable(com.sri.ai.praise.core.representation.interfacebased.factor.api.Variable) TableVariable(com.sri.ai.praise.core.representation.interfacebased.factor.core.table.TableVariable) ArrayList(java.util.ArrayList) TestCases(com.sri.ai.praise.core.inference.byinputrepresentation.interfacebased.core.exactbp.anytime.gabriel.TestCases) List(java.util.List) TableFactorNetwork(com.sri.ai.praise.core.representation.interfacebased.factor.core.table.TableFactorNetwork) ExactBPNode(com.sri.ai.praise.core.inference.byinputrepresentation.interfacebased.core.exactbp.fulltime.api.ExactBPNode) Predicate(com.google.common.base.Predicate) AEBP(com.sri.ai.praise.core.inference.byinputrepresentation.interfacebased.core.exactbp.anytime.gabriel.AEBP) EditableFactorNetwork(com.sri.ai.praise.core.representation.interfacebased.factor.api.EditableFactorNetwork) AEBPTestingDataFrame(com.sri.ai.util.rplot.dataframe.AEBPTestingDataFrame) IntensionalConvexHullOfFactors(com.sri.ai.praise.core.representation.interfacebased.polytope.core.byexpressiveness.convexhull.IntensionalConvexHullOfFactors) Util.println(com.sri.ai.util.Util.println) LinkedHashSet(java.util.LinkedHashSet) AssignmentsIterator(com.sri.ai.grinder.helper.AssignmentsIterator) IntensionalConvexHullOfFactors(com.sri.ai.praise.core.representation.interfacebased.polytope.core.byexpressiveness.convexhull.IntensionalConvexHullOfFactors) AEBP(com.sri.ai.praise.core.inference.byinputrepresentation.interfacebased.core.exactbp.anytime.gabriel.AEBP)

Aggregations

Predicate (com.google.common.base.Predicate)1 AssignmentsIterator (com.sri.ai.grinder.helper.AssignmentsIterator)1 AEBP (com.sri.ai.praise.core.inference.byinputrepresentation.interfacebased.core.exactbp.anytime.gabriel.AEBP)1 TestCases (com.sri.ai.praise.core.inference.byinputrepresentation.interfacebased.core.exactbp.anytime.gabriel.TestCases)1 AnytimeExactBP (com.sri.ai.praise.core.inference.byinputrepresentation.interfacebased.core.exactbp.anytime.rodrigo.AnytimeExactBP)1 ExactBPNode (com.sri.ai.praise.core.inference.byinputrepresentation.interfacebased.core.exactbp.fulltime.api.ExactBPNode)1 ExactBP (com.sri.ai.praise.core.inference.byinputrepresentation.interfacebased.core.exactbp.fulltime.core.ExactBP)1 EditableFactorNetwork (com.sri.ai.praise.core.representation.interfacebased.factor.api.EditableFactorNetwork)1 Factor (com.sri.ai.praise.core.representation.interfacebased.factor.api.Factor)1 Variable (com.sri.ai.praise.core.representation.interfacebased.factor.api.Variable)1 TableFactor (com.sri.ai.praise.core.representation.interfacebased.factor.core.table.TableFactor)1 TableFactorNetwork (com.sri.ai.praise.core.representation.interfacebased.factor.core.table.TableFactorNetwork)1 TableVariable (com.sri.ai.praise.core.representation.interfacebased.factor.core.table.TableVariable)1 Polytope (com.sri.ai.praise.core.representation.interfacebased.polytope.api.Polytope)1 IntensionalConvexHullOfFactors (com.sri.ai.praise.core.representation.interfacebased.polytope.core.byexpressiveness.convexhull.IntensionalConvexHullOfFactors)1 Util.list (com.sri.ai.util.Util.list)1 Util.println (com.sri.ai.util.Util.println)1 AEBPRPlotting (com.sri.ai.util.rplot.AEBPRPlotting)1 AEBPTestingDataFrame (com.sri.ai.util.rplot.dataframe.AEBPTestingDataFrame)1 File (java.io.File)1