Interface EMClusterModel<O,​M extends Model>

    • Method Detail

      • beginEStep

        void beginEStep()
        Begin the E step.
      • needsTwoPass

        default boolean needsTwoPass()
        True, if the model needs two passes in the E step.
        Returns:
        true when an initial pass is needed.
      • firstPassE

        default void firstPassE​(O vec,
                                double weight)
        First run in the E step.

        By default, this is not used (c.f. needsTwoPass().

        Parameters:
        vec - Vector to process
        weight - Weight of point ("responsibility" of the cluster)
      • finalizeFirstPassE

        default void finalizeFirstPassE()
        Finalize the first pass of the E step.

        By default, this is not used (c.f. needsTwoPass().

      • updateE

        void updateE​(O vec,
                     double weight)
        Process one data point in the E step
        Parameters:
        vec - Vector to process
        weight - Weight of point ("responsibility" of the cluster)
      • finalizeEStep

        void finalizeEStep​(double weight,
                           double prior)
        Finalize the E step.
        Parameters:
        weight - weight of the cluster
        prior - MAP prior (0 for MLE)
      • estimateLogDensity

        double estimateLogDensity​(O vec)
        Estimate the log likelihood of a vector.
        Parameters:
        vec - Vector
        Returns:
        log likelihood.
      • finalizeCluster

        M finalizeCluster()
        Finalize a cluster model.
        Returns:
        Cluster model
      • getWeight

        double getWeight()
        Get the cluster weight.
        Returns:
        Cluster weight
      • setWeight

        void setWeight​(double weight)
        Set the cluster weight.
        Parameters:
        weight - Cluster weight