public class LogisticRegressionWorker extends ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>
LogisticRegressionWorker defines logic to accumulate local logistic regression gradients.
At first iteration, wait for master to use the consistent initiated model.
At other iterations, workers include:
| Constructor and Description |
|---|
LogisticRegressionWorker() |
| Modifier and Type | Method and Description |
|---|---|
LogisticRegressionParams |
doCompute(ml.shifu.guagua.worker.WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context) |
void |
init(ml.shifu.guagua.worker.WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context) |
void |
initRecordReader(ml.shifu.guagua.io.GuaguaFileSplit fileSplit) |
void |
load(GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable> currentKey,
GuaguaWritableAdapter<org.apache.hadoop.io.Text> currentValue,
ml.shifu.guagua.worker.WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context) |
protected void |
postLoad(ml.shifu.guagua.worker.WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context) |
public void initRecordReader(ml.shifu.guagua.io.GuaguaFileSplit fileSplit)
throws IOException
initRecordReader in class ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>IOExceptionpublic void init(ml.shifu.guagua.worker.WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context)
init in class ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>public LogisticRegressionParams doCompute(ml.shifu.guagua.worker.WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context)
doCompute in class ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>protected void postLoad(ml.shifu.guagua.worker.WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context)
postLoad in class ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>public void load(GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable> currentKey, GuaguaWritableAdapter<org.apache.hadoop.io.Text> currentValue, ml.shifu.guagua.worker.WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context)
load in class ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>Copyright © 2019. All Rights Reserved.