您好,登錄后才能下訂單哦!
這篇文章主要介紹“測試kmean時報錯怎么解決”,在日常操作中,相信很多人在測試kmean時報錯怎么解決問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”測試kmean時報錯怎么解決”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!
測試mahout in action 中kmean實例的時候,輸入命令:
bin/mahout kmeans -i reuters-vectors/tfidf-vectors/ \
-c reuters-initial-clusters \
-o reuters-kmeans-clusters \
-dm org.apache.mahout.common.distance.SquaredEuclideanDistanceMeasure \
-cd 1.0 -k 20 -x 20 -cl
報出先面的錯誤
mahout kmeans -i tfidf-vectors/ -c reuters-initial-clusters o reuters-kmeans-clusters dm org.apache.mahout.common.distance.SquaredEuclideanDistanceMeasure cd 1.0 -k 20 -x 20 -cl Running on hadoop, using HADOOP_HOME=/usr/local/hadoop HADOOP_CONF_DIR=/usr/local/hadoop/conf 14/01/23 12:43:34 ERROR common.AbstractJob: Unexpected o while processing Job-Specific Options: usage: <command> [Generic Options] [Job-Specific Options] Generic Options: -archives <paths> comma separated archives to be unarchived on the compute machines. -conf <configuration file> specify an application configuration file -D <property=value> use value for given property -files <paths> comma separated files to be copied to the map reduce cluster -fs <local|namenode:port> specify a namenode -jt <local|jobtracker:port> specify a job tracker -libjars <paths> comma separated jar files to include in the classpath. Job-Specific Options: --input (-i) input Path to job input directory. --output (-o) output The directory pathname for output. --distanceMeasure (-dm) distanceMeasure The classname of the DistanceMeasure. Default is SquaredEuclidean --clusters (-c) clusters The input centroids, as Vectors. Must be a SequenceFile of Writable, Cluster/Canopy. If k is also specified, then a random set of vectors will be selected and written out to this path first --numClusters (-k) k The k in k-Means. If specified, then a random selection of k Vectors will be chosen as the Centroid and written to the clusters input path. --convergenceDelta (-cd) convergenceDelta The convergence delta value. Default is 0.5 --maxIter (-x) maxIter The maximum number of iterations. --overwrite (-ow) If present, overwrite the output directory before running job --clustering (-cl) If present, run clustering after the iterations have taken place --method (-xm) method The execution method to use: sequential or mapreduce. Default is mapreduce --help (-h) Print out help --tempDir tempDir Intermediate output directory --startPhase startPhase First phase to run --endPhase endPhase Last phase to run 14/01/23 12:43:35 INFO driver.MahoutDriver: Program took 149 ms
解決辦法:輸入命令參數o 前面沒有加- ,mahout不能解析后面的參數,所以報出來的錯誤.
到此,關于“測試kmean時報錯怎么解決”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續學習更多相關知識,請繼續關注億速云網站,小編會繼續努力為大家帶來更多實用的文章!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。