use of ml.shifu.guagua.hadoop.GuaguaMRUnitDriver in project shifu by ShifuML.
the class DTTest method testCamDtApp.
// @Test
public void testCamDtApp() throws IOException {
Properties props = new Properties();
props.setProperty(GuaguaConstants.MASTER_COMPUTABLE_CLASS, DTMaster.class.getName());
props.setProperty(GuaguaConstants.WORKER_COMPUTABLE_CLASS, DTWorker.class.getName());
props.setProperty(GuaguaConstants.GUAGUA_ITERATION_COUNT, "20");
props.setProperty(GuaguaConstants.GUAGUA_MASTER_RESULT_CLASS, DTMasterParams.class.getName());
props.setProperty(GuaguaConstants.GUAGUA_WORKER_RESULT_CLASS, DTWorkerParams.class.getName());
props.setProperty(CommonConstants.MODELSET_SOURCE_TYPE, "LOCAL");
props.setProperty(CommonConstants.SHIFU_MODEL_CONFIG, getClass().getResource("/test/config/ModelConfig.json").toString());
props.setProperty(CommonConstants.SHIFU_COLUMN_CONFIG, getClass().getResource("/test/config/ColumnConfig.json").toString());
props.setProperty(GuaguaConstants.GUAGUA_INPUT_DIR, getClass().getResource("/test/data/").toString());
GuaguaUnitDriver<DTMasterParams, DTWorkerParams> driver = new GuaguaMRUnitDriver<DTMasterParams, DTWorkerParams>(props);
driver.run();
}
use of ml.shifu.guagua.hadoop.GuaguaMRUnitDriver in project shifu by ShifuML.
the class DTTest method testDtApp.
// @Test
public void testDtApp() throws IOException {
Properties props = new Properties();
props.setProperty(GuaguaConstants.MASTER_COMPUTABLE_CLASS, DTMaster.class.getName());
props.setProperty(GuaguaConstants.WORKER_COMPUTABLE_CLASS, DTWorker.class.getName());
props.setProperty(GuaguaConstants.GUAGUA_ITERATION_COUNT, "20");
props.setProperty(GuaguaConstants.GUAGUA_MASTER_RESULT_CLASS, DTMasterParams.class.getName());
props.setProperty(GuaguaConstants.GUAGUA_WORKER_RESULT_CLASS, DTWorkerParams.class.getName());
props.setProperty(CommonConstants.MODELSET_SOURCE_TYPE, "LOCAL");
props.setProperty(CommonConstants.SHIFU_MODEL_CONFIG, getClass().getResource("/test/config/ModelConfig.json").toString());
props.setProperty(CommonConstants.SHIFU_COLUMN_CONFIG, getClass().getResource("/test/config/ColumnConfig.json").toString());
props.setProperty(GuaguaConstants.GUAGUA_INPUT_DIR, getClass().getResource("/test/data/").toString());
GuaguaUnitDriver<DTMasterParams, DTWorkerParams> driver = new GuaguaMRUnitDriver<DTMasterParams, DTWorkerParams>(props);
driver.run();
}
use of ml.shifu.guagua.hadoop.GuaguaMRUnitDriver in project shifu by ShifuML.
the class VotedVarSelTest method testLrApp.
// @Test
public void testLrApp() throws IOException {
Properties props = new Properties();
props.setProperty(GuaguaConstants.MASTER_COMPUTABLE_CLASS, VarSelWorker.class.getName());
props.setProperty(GuaguaConstants.WORKER_COMPUTABLE_CLASS, VarSelMaster.class.getName());
props.setProperty(GuaguaConstants.GUAGUA_ITERATION_COUNT, "20");
props.setProperty(GuaguaConstants.GUAGUA_MASTER_RESULT_CLASS, VarSelMasterResult.class.getName());
props.setProperty(GuaguaConstants.GUAGUA_WORKER_RESULT_CLASS, VarSelWorkerResult.class.getName());
props.setProperty(GuaguaConstants.GUAGUA_INPUT_DIR, getClass().getResource("/example/cancer-judgement/DataStore/DataSet1/part-00").toString());
GuaguaUnitDriver<VarSelMasterResult, VarSelWorkerResult> driver = new GuaguaMRUnitDriver<VarSelMasterResult, VarSelWorkerResult>(props);
driver.run();
}
Aggregations