Class ConditionalKDE.ConditionalResult2D
java.lang.Object
edu.cmu.tetrad.util.ConditionalKDE.ConditionalResult2D
- Enclosing class:
ConditionalKDE
Represents the result of a 2D conditional density estimation.
This class encapsulates the data required for evaluating and analyzing
the conditional density within a defined grid of two variables.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal doubleThe bandwidths used in the density estimation in the first and second dimensions.final doubleThe bandwidths used in the density estimation in the first and second dimensions.final double[]The conditional targets used in the density estimation.final double[][]The density values at the specified grid points.final double[]The grid points used in the density estimation in the first dimension.final double[]The grid points used in the density estimation in the second dimension.final double[]The weights associated with each data point. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Computes the marginal probability density for the first dimension (Y1) by integrating the joint density along the second dimension (Y2).double[]Computes the marginal probability density for the second dimension (Y2) by integrating the joint density along the first dimension (Y1).
-
Field Details
-
grid1
public final double[] grid1The grid points used in the density estimation in the first dimension. -
grid2
public final double[] grid2The grid points used in the density estimation in the second dimension. -
density
public final double[][] densityThe density values at the specified grid points. -
weights
public final double[] weightsThe weights associated with each data point. -
condTargets
public final double[] condTargetsThe conditional targets used in the density estimation. -
bandwidth1
public final double bandwidth1The bandwidths used in the density estimation in the first and second dimensions. -
bandwidth2
public final double bandwidth2The bandwidths used in the density estimation in the first and second dimensions.
-
-
Method Details
-
marginalY1
public double[] marginalY1()Computes the marginal probability density for the first dimension (Y1) by integrating the joint density along the second dimension (Y2).- Returns:
- An array representing the marginal density for the first dimension.
-
marginalY2
public double[] marginalY2()Computes the marginal probability density for the second dimension (Y2) by integrating the joint density along the first dimension (Y1).- Returns:
- An array representing the marginal density for the second dimension.
-