Mahout介绍
3.11简介
Mahout:是一个Apache的一个开源的机器学习库,主要实现了三大类算法Recommender
(collaborative filtering)、Clustering、classification。可扩展,用Java实现,用MapReduce实现了部分数据挖掘算法,解决了并行挖掘的问题。
Mahout为数据分析人员,解决了大数据的门槛;为算法工程师提供了基础算法库;为Hadoop开发人员提供了数据建模的标准。
——张丹(Conan) http://blog.fens.me/hadoop-mahout-roadmap/
3.12Mahout历史演变
Mahout began life in 2008 as a project of Apache`s lucene project .Lucene provides advanced implementations of search ,text mining and information-retrival techniques.In the universe of computer science ,there concepts are adjacent to machine learning techniques like clustering and to an extent ,classification .As a result,some of the work of the Lucene committers that fell more into these machine learning areas was spun off into its own subproject. Soon after ,Mahout absorbed the Taste open source collaborative filtering project.As of April 2010 ,Mahout became a top-level Apache project in its own right, and get a bran-new elephant rider logo to boot.
——Mahout in Action
25 April 2014 - Goodbye MapReduce
The Mahout community decided to move its codebase onto modern data processing systems that offer a richer programming model and more efficient execution than Hadoop MapReduce. Mahout will therefore reject new MapReduce algorithm implementations from now on. We will however keep our widely used MapReduce algorithms in the codebase and maintain them.
We are building our future implementations on top of a DSL for linear algebraic operations which has been developed over the last months. Programs written in this DSL are automatically optimized and executed in parallel on Apache Spark.
——http://mahout.apache.org/
3.13Hadoop家族中Mahout的结构图

主要算法:
|
算法类 |
算法名 |
中文名 |
|
分类算法 |
Logistic Regression |
逻辑回归 |
|
Bayesian |
贝叶斯 |
|
|
SVM |
支持向量机 |
|
|
Perceptron |
感知器算法 |
|
|
Neural Network |
神经网络 |
|
|
Random Forests |
随机森林 |
|
|
Restricted Boltzmann Machines |
有限波尔兹曼机 |
|
|
聚类算法 |
Canopy Clustering |
Canopy聚类 |
|
K-means Clustering |
K均值算法 |
|
|
Fuzzy K-means |
模糊K均值 |
|
|
Expectation Maximization |
EM聚类(期望最大化聚类) |
|
|
Mean Shift Clustering |
均值漂移聚类 |
|
|
Hierarchical Clustering |
层次聚类 |
|
|
Dirichlet Process Clustering |
狄里克雷过程聚类 |
|
|
Latent Dirichlet Allocation |
LDA聚类 |
|
|
Spectral Clustering |
谱聚类 |
|
|
关联规则挖掘 |
Parallel FP Growth Algorithm |
并行FP Growth算法 |
|
回归 |
Locally Weighted Linear Regression |
局部加权线性回归 |
|
降维/维约简 |
Singular Value Decomposition |
奇异值分解 |
|
Principal Components Analysis |
主成分分析 |
|
|
Independent Component Analysis |
独立成分分析 |
|
|
Gaussian Discriminative Analysis |
高斯判别分析 |
|
|
进化算法 |
并行化了Watchmaker框架 |
|
|
推荐/协同过滤 |
Non-distributed recommenders |
Taste(UserCF, ItemCF, SlopeOne) |
|
Distributed Recommenders |
ItemCF |
|
|
向量相似度计算 |
RowSimilarityJob |
计算列间相似度 |
|
VectorDistanceJob |
计算向量间距离 |
|
|
非Map-Reduce算法 |
Hidden Markov Models |
隐马尔科夫模型 |
|
集合方法扩展 |
Collections |
扩展了java的Collections类 |
3.14Mahout在Hadoop 平台上的安装
1.下载mahout:http://archive.apache.org/dist/mahout/
2.下载Maven 一般ubuntu系统直接 sudo apt-get install maven
3.将mahout 的文件解压成文件夹mahout 并放入/usr文件夹
sudo tar -zxvf mahout-distribution-0.9.tar.gz
sudo mv mahout-distribution-0.9 /usr/mahout
4.创建一个脚本,配置mahout的环境。脚本内容
export JAVA_HOME=/usr/lib/jvm/jdk8/
export MAHOUT_HOME=/usr/mahout9
export MAHOUT_CONF_DIR=/usr/mahout9/conf
export PATH=$MAHOUT_HOME/bin:$MAHOUT_HOME/conf:$PATH
export HADOOP_HOME=/usr/hadoop
export HADOOP_CONF_DIR=/usr/hadoop/conf
export PATH=$PATH:$HADOOP_HOME/bin
5.运行脚本文件,运行mahout命令
6.到这里就表示安装成功,下面下载一个测书数据,是一下mahout 的Kmeans聚类方法。
Sudo wget http://archive.ics.uci.edu/ml/databases/synthetic_control/synthetic_control.data

7.将数据上传到HDFS 上
hdfs fs -mkdir testdata
hdfs fs -put /usr/synthetic_control.data ./testdata
8.运行k-means聚类算法
mahout -core org.apache.clustering.syntheticcontrol.kmeans.Job

Mahout介绍的更多相关文章
- Mahout介绍、安装与应用案例
搭建环境 部署节点操作系统为CentOS,防火墙和SElinux禁用,创建了一个shiyanlou用户并在系统根目录下创建/app目录,用于存放 Hadoop等组件运行包.因为该目录用于安装h ...
- Mahout介绍和简单应用
Mahout学习(主要学习内容是Mahout中推荐部分的ItemCF.UserCF.Hadoop集群部署运行) 1.Mahout是什么? Mahout是一个算法库,集成了很多算法. Apache Ma ...
- Mahout介绍-炼数
Mahout的中文含义:象夫
- Mahout 介绍
1.Hbase+k-means (G级别) 2.k-means+mr (T级别) 1. 2.canopy 2.贝叶斯算法 决策,分类,文档分类 3.推荐系统 4.图书推荐系统 1.需求 付完款的用户 ...
- Hadoop入门进阶课程9--Mahout介绍、安装与应用案例
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,博主为石山园,博客地址为 http://www.cnblogs.com/shishanyuan ...
- Hadoop第10周练习—Mahout部署及进行20newsgroup数据分析例子
:搭建Mahout环境 :运行20newsgroup 内容 运行环境说明 1.1 硬软件环境 线程,主频2.2G,6G内存 l 虚拟软件:VMware® Workstation 9.0.0 buil ...
- 转】Mahout学习路线图
原博文出自于: http://blog.fens.me/hadoop-mahout-roadmap/ 感谢! Mahout学习路线图 Hadoop家族系列文章,主要介绍Hadoop家族产品,常用的项目 ...
- mahout第一篇-----Mahout学习路线图
Mahout学习路线图 前言 Mahout是Hadoop家族中与众不同的一个成员,是基于一个Hadoop的机器学习和数据挖掘的分布式计算框架.Mahout是一个跨学科产品,同时也是我认为Hadoop家 ...
- Mahout学习路线图
转自:http://blog.fens.me/hadoop-mahout-roadmap/ Mahout学习路线图 Hadoop家族系列文章,主要介绍Hadoop家族产品,常用的项目包括Hadoop, ...
随机推荐
- sql: Compare Tables
---使用 UNION.INTERSECT 或 EXCEPT 运算符合并的所有查询必须在其目标列表中有相同数目的表达式 select * from BookInfoList --存在不同的 selec ...
- Bzoj3510:首都
Sol \(LCT\)动态维护树重心 方法一 因为只有加边,所以可以暴力启发式合并,维护重心 维护子树信息,子树大小不超过一半 复杂度两只\(log\) 方法二 扣出两个重心的链,链上二分找 每次\( ...
- sql left join 字符串
select * FROM table1 as t1 right join (select '1,2,3,4,5' as t) as tt on t1.Id=tt.t select * FROM t ...
- Windows API 编程-----Windows NT 环境下禁止任务切换
函数原型: BOOL WINAPI SystemParametersInfo( _In_ UINT uiAction, _In_ UINT uiParam, _Inout_ PVOID pvParam ...
- JAVA的静态方法,静态变量,静态类。
静态变量和静态方法都属于静态对象,它与非静态对象的差别需要做个说明. (1)Java静态对象和非静态对象有什么区别? 比对如下: 静态对象 ...
- Python爬虫教程-15-读取cookie(人人网)和SSL(12306官网)
Python爬虫教程-15-爬虫读取cookie(人人网)和SSL(12306官网) 上一篇写道关于存储cookie文件,本篇介绍怎样读取cookie文件 cookie的读取 案例v16ssl文件:h ...
- react 反模式——不使用jsx动态显示异步组件
前言: react反模式 (anti-patterns)指的是违背react思想(flux)的coding方式. 本文在 App 组件中,通过 Model.show 动态显示 Model 组件,通过 ...
- 二进制中 1 的个数(C++ 和 Python 实现)
(说明:本博客中的题目.题目详细说明及参考代码均摘自 “何海涛<剑指Offer:名企面试官精讲典型编程题>2012年”) 题目 请实现一个函数,输入一个整数,输出该数二进制表示中 1 的个 ...
- html 颜色在线取色器
推荐一个链接 还不错 http://www.atool.org/colorpicker.php
- 【Leetcode】【Medium】4Sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = tar ...