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 2021/03/25 08:46:10 UTC

[incubator-hivemall] 02/02: Removed macros

This is an automated email from the ASF dual-hosted git repository.

myui pushed a commit to branch HIVEMALL-301-tfidf
in repository https://gitbox.apache.org/repos/asf/incubator-hivemall.git

commit 556329d7d2f850b4387ca1220e335df040ea51a9
Author: Makoto Yui <my...@apache.org>
AuthorDate: Thu Mar 25 17:45:00 2021 +0900

    Removed macros
---
 resources/ddl/define-all.hive    | 19 ----------------
 resources/ddl/define-macros.hive | 49 ----------------------------------------
 2 files changed, 68 deletions(-)

diff --git a/resources/ddl/define-all.hive b/resources/ddl/define-all.hive
index b55c59b..8bf36e8 100644
--- a/resources/ddl/define-all.hive
+++ b/resources/ddl/define-all.hive
@@ -893,22 +893,3 @@ create temporary function min_by as 'hivemall.tools.aggr.MinByUDAF';
 
 drop temporary function if exists majority_vote;
 create temporary function majority_vote as 'hivemall.tools.aggr.MajorityVoteUDAF';
-
-
---------------------------------------------------------------------------------------------------
--- macros available from hive 0.12.0
--- see https://issues.apache.org/jira/browse/HIVE-2655
-
---------------------
--- General Macros --
---------------------
-
-create temporary macro java_min(x DOUBLE, y DOUBLE)
-reflect("java.lang.Math", "min", x, y);
-
-create temporary macro max2(x DOUBLE, y DOUBLE)
-if(x>y,x,y);
-
-create temporary macro min2(x DOUBLE, y DOUBLE)
-if(x<y,x,y);
-
diff --git a/resources/ddl/define-macros.hive b/resources/ddl/define-macros.hive
deleted file mode 100644
index 84c4e06..0000000
--- a/resources/ddl/define-macros.hive
+++ /dev/null
@@ -1,49 +0,0 @@
------------------------------------------------------------------------------
--- Hivemall: Hive scalable Machine Learning Library
------------------------------------------------------------------------------
-
--- macros available from hive 0.12.0
--- see https://issues.apache.org/jira/browse/HIVE-2655
-
---------------------
--- General Macros --
---------------------
-
-create temporary macro java_min(x DOUBLE, y DOUBLE)
-reflect("java.lang.Math", "min", x, y);
-
-create temporary macro max2(x DOUBLE, y DOUBLE)
-if(x>y,x,y);
-
-create temporary macro min2(x DOUBLE, y DOUBLE)
-if(x<y,x,y);
-
---------------------------
--- Evaluation functions --
---------------------------
-
--- CAUTION: UDAF in macro is not yet support supported in Hive
-
--- Root Mean Squared Error
--- create temporary macro RMSE(predicted FLOAT, actual FLOAT)
--- sqrt(sum(pow(predicted - actual,2.0))/count(1));
-
--- Mean Squared Error
--- create temporary macro MSE(predicted FLOAT, actual FLOAT)
--- sum(pow(predicted - actual,2.0))/count(1);
-
--- Mean Absolute Error
--- create temporary macro MAE(predicted FLOAT, actual FLOAT)
--- sum(abs(predicted - actual))/count(1);
-
--- sum of squared errors
--- create temporary macro SSE(predicted FLOAT, actual FLOAT)
--- sum(pow(actual - predicted,2.0));
-
--- sum of squared total
--- create temporary macro SST(actual FLOAT, mean_actual FLOAT)
--- sum(pow(actual-mean_actual,2.0));
-
--- coefficient of determination (R^2)
--- create temporary macro R2(predicted FLOAT, actual FLOAT, mean_actual FLOAT)
--- 1 - (SSE(predicted, actual) / SST(actual, mean_actual));
\ No newline at end of file