Search in sources :

Example 1 with Approximation

use of com.sri.ai.util.computation.anytime.api.Approximation in project aic-praise by aic-sri-international.

the class GradientAnytimeExactBP method sumOutWithoutOneSub.

private Polytope sumOutWithoutOneSub(Anytime<Factor> sub) {
    List<Approximation<Factor>> subsApproximations = getSubsApproximation();
    Polytope product = getProductOfAllIncomingPolytopesButOneAndFactorAtRoot(sub, subsApproximations);
    Collection<? extends Variable> freeVariables = product.getFreeVariables();
    List<? extends Variable> variablesSummedOut = getBase().determinedVariablesToBeSummedOut(freeVariables);
    Polytope result = sumOut(variablesSummedOut, product);
    return result;
}
Also used : Polytopes.identityPolytope(com.sri.ai.praise.core.representation.interfacebased.polytope.core.byexpressiveness.convexhull.Polytopes.identityPolytope) AtomicPolytope(com.sri.ai.praise.core.representation.interfacebased.polytope.api.AtomicPolytope) Polytope(com.sri.ai.praise.core.representation.interfacebased.polytope.api.Polytope) Approximation(com.sri.ai.util.computation.anytime.api.Approximation)

Example 2 with Approximation

use of com.sri.ai.util.computation.anytime.api.Approximation in project aic-praise by aic-sri-international.

the class GradientAnytimeExactBP method productWithoutOneSub.

private Polytope productWithoutOneSub(Anytime<Factor> sub) {
    List<Approximation<Factor>> subsApproximations = getSubsApproximation();
    Polytope product = getProductOfAllIncomingPolytopesButOne(sub, subsApproximations);
    return product;
}
Also used : Polytopes.identityPolytope(com.sri.ai.praise.core.representation.interfacebased.polytope.core.byexpressiveness.convexhull.Polytopes.identityPolytope) AtomicPolytope(com.sri.ai.praise.core.representation.interfacebased.polytope.api.AtomicPolytope) Polytope(com.sri.ai.praise.core.representation.interfacebased.polytope.api.Polytope) Approximation(com.sri.ai.util.computation.anytime.api.Approximation)

Aggregations

AtomicPolytope (com.sri.ai.praise.core.representation.interfacebased.polytope.api.AtomicPolytope)2 Polytope (com.sri.ai.praise.core.representation.interfacebased.polytope.api.Polytope)2 Polytopes.identityPolytope (com.sri.ai.praise.core.representation.interfacebased.polytope.core.byexpressiveness.convexhull.Polytopes.identityPolytope)2 Approximation (com.sri.ai.util.computation.anytime.api.Approximation)2