Documentation of 'jsat.distributions.multivariate.MultivariateDistribution' Java class
MultivariateDistribution
jsat.distributions.multivariate

Interface MultivariateDistribution

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method and Description
      MultivariateDistribution clone() 
      default double logPdf(double... x)
      Computes the log of the probability density function.
      double logPdf(Vec x)
      Computes the log of the probability density function.
      default double pdf(double... x)
      Returns the probability of a given vector from this distribution.
      default double pdf(Vec x)
      Returns the probability of a given vector from this distribution.
      java.util.List<Vec> sample(int count, java.util.Random rand)
      Performs sampling on the current distribution.
      default boolean setUsingData(DataSet dataSet)
      Sets the parameters of the distribution to attempt to fit the given list of data points.
      default boolean setUsingData(DataSet dataSet, boolean parallel)
      Sets the parameters of the distribution to attempt to fit the given list of data points.
      default <V extends Vec>
      boolean
      setUsingData(java.util.List<V> dataSet)
      Sets the parameters of the distribution to attempt to fit the given list of vectors.
      <V extends Vec>
      boolean
      setUsingData(java.util.List<V> dataSet, boolean parallel)
      Sets the parameters of the distribution to attempt to fit the given list of vectors.
      default boolean setUsingDataList(java.util.List<DataPoint> dataPoints)
      Sets the parameters of the distribution to attempt to fit the given list of data points.
    • Method Detail

      • logPdf

        default double logPdf(double... x)
        Computes the log of the probability density function. If the probability of the input is zero, the log of zero would be Double.NEGATIVE_INFINITY. Instead, -Double.MAX_VALUE is returned.
        Parameters:
        x - the array for the vector the get the log probability of
        Returns:
        the log of the probability.
        Throws:
        java.lang.ArithmeticException - if the vector is not the correct length, or the distribution has not yet been set
      • logPdf

        double logPdf(Vec x)
        Computes the log of the probability density function. If the probability of the input is zero, the log of zero would be Double.NEGATIVE_INFINITY. Instead, -Double.MAX_VALUE is returned.
        Parameters:
        x - the vector the get the log probability of
        Returns:
        the log of the probability.
        Throws:
        java.lang.ArithmeticException - if the vector is not the correct length, or the distribution has not yet been set
      • pdf

        default double pdf(double... x)
        Returns the probability of a given vector from this distribution. By definition, the probability will always be in the range [0, 1].
        Parameters:
        x - the array of the vector the get the log probability of
        Returns:
        the probability
        Throws:
        java.lang.ArithmeticException - if the vector is not the correct length, or the distribution has not yet been set
      • pdf

        default double pdf(Vec x)
        Returns the probability of a given vector from this distribution. By definition, the probability will always be in the range [0, 1].
        Parameters:
        x - the vector the get the log probability of
        Returns:
        the probability
        Throws:
        java.lang.ArithmeticException - if the vector is not the correct length, or the distribution has not yet been set
      • setUsingData

        default <V extends Vec> boolean setUsingData(java.util.List<V> dataSet)
        Sets the parameters of the distribution to attempt to fit the given list of vectors. All vectors are assumed to have the same weight.
        Type Parameters:
        V - the vector type
        Parameters:
        dataSet - the list of data points
        Returns:
        true if the distribution was fit to the data, or false if the distribution could not be fit to the data set.
      • setUsingData

        <V extends Vec> boolean setUsingData(java.util.List<V> dataSet,
                                             boolean parallel)
        Sets the parameters of the distribution to attempt to fit the given list of vectors. All vectors are assumed to have the same weight.
        Type Parameters:
        V - the vector type
        Parameters:
        dataSet - the list of data points
        parallel - true if the training should be done using multiple-cores, false for single threaded.
        Returns:
        true if the distribution was fit to the data, or false if the distribution could not be fit to the data set.
      • setUsingDataList

        default boolean setUsingDataList(java.util.List<DataPoint> dataPoints)
        Sets the parameters of the distribution to attempt to fit the given list of data points. The weights of the data points will be used.
        Parameters:
        dataPoints - the list of data points to use
        Returns:
        true if the distribution was fit to the data, or false if the distribution could not be fit to the data set.
      • setUsingData

        default boolean setUsingData(DataSet dataSet)
        Sets the parameters of the distribution to attempt to fit the given list of data points. The weights of the data points will be used.
        Parameters:
        dataSet - the data set to use
        Returns:
        true if the distribution was fit to the data, or false if the distribution could not be fit to the data set.
      • setUsingData

        default boolean setUsingData(DataSet dataSet,
                                     boolean parallel)
        Sets the parameters of the distribution to attempt to fit the given list of data points. The weights of the data points will be used.
        Parameters:
        dataSet - the data set to use
        parallel - the source of threads for computation
        Returns:
        true if the distribution was fit to the data, or false if the distribution could not be fit to the data set.
      • sample

        java.util.List<Vec> sample(int count,
                                   java.util.Random rand)
        Performs sampling on the current distribution.
        Parameters:
        count - the number of iid samples to draw
        rand - the source of randomness
        Returns:
        a list of sample vectors from this distribution

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.