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.

BalancedKMeans.cs: Wrong assumption in Learn when calculating Cluster.Proportions #450

@jagbarcelo

Description

@jagbarcelo

Near the end of the Learn(...) method (line 230, for statement) you calculate the proportions of each cluster, suposing that shouldStop = converged(centroids, newCentroids); returned true because of an actual convergence. This is not always the case when you had set up MaxIterations beforehand.

converged(...) can return true when the limit has been reached but no valid solution has yet been found. In that case Cluster.Proportions values are wrong because they are not really calculated with the actual proportions of the current iteration, but rather with the assumption that everything ended successfully and they have all the same ratio.

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