Mahout 的安裝

來源:互聯網
上載者:User

標籤:

Mahout 的安裝

 

Mahout是Hadoop的一種進階應用程式。運行Mahout需要提前安裝好Hadoop,Mahout只在Hadoop叢集的NameNode節點上安裝一個即可,其他資料節點上不需要安裝

1.下載

2.配置環境變數

3.mahout --help

檢查Mahout是否安裝完好,看是否列出了一些演算法

      當然,這種方法並不準確,可以通過接下來的步驟進行驗證。

4.mahout使用準備

a.下載一個檔案synthetic_control.data,http://archive.ics.uci.edu/ml/databases/synthetic_control/synthetic_control.data,並把這個檔案放在$MAHOUT_HOME目錄下。

b. 查看hadoop 狀態,要啟動hadoop  

c.

c.建立測試目錄testdata,並把資料匯入到這個tastdata目錄中(這裡的目錄的名字只能是testdata)

[email protected]:~/$ hadoop fs -mkdir testdata #

[email protected]:~/$ hadoop fs -put /home/hadoop/mahout-distribution-0.7/synthetic_control.data testdata

d.使用kmeans演算法(這會運行幾分鐘左右)

[email protected]:~/$ hadoop jar /home/hadoop/mahout-distribution-0.7/mahout-examples-0.7-job.jar org.apache.mahout.clustering.syntheticcontrol.kmeans.Job

e.查看結果

[email protected]:~/$ hadoop fs -lsr output

如果看到以下結果那麼演算法運行成功,你的安裝也就成功了。

clusteredPoints  clusters-0  clusters-1  clusters-10  clusters-2  clusters-3  clusters-4 clusters-5  clusters-6  clusters-7  clusters-8  clusters-9  data

Mahout 的安裝

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.