ml.shifu.guagua.example.lr
类 LogisticRegressionWorker

java.lang.Object
  继承者 ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>>
      继承者 ml.shifu.guagua.example.lr.LogisticRegressionWorker
所有已实现的接口:
ml.shifu.guagua.worker.WorkerComputable<LogisticRegressionParams,LogisticRegressionParams>

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 initiating model.

At other iterations, workers include:


构造方法摘要
LogisticRegressionWorker()
           
 
方法摘要
 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)
           
 
从类 ml.shifu.guagua.worker.AbstractWorkerComputable 继承的方法
compute, getRecordReader, preLoad, setRecordReader
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

LogisticRegressionWorker

public LogisticRegressionWorker()
方法详细信息

initRecordReader

public void initRecordReader(ml.shifu.guagua.io.GuaguaFileSplit fileSplit)
                      throws IOException
指定者:
ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>> 中的 initRecordReader
抛出:
IOException

init

public void init(ml.shifu.guagua.worker.WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context)
指定者:
ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>> 中的 init

doCompute

public LogisticRegressionParams doCompute(ml.shifu.guagua.worker.WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context)
指定者:
ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>> 中的 doCompute

postLoad

protected void postLoad(ml.shifu.guagua.worker.WorkerContext<LogisticRegressionParams,LogisticRegressionParams> context)
覆盖:
ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>> 中的 postLoad

load

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)
指定者:
ml.shifu.guagua.worker.AbstractWorkerComputable<LogisticRegressionParams,LogisticRegressionParams,GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,GuaguaWritableAdapter<org.apache.hadoop.io.Text>> 中的 load


Copyright © 2015. All Rights Reserved.