@ has joined the channel
./kmeans seq
コマンドの下の行にこのプログラムは1回の反復ごとにクラスタを表示し、65回の反復の後収束するはずです。とあるんですが、実際に実行してみると20回で収束してるみたいです。
$ cabal exec -- kmeans seq iteration 0 Cluster {clId = 0, clCent = Point (-0.539760960351114) (-0.15981340012166456)} Cluster {clId = 1, clCent = Point (-0.5193016808259251) (-0.1783867429360103)} Cluster {clId = 2, clCent = Point (-0.536178111509908) (-0.14876040981797228)} Cluster {clId = 3, clCent = Point (-0.5173021540019762) (-0.1723059196602831)} Cluster {clId = 4, clCent = Point (-0.5251322344850621) (-0.16970608558866543)} ... iteration 20 Cluster {clId = 0, clCent = Point (-5.843594657217429) (-5.465023143155277)} Cluster {clId = 1, clCent = Point 8.316354592277696 (-8.330430847304271)} Cluster {clId = 2, clCent = Point (-9.06455081846093) 7.561852464109018} Cluster {clId = 3, clCent = Point 9.24359773112845 6.138576051709859} Cluster {clId = 4, clCent = Point (-3.6217091143407467) (-1.824581243202074)} [Cluster {clId = 0, clCent = Point (-5.843594657217429) (-5.465023143155277)},Cluster {clId = 1, clCent = Point 8.316354592277696 (-8.330430847304271)},Cluster {clId = 2, clCent = Point (-9.06455081846093) 7.561852464109018},Cluster {clId = 3, clCent = Point 9.24359773112845 6.138576051709859},Cluster {clId = 4, clCent = Point (-3.6217091143407467) (-1.824581243202074)}] Total time: 0.76
view : points gnuplot -e 'set terminal png; plot "points"' >points.png; eog points.png
GenSamples
のパラメータを調整したものなんですね。fwdense1
の結果を確認していたんですが、テキスト通りに高速化できた方います?app | Total time ------------------------|---------------------------- fwdense -O2 | 3.440s ( 3.471s elapsed) fwdense -O2 -fllvm | 1.968s ( 1.984s elapsed) fwdense1 -O2 | 4.003s ( 4.020s elapsed) fwdense1 -O2 -N4 | 8.131s ( 3.781s elapsed) fwdense1 -O2 -fllvm | 2.370s ( 2.421s elapsed) fwdense1 -O2 -fllvm -N4 | 5.522s ( 2.621s elapsed)