[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Quick Cluster: Code tidy up.
From: |
John Darrington |
Subject: |
Re: [PATCH] Quick Cluster: Code tidy up. |
Date: |
Sun, 8 Nov 2015 10:18:35 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Nov 07, 2015 at 11:16:24PM -0800, Ben Pfaff wrote:
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?
You're right (of course!). I clearly wan't thinking when I did that.
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).
That I am not sure about. But its not something I have changed in this patch.
I just moved this line from once place to another.
J'
--
Avoid eavesdropping. Send strong encryted email.
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature