Search in sources :

Example 1 with IterativeSVMAccuracyReduce

use of edu.iu.dsc.tws.examples.ml.svm.aggregate.IterativeSVMAccuracyReduce in project twister2 by DSC-SPIDAL.

the class SvmSgdIterativeRunner method buildSvmSgdTestingTG.

private ComputeGraph buildSvmSgdTestingTG() {
    iterativePredictionDataStreamer = new IterativePredictionDataStreamer(this.svmJobParameters.getFeatures(), this.operationMode, this.svmJobParameters.isDummy(), this.binaryBatchModel);
    iterativeSVMAccuracyReduce = new IterativeSVMAccuracyReduce(this.operationMode);
    testingBuilder.addSource(Constants.SimpleGraphConfig.PREDICTION_SOURCE_TASK, iterativePredictionDataStreamer, dataStreamerParallelism);
    ComputeConnection svmComputeConnection = testingBuilder.addCompute(Constants.SimpleGraphConfig.PREDICTION_REDUCE_TASK, iterativeSVMAccuracyReduce, dataStreamerParallelism);
    svmComputeConnection.allreduce(Constants.SimpleGraphConfig.PREDICTION_SOURCE_TASK).viaEdge(Constants.SimpleGraphConfig.PREDICTION_EDGE).withReductionFunction(new IterativeAccuracyReduceFunction()).withDataType(MessageTypes.DOUBLE);
    testingBuilder.setMode(operationMode);
    testingBuilder.setTaskGraphName(IterativeSVMConstants.ITERATIVE_PREDICTION_TASK_GRAPH);
    return testingBuilder.build();
}
Also used : IterativeSVMAccuracyReduce(edu.iu.dsc.tws.examples.ml.svm.aggregate.IterativeSVMAccuracyReduce) IterativePredictionDataStreamer(edu.iu.dsc.tws.examples.ml.svm.streamer.IterativePredictionDataStreamer) ComputeConnection(edu.iu.dsc.tws.task.impl.ComputeConnection) IterativeAccuracyReduceFunction(edu.iu.dsc.tws.examples.ml.svm.aggregate.IterativeAccuracyReduceFunction)

Aggregations

IterativeAccuracyReduceFunction (edu.iu.dsc.tws.examples.ml.svm.aggregate.IterativeAccuracyReduceFunction)1 IterativeSVMAccuracyReduce (edu.iu.dsc.tws.examples.ml.svm.aggregate.IterativeSVMAccuracyReduce)1 IterativePredictionDataStreamer (edu.iu.dsc.tws.examples.ml.svm.streamer.IterativePredictionDataStreamer)1 ComputeConnection (edu.iu.dsc.tws.task.impl.ComputeConnection)1