Class ConditionalKDE.ConditionalResult1D

java.lang.Object
edu.cmu.tetrad.util.ConditionalKDE.ConditionalResult1D
Enclosing class:
ConditionalKDE

public static class ConditionalKDE.ConditionalResult1D extends Object
Represents the result of a conditional density estimation in a one-dimensional space. This class encapsulates the computed grid points, density values, weights, conditional targets, and the bandwidth used in the estimation process. It provides methods for analyzing the resulting density, such as finding the mode or integrating over the density function.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    The bandwidth used in the density estimation.
    final double[]
    The conditional targets used in the density estimation.
    final double[]
    The density values at the grid points.
    final double[]
    The grid points used in the density estimation.
    final double[]
    The weights associated with each data point.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Integrates the density function over the grid using the trapezoidal rule.
    double
    Computes the mode of the density function.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • grid

      public final double[] grid
      The grid points used in the density estimation.
    • density

      public final double[] density
      The density values at the grid points.
    • weights

      public final double[] weights
      The weights associated with each data point.
    • condTargets

      public final double[] condTargets
      The conditional targets used in the density estimation.
    • bandwidth

      public final double bandwidth
      The bandwidth used in the density estimation.
  • Method Details

    • mode

      public double mode()
      Computes the mode of the density function. The mode is the grid point corresponding to the highest density value.
      Returns:
      The grid point where the density reaches its maximum value.
    • integrate

      public double integrate()
      Integrates the density function over the grid using the trapezoidal rule.
      Returns:
      The integral of the density function over the grid.