This is an automated email from the ASF dual-hosted git repository. myui pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-hivemall.git
commit 0a10aac92674a533bb84806cb2cdecd5ec478af8 Author: Makoto Yui <m...@apache.org> AuthorDate: Thu Oct 31 19:17:31 2019 +0900 Renamed XGBoostUDTF as XGBoostBaseUDTF --- .../hivemall/xgboost/{XGBoostUDTF.java => XGBoostBaseUDTF.java} | 6 +++--- .../xgboost/classification/XGBoostBinaryClassifierUDTF.java | 7 ++++--- .../xgboost/classification/XGBoostMulticlassClassifierUDTF.java | 4 ++-- .../java/hivemall/xgboost/regression/XGBoostRegressionUDTF.java | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/xgboost/src/main/java/hivemall/xgboost/XGBoostUDTF.java b/xgboost/src/main/java/hivemall/xgboost/XGBoostBaseUDTF.java similarity index 98% rename from xgboost/src/main/java/hivemall/xgboost/XGBoostUDTF.java rename to xgboost/src/main/java/hivemall/xgboost/XGBoostBaseUDTF.java index 272614f..8d77ae3 100644 --- a/xgboost/src/main/java/hivemall/xgboost/XGBoostUDTF.java +++ b/xgboost/src/main/java/hivemall/xgboost/XGBoostBaseUDTF.java @@ -54,8 +54,8 @@ import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectIn * This is a base class to handle the options for XGBoost and provide common functions among various * tasks. */ -public abstract class XGBoostUDTF extends UDTFWithOptions { - private static final Log logger = LogFactory.getLog(XGBoostUDTF.class); +public abstract class XGBoostBaseUDTF extends UDTFWithOptions { + private static final Log logger = LogFactory.getLog(XGBoostBaseUDTF.class); // Settings for the XGBoost native library static { @@ -106,7 +106,7 @@ public abstract class XGBoostUDTF extends UDTFWithOptions { params.put("base_score", 0.5); } - public XGBoostUDTF() { + public XGBoostBaseUDTF() { this.featuresList = new ArrayList<>(1024); } diff --git a/xgboost/src/main/java/hivemall/xgboost/classification/XGBoostBinaryClassifierUDTF.java b/xgboost/src/main/java/hivemall/xgboost/classification/XGBoostBinaryClassifierUDTF.java index 1138e73..a0409d7 100644 --- a/xgboost/src/main/java/hivemall/xgboost/classification/XGBoostBinaryClassifierUDTF.java +++ b/xgboost/src/main/java/hivemall/xgboost/classification/XGBoostBinaryClassifierUDTF.java @@ -18,7 +18,7 @@ */ package hivemall.xgboost.classification; -import hivemall.xgboost.XGBoostUDTF; +import hivemall.xgboost.XGBoostBaseUDTF; import org.apache.hadoop.hive.ql.exec.Description; import org.apache.hadoop.hive.ql.metadata.HiveException; @@ -28,8 +28,9 @@ import org.apache.hadoop.hive.ql.metadata.HiveException; * https://github.com/dmlc/xgboost/tree/master/demo/binary_classification */ @Description(name = "train_xgboost_classifier", - value = "_FUNC_(string[] features, double target [, string options]) - Returns a relation consisting of <string model_id, array<byte> pred_model>") -public final class XGBoostBinaryClassifierUDTF extends XGBoostUDTF { + value = "_FUNC_(array<string> features, double target [, string options])" + + " - Returns a relation consisting of <string model_id, array<byte> pred_model>") +public final class XGBoostBinaryClassifierUDTF extends XGBoostBaseUDTF { public XGBoostBinaryClassifierUDTF() { super(); diff --git a/xgboost/src/main/java/hivemall/xgboost/classification/XGBoostMulticlassClassifierUDTF.java b/xgboost/src/main/java/hivemall/xgboost/classification/XGBoostMulticlassClassifierUDTF.java index 7bdb16f..cb4c45c 100644 --- a/xgboost/src/main/java/hivemall/xgboost/classification/XGBoostMulticlassClassifierUDTF.java +++ b/xgboost/src/main/java/hivemall/xgboost/classification/XGBoostMulticlassClassifierUDTF.java @@ -18,7 +18,7 @@ */ package hivemall.xgboost.classification; -import hivemall.xgboost.XGBoostUDTF; +import hivemall.xgboost.XGBoostBaseUDTF; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Options; @@ -33,7 +33,7 @@ import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; */ @Description(name = "train_multiclass_xgboost_classifier", value = "_FUNC_(string[] features, double target [, string options]) - Returns a relation consisting of <string model_id, array<byte> pred_model>") -public final class XGBoostMulticlassClassifierUDTF extends XGBoostUDTF { +public final class XGBoostMulticlassClassifierUDTF extends XGBoostBaseUDTF { public XGBoostMulticlassClassifierUDTF() { super(); diff --git a/xgboost/src/main/java/hivemall/xgboost/regression/XGBoostRegressionUDTF.java b/xgboost/src/main/java/hivemall/xgboost/regression/XGBoostRegressionUDTF.java index 5d38afe..c018c33 100644 --- a/xgboost/src/main/java/hivemall/xgboost/regression/XGBoostRegressionUDTF.java +++ b/xgboost/src/main/java/hivemall/xgboost/regression/XGBoostRegressionUDTF.java @@ -21,7 +21,7 @@ package hivemall.xgboost.regression; import org.apache.hadoop.hive.ql.exec.Description; import org.apache.hadoop.hive.ql.metadata.HiveException; -import hivemall.xgboost.XGBoostUDTF; +import hivemall.xgboost.XGBoostBaseUDTF; /** * A XGBoost regression and the document is as follows; - @@ -29,7 +29,7 @@ import hivemall.xgboost.XGBoostUDTF; */ @Description(name = "train_xgboost_regr", value = "_FUNC_(string[] features, double target [, string options]) - Returns a relation consisting of <string model_id, array<byte> pred_model>") -public final class XGBoostRegressionUDTF extends XGBoostUDTF { +public final class XGBoostRegressionUDTF extends XGBoostBaseUDTF { public XGBoostRegressionUDTF() { super();