Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

ExpectationMaximization max Iterations can't be changed #337

@franktore

Description

@franktore

Hi,
When learning a GaussianMixtureModel it should be possible to pass MaxIterations to the EM algorithm. As it is now the Iterations parameter is passed to EM instead of MaxIterations.
Since Iterations are private set and never changed in code it will always be 0. This leads to infinite loops when a problem does not converge.

I also notice a missing else statement in MultivariateNormalDistribution.Fit().
When computing unweighted covariance it will always default to full matrix even when options.Diagonal is set:

// Compute covariance matrix
if (options != null && options.Diagonal)
    cov = Matrix.Diagonal(Measures.Variance(observations, means));
cov = Measures.Covariance(observations, means).ToMatrix();

Best regards,
Frank

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions