public class WinnowTrainer extends LinearTrainer
| Constructor and Description |
|---|
WinnowTrainer(int dimension)
Initializes with dimension and promotionStep of 2.
|
WinnowTrainer(int dimension,
double promotionStep) |
WinnowTrainer(int dimension,
double promotionStep,
double threshold,
double init,
double initBias) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
update(double label,
org.apache.mahout.math.Vector dataPoint,
LinearModel model)
Implement this method to match your training strategy.
|
getModel, trainpublic WinnowTrainer(int dimension,
double promotionStep,
double threshold,
double init,
double initBias)
public WinnowTrainer(int dimension,
double promotionStep)
public WinnowTrainer(int dimension)
dimension - number of features.protected void update(double label,
org.apache.mahout.math.Vector dataPoint,
LinearModel model)
update in class LinearTrainerlabel - the target label of the wrongly classified data point.dataPoint - the data point that was classified incorrectly.model - the model to update.Copyright © 2008-2013 The Apache Software Foundation. All Rights Reserved.