[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Quick Cluster: Code tidy up.
From: |
Ben Pfaff |
Subject: |
Re: [PATCH] Quick Cluster: Code tidy up. |
Date: |
Sat, 7 Nov 2015 23:16:24 -0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Sat, Nov 07, 2015 at 12:25:14PM +0100, John Darrington wrote:
> Perhaps Alan and/or Ben could take a look at this change before I push it.
> There are a number of bugs in QUICK CLUSTER. This change doesn't fix them
> but hopefully will make fixing them easier (assuming anybody gets the time
> to do it).
>
> This change reorganizes the kmeans_cluster function, so as to avoid
> a goto, and make the code more readable. It also adds a new function,
> kmeans_initial_centers. Previously the same function was called for
> the initial centers as for each subsequent.
>
> The current implementation of kmeans_randomize_clusters is completely
> wrong and needs to be fixed sometime.
It seems odd to me to make show_warning1 a static variable, because it
means that the warning will only be displayed at most once per PSPP
run. Doesn't it make more sense to display it at most once per QUICK
CLUSTER invocation?
Does it really indicate a bug in PSPP if redo_count reaches 10? That is
the reason that one would use assert (redo_count < 10).
Thanks,
Ben.