public class DifferentiableChecker
extends java.lang.Object
This check is performed by traversing up each vertex's parents and ensuring that the path to next RV is differentiable or constant valued. If there is a non differentiable vertex on this path, then if it is constant valued (0 gradient) it has no effect and therefore will return true.
-- Examples -- RV = Random Variable (G) = A vertex we want to check whether differentiable ND = Non-differentiable vertex D = Differentiable vertex C = Constant valued vertex
- Differentiable -
RV RV \ / D RV \ / RV(G)
This graph is differentiable as traversing up each of the vertex's parent to the next RV is a differentiable path.
C C \ / ND RV \ / RV(G)
This graph is differentiable as the path that is non differentiable is constant valued.
- Not Differentiable -
RV RV - Both RV not observed \ / ND RV \ / RV(G)
This is not differentiable as there is a non differentiable path which does not have a constant value.
For more examples see DifferentiableCheckerTest.java.
Constructor and Description |
---|
DifferentiableChecker() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isDifferentiableWrtLatents(java.util.Collection<Vertex> vertices) |
public static boolean isDifferentiableWrtLatents(java.util.Collection<Vertex> vertices)
vertices
- the vertices to check are differentiable w.r.t latents.