[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #8959] pkg-statistics: Replace kmeans with
From: |
Michael Bentley |
Subject: |
[Octave-patch-tracker] [patch #8959] pkg-statistics: Replace kmeans with more efficient implementation |
Date: |
Tue, 19 Apr 2016 17:23:51 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36 |
Follow-up Comment #3, patch #8959 (project octave):
Also of note, I have some timing data if people want to see *how much* this is
improved.
----------------------------------------------------------------
| k | Mine in Octave | Octave's | Mine in Matlab | Matlab's |
|---|----------------|------------|----------------|-----------|
| 3 | 0.197 sec | 12.268 sec | 0.313 sec | 0.245 sec |
| 4 | 0.578 sec | 17.961 sec | 0.629 sec | 0.475 sec |
| 5 | 0.458 sec | 25.572 sec | 0.614 sec | 0.402 sec |
| 6 | 1.026 sec | 50.141 sec | 1.160 sec | 0.739 sec |
| 7 | 1.237 sec | 41.985 sec | 1.418 sec | 0.534 sec |
| 8 | 1.077 sec | 21.745 sec | 1.289 sec | 0.929 sec |
----------------------------------------------------------------
This timing experiment was done on a grid of 128x128 elements, each one having
16 channels. I call it with
[m,n,p] = size(params);
[elements, clusters] = kmeans(reshape(params, [m*n, p]), k);
elements = reshape(elements, [m,n]);
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?8959>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/