MCPcopy Create free account
hub / github.com/WinVector/Logistic / setup

Method setup

src/com/winvector/logistic/mr/MapRedFn.java:148–164  ·  view source on GitHub ↗
(final Context context)

Source from the content-addressed store, hash-verified

146 private VEval accum = null;
147
148 @Override
149 public void setup(final Context context) throws IOException {
150 // read side-channel configuration
151 log = LogFactory.getLog(SumMapper.class);
152 hostDescr = WritableUtils.hostDescr();
153 log.info(".setup() " + hostDescr);
154 try {
155 burster = SerialUtils.readSerialiazlabeFromString(context.getConfiguration().get(MapRedScan.BURSTERSERFIELD));
156 } catch (ClassNotFoundException e) {
157 throw new IOException(e.toString());
158 }
159 config = JobStateDescr.fromString(context.getConfiguration().get(MRFIELDNAME));
160 defs = new VariableEncodings(config.defs,config.useIntercept,config.weightKey);
161 accum = new VEval(config.x,config.wantGrad,config.wantHessian);
162 pscratch = new double[defs.noutcomes()];
163 nProcessed = 0;
164 }
165
166 @Override
167 public void map(final LongWritable key, final Text value, final Context context) {

Callers

nothing calls this directly

Calls 6

hostDescrMethod · 0.95
fromStringMethod · 0.95
noutcomesMethod · 0.65
getMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected