Documentation of 'jsat.clustering.EMGaussianMixture' Java class
EMGaussianMixture
jsat.clustering

Class EMGaussianMixture

    • Constructor Detail

      • EMGaussianMixture

        public EMGaussianMixture()
      • EMGaussianMixture

        public EMGaussianMixture(EMGaussianMixture gm)
        Copy constructor. The new Gaussian Mixture can be altered without effecting gm
        Parameters:
        gm - the Guassian Mixture to duplicate
    • Method Detail

      • setIterationLimit

        public void setIterationLimit(int iterLimit)
        Sets the maximum number of iterations allowed
        Parameters:
        iterLimit - the maximum number of iterations of the ElkanKMeans algorithm
      • getIterationLimit

        public int getIterationLimit()
        Returns the maximum number of iterations of the ElkanKMeans algorithm that will be performed.
        Returns:
        the maximum number of iterations of the ElkanKMeans algorithm that will be performed.
      • logPdf

        public double logPdf(Vec x)
        Description copied from interface: MultivariateDistribution
        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.
        Specified by:
        logPdf in interface MultivariateDistribution
        Parameters:
        x - the vector the get the log probability of
        Returns:
        the log of the probability.
      • pdf

        public double pdf(Vec x)
        Description copied from interface: MultivariateDistribution
        Returns the probability of a given vector from this distribution. By definition, the probability will always be in the range [0, 1].
        Specified by:
        pdf in interface MultivariateDistribution
        Parameters:
        x - the vector the get the log probability of
        Returns:
        the probability
      • setUsingData

        public <V extends Vec> boolean setUsingData(java.util.List<V> dataSet,
                                                    boolean parallel)
        Description copied from interface: MultivariateDistribution
        Sets the parameters of the distribution to attempt to fit the given list of vectors. All vectors are assumed to have the same weight.
        Specified by:
        setUsingData in interface MultivariateDistribution
        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.
      • setUsingData

        public boolean setUsingData(DataSet dataSet,
                                    boolean parallel)
        Description copied from interface: MultivariateDistribution
        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.
        Specified by:
        setUsingData in interface MultivariateDistribution
        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

        public java.util.List<Vec> sample(int count,
                                          java.util.Random rand)
        Description copied from interface: MultivariateDistribution
        Performs sampling on the current distribution.
        Specified by:
        sample in interface MultivariateDistribution
        Parameters:
        count - the number of iid samples to draw
        rand - the source of randomness
        Returns:
        a list of sample vectors from this distribution
      • cluster

        public int[] cluster(DataSet dataSet,
                             int[] designations)
        Description copied from interface: Clusterer
        Performs clustering on the given data set. Parameters may be estimated by the method, or other heuristics performed.
        Specified by:
        cluster in interface Clusterer
        Parameters:
        dataSet - the data set to perform clustering on
        designations - the array which will contain the designated values. The array will be altered and returned by the function. If null is given, a new array will be created and returned.
        Returns:
        an array indicating for each value indicating the cluster designation. This is the same array as designations, or a new one if the input array was null
      • cluster

        public int[] cluster(DataSet dataSet,
                             boolean parallel,
                             int[] designations)
        Description copied from interface: Clusterer
        Performs clustering on the given data set. Parameters may be estimated by the method, or other heuristics performed.
        Specified by:
        cluster in interface Clusterer
        Parameters:
        dataSet - the data set to perform clustering on
        parallel - true if multiple threads should be used to perform clustering. false if it should be done in a single threaded manner.
        designations - the array which will contain the designated values. The array will be altered and returned by the function. If null is given, a new array will be created and returned.
        Returns:
        the int[]
      • cluster

        public int[] cluster(DataSet dataSet,
                             int clusters,
                             boolean parallel,
                             int[] designations)
        Specified by:
        cluster in interface KClusterer
      • cluster

        public int[] cluster(DataSet dataSet,
                             int lowK,
                             int highK,
                             boolean parallel,
                             int[] designations)
        Specified by:
        cluster in interface KClusterer
      • cluster

        public int[] cluster(DataSet dataSet,
                             int lowK,
                             int highK,
                             int[] designations)
        Specified by:
        cluster in interface KClusterer

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.