You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hivemall.apache.org by my...@apache.org on 2018/01/23 09:39:58 UTC
[1/3] incubator-hivemall git commit: Added an entry to ignore
Repository: incubator-hivemall
Updated Branches:
refs/heads/v0.5.0 91a5c795b -> 9d9eac0eb
Added an entry to ignore
Project: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/commit/affc6b48
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/tree/affc6b48
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/diff/affc6b48
Branch: refs/heads/v0.5.0
Commit: affc6b48d14b7a00534936e42a2128daffe941fd
Parents: 91a5c79
Author: Makoto Yui <my...@apache.org>
Authored: Tue Jan 23 18:35:23 2018 +0900
Committer: Makoto Yui <my...@apache.org>
Committed: Tue Jan 23 18:35:23 2018 +0900
----------------------------------------------------------------------
.gitignore | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/affc6b48/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 84b63c8..3ba5593 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,4 @@ release.properties
\#*#
pom.xml.next
pom.xml.tag
+.cache-main
[2/3] incubator-hivemall git commit: Avoided
org.apache.spark.sql.AnalysisException: probability must be DoubleType,
however it is FloatType; (VectorQueryTest.scala:80)
Posted by my...@apache.org.
Avoided org.apache.spark.sql.AnalysisException: probability must be DoubleType, however it is FloatType; (VectorQueryTest.scala:80)
Project: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/commit/90461cbf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/tree/90461cbf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/diff/90461cbf
Branch: refs/heads/v0.5.0
Commit: 90461cbfd2ac95976561a002ae4cbcf34cffed39
Parents: affc6b4
Author: Makoto Yui <my...@apache.org>
Authored: Tue Jan 23 18:36:13 2018 +0900
Committer: Makoto Yui <my...@apache.org>
Committed: Tue Jan 23 18:36:13 2018 +0900
----------------------------------------------------------------------
.../scala/org/apache/spark/sql/hive/HivemallGroupedDataset.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/90461cbf/spark/spark-2.2/src/main/scala/org/apache/spark/sql/hive/HivemallGroupedDataset.scala
----------------------------------------------------------------------
diff --git a/spark/spark-2.2/src/main/scala/org/apache/spark/sql/hive/HivemallGroupedDataset.scala b/spark/spark-2.2/src/main/scala/org/apache/spark/sql/hive/HivemallGroupedDataset.scala
index 00617b7..4a6b568 100644
--- a/spark/spark-2.2/src/main/scala/org/apache/spark/sql/hive/HivemallGroupedDataset.scala
+++ b/spark/spark-2.2/src/main/scala/org/apache/spark/sql/hive/HivemallGroupedDataset.scala
@@ -127,7 +127,7 @@ final class HivemallGroupedDataset(groupBy: RelationalGroupedDataset) {
* @group ensemble
*/
def max_label(score: String, label: String): DataFrame = {
- checkType(score, DoubleType)
+ //checkType(score, DoubleType)
checkType(label, StringType)
val udaf = HiveUDAFFunction(
"max_label",
[3/3] incubator-hivemall git commit: Fixed implicit casts
Posted by my...@apache.org.
Fixed implicit casts
Project: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/commit/9d9eac0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/tree/9d9eac0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/diff/9d9eac0e
Branch: refs/heads/v0.5.0
Commit: 9d9eac0ebab6f546953c33d91e54abe91f996c72
Parents: 90461cb
Author: Makoto Yui <my...@apache.org>
Authored: Tue Jan 23 18:39:47 2018 +0900
Committer: Makoto Yui <my...@apache.org>
Committed: Tue Jan 23 18:39:47 2018 +0900
----------------------------------------------------------------------
.../xgboost/tools/XGBoostMulticlassPredictUDTF.java | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/9d9eac0e/xgboost/src/main/java/hivemall/xgboost/tools/XGBoostMulticlassPredictUDTF.java
----------------------------------------------------------------------
diff --git a/xgboost/src/main/java/hivemall/xgboost/tools/XGBoostMulticlassPredictUDTF.java b/xgboost/src/main/java/hivemall/xgboost/tools/XGBoostMulticlassPredictUDTF.java
index fd67c09..b80f95a 100644
--- a/xgboost/src/main/java/hivemall/xgboost/tools/XGBoostMulticlassPredictUDTF.java
+++ b/xgboost/src/main/java/hivemall/xgboost/tools/XGBoostMulticlassPredictUDTF.java
@@ -18,8 +18,6 @@
*/
package hivemall.xgboost.tools;
-import hivemall.utils.lang.Preconditions;
-
import java.util.ArrayList;
import java.util.List;
@@ -32,10 +30,11 @@ import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector;
import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
-@Description(
- name = "xgboost_multiclass_predict",
+import hivemall.utils.lang.Preconditions;
+
+@Description(name = "xgboost_multiclass_predict",
value = "_FUNC_(string rowid, string[] features, string model_id, array<byte> pred_model [, string options]) "
- + "- Returns a prediction result as (string rowid, int label, float probability)")
+ + "- Returns a prediction result as (string rowid, string label, float probability)")
public final class XGBoostMulticlassPredictUDTF extends hivemall.xgboost.XGBoostPredictUDTF {
public XGBoostMulticlassPredictUDTF() {
@@ -65,14 +64,14 @@ public final class XGBoostMulticlassPredictUDTF extends hivemall.xgboost.XGBoost
final Object[] forwardObj = new Object[3];
for (int i = 0, size = testData.size(); i < size; i++) {
final float[] predicted_i = predicted[i];
- final String rowId = testData.get(i).getRowId();
+ String rowId = testData.get(i).getRowId();
forwardObj[0] = rowId;
assert (predicted_i.length > 1);
for (int j = 0; j < predicted_i.length; j++) {
- forwardObj[1] = j;
+ forwardObj[1] = String.valueOf(j);
float prob = predicted_i[j];
- forwardObj[2] = prob;
+ forwardObj[2] = Float.valueOf(prob);
forward(forwardObj);
}
}