use of com.tencent.angel.ml.GBDT.GBDTRunner in project angel by Tencent.
the class GBDTLocalExample method predict.
public void predict() throws IOException {
setConf();
// Load Model from HDFS.
String TMP_PATH = System.getProperty("java.io.tmpdir", "/tmp");
conf.set("gbdt.split.feature", TMP_PATH + "/out/xxx");
conf.set("gbdt.split.value", TMP_PATH + "/out/xxx");
GBDTRunner runner = new GBDTRunner();
runner.predict(conf);
AngelClient angelClient = AngelClientFactory.get(conf);
angelClient.stop();
}
use of com.tencent.angel.ml.GBDT.GBDTRunner in project angel by Tencent.
the class GBDTTest method predict.
private void predict() throws Exception {
try {
// Load Model from HDFS.
conf.set(AngelConf.ANGEL_PREDICT_DATA_PATH, testInputPath);
conf.set(AngelConf.ANGEL_LOAD_MODEL_PATH, LOCAL_FS + TMP_PATH + "/model");
conf.set(AngelConf.ANGEL_PREDICT_PATH, LOCAL_FS + TMP_PATH + "/predict");
conf.set(AngelConf.ANGEL_ACTION_TYPE, MLConf.ANGEL_ML_PREDICT());
GBDTRunner runner = new GBDTRunner();
runner.predict(conf);
AngelClient angelClient = AngelClientFactory.get(conf);
angelClient.stop();
} catch (Exception x) {
LOG.error("run predict failed ", x);
throw x;
}
}
use of com.tencent.angel.ml.GBDT.GBDTRunner in project angel by Tencent.
the class GBDTLocalExample method train.
public void train() throws Exception {
setConf();
GBDTRunner runner = new GBDTRunner();
runner.train(conf);
AngelClient angelClient = AngelClientFactory.get(conf);
angelClient.stop();
}
use of com.tencent.angel.ml.GBDT.GBDTRunner in project angel by Tencent.
the class GBDTTest method train.
private void train() throws Exception {
try {
// Submit GBDT Train Task
conf.set(AngelConf.ANGEL_TRAIN_DATA_PATH, trainInputPath);
conf.set(AngelConf.ANGEL_SAVE_MODEL_PATH, LOCAL_FS + TMP_PATH + "/model");
GBDTRunner runner = new GBDTRunner();
runner.train(conf);
AngelClient angelClient = AngelClientFactory.get(conf);
angelClient.stop();
} catch (Exception x) {
LOG.error("run train failed ", x);
throw x;
}
}
Aggregations