use of com.sri.ai.praise.core.representation.interfacebased.polytope.core.byexpressiveness.convexhull.IntensionalConvexHullOfFactors in project aic-praise by aic-sri-international.
the class GradientAnytimeExactBP method getFactorAtRootPolytope.
private IntensionalConvexHullOfFactors getFactorAtRootPolytope() {
Factor factorAtRoot = Factor.multiply(getBase().getFactorsAtRoot());
IntensionalConvexHullOfFactors singletonConvexHullOfFactorAtRoot = new IntensionalConvexHullOfFactors(list(), factorAtRoot);
return singletonConvexHullOfFactorAtRoot;
}
use of com.sri.ai.praise.core.representation.interfacebased.polytope.core.byexpressiveness.convexhull.IntensionalConvexHullOfFactors in project aic-praise by aic-sri-international.
the class GradientAnytimeExactBP method transformApproximationToConvexHullOrThrowsErrorIfNotPossible.
private static IntensionalConvexHullOfFactors transformApproximationToConvexHullOrThrowsErrorIfNotPossible(Approximation<Factor> approximation) {
AtomicPolytope atomicPolytope = transformApproximationToAtomicPolytopeOrThrowsErrorIfNotPossible(approximation);
if (!(approximation instanceof IntensionalConvexHullOfFactors)) {
// can't be simplex because sub is not null
throw new Error("Unfit type of approximation for gradient descent");
}
IntensionalConvexHullOfFactors convexHull = (IntensionalConvexHullOfFactors) atomicPolytope;
return convexHull;
}
use of com.sri.ai.praise.core.representation.interfacebased.polytope.core.byexpressiveness.convexhull.IntensionalConvexHullOfFactors in project aic-praise by aic-sri-international.
the class AbstractAEBPTreeNode method addSimplexOrFactortoTheListOfProducts.
public void addSimplexOrFactortoTheListOfProducts(List<Polytope> polytopesToMultiply) {
if (isRootAFactor()) {
IntensionalConvexHullOfFactors singletonConvexHullOfFactorAtRoot = new IntensionalConvexHullOfFactors(list(), (Factor) this.getRoot());
polytopesToMultiply.add(singletonConvexHullOfFactorAtRoot);
} else if (!isExhausted.apply((Variable) this.getRoot())) {
polytopesToMultiply.add(new Simplex((Variable) this.getRoot()));
}
}
use of com.sri.ai.praise.core.representation.interfacebased.polytope.core.byexpressiveness.convexhull.IntensionalConvexHullOfFactors in project aic-praise by aic-sri-international.
the class AnytimeExactBP method getFactorAtRootPolytope.
private IntensionalConvexHullOfFactors getFactorAtRootPolytope() {
Factor factorAtRoot = Factor.multiply(getBase().getFactorsAtRoot());
IntensionalConvexHullOfFactors singletonConvexHullOfFactorAtRoot = new IntensionalConvexHullOfFactors(list(), factorAtRoot);
return singletonConvexHullOfFactorAtRoot;
}
use of com.sri.ai.praise.core.representation.interfacebased.polytope.core.byexpressiveness.convexhull.IntensionalConvexHullOfFactors in project aic-praise by aic-sri-international.
the class AnytimeExactBP method addFactorAtRootPolytope.
private void addFactorAtRootPolytope(List<Polytope> polytopesToMultiply) {
IntensionalConvexHullOfFactors singletonConvexHullOfFactorAtRoot = getFactorAtRootPolytope();
polytopesToMultiply.add(singletonConvexHullOfFactorAtRoot);
}
Aggregations