测试Mahout的Logistic Regression (SGD)
来源:互联网 发布:java rpc c# 编辑:程序博客网 时间:2024/06/14 01:04
今天看了个blog后,测试了下Mahout的Logistic Regression (SGD), 具体讲解参考Mahout.
进入MAHOUT_HOME
1. 训练模型
$ bin/mahout trainlogistic --passes 1 --rate 1 --lambda 0.5 --input donut.csv --features 21 --output donut.model --target color --categories 2 --predictors x y xx xy yy a b c --types n n
21color ~ -0.016*Intercept Term + -0.016*xy + -0.016*yy Intercept Term -0.01559 xy -0.01559 yy -0.01559 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 -0.015590929 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 13/06/04 12:40:43 INFO driver.MahoutDriver: Program took 2013 ms (Minutes: 0.03355)
2. 测试模型
$ bin/mahout runlogistic --input donut.csv --model donut.model --auc --scores --confusion
结果:
"target","model-output","log-likelihood"0,0.496,-0.6852840,0.490,-0.6740550,0.491,-0.6751621,0.495,-0.7033611,0.493,-0.7062890,0.495,-0.6832750,0.496,-0.6852820,0.492,-0.6771911,0.494,-0.7042220,0.495,-0.6841070,0.496,-0.6847651,0.494,-0.7052090,0.491,-0.6752721,0.495,-0.7034380,0.496,-0.6851210,0.496,-0.6848860,0.490,-0.6725000,0.495,-0.6824450,0.496,-0.6848721,0.495,-0.7030700,0.490,-0.6725110,0.495,-0.6836430,0.492,-0.6776101,0.492,-0.7089150,0.496,-0.6847441,0.494,-0.7047660,0.492,-0.6774961,0.492,-0.7086790,0.496,-0.6852221,0.495,-0.7036040,0.492,-0.6778460,0.490,-0.6727020,0.492,-0.6769800,0.494,-0.6814501,0.495,-0.7028450,0.493,-0.6790490,0.496,-0.6842621,0.493,-0.7065641,0.495,-0.7040160,0.490,-0.672624AUC = 0.52confusion: [[27.0, 13.0], [0.0, 0.0]]entropy: [[-0.7, -0.4], [-0.7, -0.5]]13/06/04 12:45:04 INFO driver.MahoutDriver: Program took 203 ms (Minutes: 0.0033833333333333332)
参考:Mahout的Logistic Regression (SGD): https://cwiki.apache.org/MAHOUT/logistic-regression.html
http://jayatiatblogs.blogspot.hk/2013/05/running-mahouts-logistic-regression.html
- 测试Mahout的Logistic Regression (SGD)
- 机器学习之logistic regression(SGD)
- 用 theano 求解 Logistic Regression (SGD 优化算法)
- Logistic Regression的理解
- Logistic regression的林林总总
- logistic regression 在octave上的小测试程序
- 简单logistic regression的实现
- Logistic Regression的几个特性
- Logistic Regression的OpenCV代码
- Logistic Regression的一些认识
- 【TensorFlow】TensorFlow 的 Logistic Regression
- Logistic Regression 的简单推导
- logistic regression
- logistic regression
- logistic regression
- Logistic Regression
- Logistic Regression
- logistic regression
- Linux的ssh连接当中的非对称式加密
- mysql操作指令
- 一个编译链接的过程详解(转载)
- Java回调函数的理解
- UVA 10635 Prince and Princess
- 测试Mahout的Logistic Regression (SGD)
- REDIS 学习网页记录
- 僵尸进程
- gd_t
- 2013 中国15大云平台
- 看书必备:40个全球免费开放电子图书馆
- 正则验证常例
- Hdu 1166 排兵布阵
- 开发wap之外链显示图片问题