2012-07-03 52 views
0

我正在阅读“Mahout In Action”一书,我想亲自尝试一下代码。Mahout在版本0.7下缺少方法

但我发现很多代码无法运行(大部分问题都是找不到的方法)。

1,RandomSeedGenerator.chooseRandomPoints(pointVectors,k);选择随机点无法找到。

2,新群集(v,clusterId ++,measure);无法找到构造函数。

有很多这类问题。

谁能告诉我如何找到这些方法?

回答

2

书写为&测试Mahout 0.5。您可以使用examples for book查看存储库中的mahout-0.7分支。

+0

https://github.com/tdunning/MiA/blob/master/src/main/java/mia/clustering/ch09/KMeansClustering.java 该代码没有更新。 – MrROY

+0

你需要切换到'mahout-0.7'分支!例如,https://github.com/dunning/MiA/blob/mahout-0.7/src/main/java/mia/clustering/ch09/KMeansClustering.java –