mahout分类源码分析-01
2013-02-25 18:36
585 查看
mahout分类源码分析
接口Interface OnlineLearner:
实现的类:
AbstractOnlineLogisticRegression, AdaptiveLogisticRegression,
CrossFoldLearner, OnlineLogisticRegression
方法如下:
void train(int actual,
Vector instance)
更新模型,实用一个目标变量的值和一个特征向量,主意这里假定:如果对训练数据进行多次,那么训练样本应该有相同的顺序。
参数说明:
actual:目标变量的值,这个值应该是一个半开区间[0....n)其中n是目标变来那个的类别。
instance:特征向量
void train(long trackingKey,
java.lang.String groupKey,
int actual,
Vector instance)
更新模型,实用一个目标变量的值和一个特征向量
Parameters:
trackingKey - The tracking key for this training example.
groupKey - An optional value that allows examples to be grouped in
the computation of the update to the model.
actual - The value of the target variable. This value should be in
the half-open interval [0..n) where n is the number of target
categories.
instance - The feature vector for this example.
void train(long trackingKey,
int actual,
Vector instance)
Updates the model using a particular target variable value and a
feature vector.
Parameters:
trackingKey - The tracking key for this training example.
actual - The value of the target variable. This value should be in
the half-open interval [0..n) where n is the number of target
categories.
instance - The feature vector for this example.
void close()
为分类做准备,去掉任何临时数据结构,一个在线分类器应该能接受更多的训练在调用clouse(),但是关闭分类器或许使分类更有效。
接口Interface OnlineLearner:
实现的类:
AbstractOnlineLogisticRegression, AdaptiveLogisticRegression,
CrossFoldLearner, OnlineLogisticRegression
方法如下:
void train(int actual,
Vector instance)
更新模型,实用一个目标变量的值和一个特征向量,主意这里假定:如果对训练数据进行多次,那么训练样本应该有相同的顺序。
参数说明:
actual:目标变量的值,这个值应该是一个半开区间[0....n)其中n是目标变来那个的类别。
instance:特征向量
void train(long trackingKey,
java.lang.String groupKey,
int actual,
Vector instance)
更新模型,实用一个目标变量的值和一个特征向量
Parameters:
trackingKey - The tracking key for this training example.
groupKey - An optional value that allows examples to be grouped in
the computation of the update to the model.
actual - The value of the target variable. This value should be in
the half-open interval [0..n) where n is the number of target
categories.
instance - The feature vector for this example.
void train(long trackingKey,
int actual,
Vector instance)
Updates the model using a particular target variable value and a
feature vector.
Parameters:
trackingKey - The tracking key for this training example.
actual - The value of the target variable. This value should be in
the half-open interval [0..n) where n is the number of target
categories.
instance - The feature vector for this example.
void close()
为分类做准备,去掉任何临时数据结构,一个在线分类器应该能接受更多的训练在调用clouse(),但是关闭分类器或许使分类更有效。
相关文章推荐
- mahout贝叶斯并行分类源码分析
- Mahout贝叶斯算法源码分析(6)
- Mahout线性回归算法源码分析(2)--RunLogistic
- Mahout源码K均值聚类算分析(2)
- Mahout 协同过滤 itemBase RecommenderJob源码分析
- 一、Android源码分析01-Ubuntu14.04系统Android源码下载
- Spark MLlib之分类模型源码分析
- vue2源码浏览分析01
- mahout贝叶斯并行分类分析
- java源码分析01-Object源码分析
- 【Mybatis源码分析】01-SqlSessionFactory的创建过程
- Mybatis3源码分析(01)-前期准备
- Mahout决策树算法源码分析(2)
- 使用fastText进行文本分类及源码分析时的一点感受
- Mahout随机森林算法源码分析(2)--BuildForest
- jQuery源码分析-01总体架构
- Junit-3.8.1源码分析01----总体概括
- Android 源码分析01_AsyncTask
- Mahout协同过滤算法源码分析(5)--拓展篇
- Mahout基于项目的协同过滤算法源码分析(1)--PreparePreferenceMatrixJob