Repository: incubator-hivemall Updated Branches: refs/heads/master c46c9c391 -> 289f91e04
Close #53: [HIVEMAL-82] Add ranking measures to DDL Project: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/commit/289f91e0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/tree/289f91e0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/diff/289f91e0 Branch: refs/heads/master Commit: 289f91e04ad5d81ab1d389298ccffe35ab9d26d6 Parents: c46c9c3 Author: Takuya Kitazawa <[email protected]> Authored: Thu Mar 2 15:48:48 2017 +0900 Committer: myui <[email protected]> Committed: Thu Mar 2 15:48:48 2017 +0900 ---------------------------------------------------------------------- resources/ddl/define-all-as-permanent.hive | 15 +++++++++++++++ resources/ddl/define-all.hive | 15 +++++++++++++++ resources/ddl/define-all.spark | 15 +++++++++++++++ resources/ddl/define-udfs.td.hql | 5 +++++ 4 files changed, 50 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/289f91e0/resources/ddl/define-all-as-permanent.hive ---------------------------------------------------------------------- diff --git a/resources/ddl/define-all-as-permanent.hive b/resources/ddl/define-all-as-permanent.hive index f9f9fd8..c6dda03 100644 --- a/resources/ddl/define-all-as-permanent.hive +++ b/resources/ddl/define-all-as-permanent.hive @@ -553,6 +553,21 @@ CREATE FUNCTION r2 as 'hivemall.evaluation.R2UDAF' USING JAR '${hivemall_jar}'; DROP FUNCTION IF EXISTS ndcg; CREATE FUNCTION ndcg as 'hivemall.evaluation.NDCGUDAF' USING JAR '${hivemall_jar}'; +DROP FUNCTION IF EXISTS precision; +CREATE FUNCTION precision as 'hivemall.evaluation.PrecisionUDAF' USING JAR '${hivemall_jar}'; + +DROP FUNCTION IF EXISTS recall; +CREATE FUNCTION recall as 'hivemall.evaluation.RecallUDAF' USING JAR '${hivemall_jar}'; + +DROP FUNCTION IF EXISTS mrr; +CREATE FUNCTION mrr as 'hivemall.evaluation.MRRUDAF' USING JAR '${hivemall_jar}'; + +DROP FUNCTION IF EXISTS average_precision; +CREATE FUNCTION average_precision as 'hivemall.evaluation.MAPUDAF' USING JAR '${hivemall_jar}'; + +DROP FUNCTION IF EXISTS auc; +CREATE FUNCTION auc as 'hivemall.evaluation.AUCUDAF' USING JAR '${hivemall_jar}'; + DROP FUNCTION IF EXISTS logloss; CREATE FUNCTION logloss as 'hivemall.evaluation.LogarithmicLossUDAF' USING JAR '${hivemall_jar}'; http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/289f91e0/resources/ddl/define-all.hive ---------------------------------------------------------------------- diff --git a/resources/ddl/define-all.hive b/resources/ddl/define-all.hive index 6e0f911..8ea16c1 100644 --- a/resources/ddl/define-all.hive +++ b/resources/ddl/define-all.hive @@ -549,6 +549,21 @@ create temporary function r2 as 'hivemall.evaluation.R2UDAF'; drop temporary function if exists ndcg; create temporary function ndcg as 'hivemall.evaluation.NDCGUDAF'; +drop temporary function if exists precision; +create temporary function precision as 'hivemall.evaluation.PrecisionUDAF'; + +drop temporary function if exists recall; +create temporary function recall as 'hivemall.evaluation.RecallUDAF'; + +drop temporary function if exists mrr; +create temporary function mrr as 'hivemall.evaluation.MRRUDAF'; + +drop temporary function if exists average_precision; +create temporary function average_precision as 'hivemall.evaluation.MAPUDAF'; + +drop temporary function if exists auc; +create temporary function auc as 'hivemall.evaluation.AUCUDAF'; + drop temporary function if exists logloss; create temporary function logloss as 'hivemall.evaluation.LogarithmicLossUDAF'; http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/289f91e0/resources/ddl/define-all.spark ---------------------------------------------------------------------- diff --git a/resources/ddl/define-all.spark b/resources/ddl/define-all.spark index 70385bc..0172cc8 100644 --- a/resources/ddl/define-all.spark +++ b/resources/ddl/define-all.spark @@ -533,6 +533,21 @@ sqlContext.sql("CREATE TEMPORARY FUNCTION r2 AS 'hivemall.evaluation.R2UDAF'") sqlContext.sql("DROP TEMPORARY FUNCTION IF EXISTS ndcg") sqlContext.sql("CREATE TEMPORARY FUNCTION ndcg AS 'hivemall.evaluation.NDCGUDAF'") +sqlContext.sql("DROP TEMPORARY FUNCTION IF EXISTS precision") +sqlContext.sql("CREATE TEMPORARY FUNCTION precision AS 'hivemall.evaluation.PrecisionUDAF'") + +sqlContext.sql("DROP TEMPORARY FUNCTION IF EXISTS recall") +sqlContext.sql("CREATE TEMPORARY FUNCTION recall AS 'hivemall.evaluation.RecallUDAF'") + +sqlContext.sql("DROP TEMPORARY FUNCTION IF EXISTS mrr") +sqlContext.sql("CREATE TEMPORARY FUNCTION mrr AS 'hivemall.evaluation.MRRUDAF'") + +sqlContext.sql("DROP TEMPORARY FUNCTION IF EXISTS average_precision") +sqlContext.sql("CREATE TEMPORARY FUNCTION average_precision AS 'hivemall.evaluation.MAPUDAF'") + +sqlContext.sql("DROP TEMPORARY FUNCTION IF EXISTS auc") +sqlContext.sql("CREATE TEMPORARY FUNCTION auc AS 'hivemall.evaluation.AUCUDAF'") + sqlContext.sql("DROP TEMPORARY FUNCTION IF EXISTS logloss") sqlContext.sql("CREATE TEMPORARY FUNCTION logloss AS 'hivemall.evaluation.LogarithmicLossUDAF'") http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/289f91e0/resources/ddl/define-udfs.td.hql ---------------------------------------------------------------------- diff --git a/resources/ddl/define-udfs.td.hql b/resources/ddl/define-udfs.td.hql index 7e1c77a..cff0913 100644 --- a/resources/ddl/define-udfs.td.hql +++ b/resources/ddl/define-udfs.td.hql @@ -136,6 +136,11 @@ create temporary function mse as 'hivemall.evaluation.MeanSquaredErrorUDAF'; create temporary function rmse as 'hivemall.evaluation.RootMeanSquaredErrorUDAF'; create temporary function r2 as 'hivemall.evaluation.R2UDAF'; create temporary function ndcg as 'hivemall.evaluation.NDCGUDAF'; +create temporary function precision as 'hivemall.evaluation.PrecisionUDAF'; +create temporary function recall as 'hivemall.evaluation.RecallUDAF'; +create temporary function mrr as 'hivemall.evaluation.MRRUDAF'; +create temporary function average_precision as 'hivemall.evaluation.MAPUDAF'; +create temporary function auc as 'hivemall.evaluation.AUCUDAF'; create temporary function logloss as 'hivemall.evaluation.LogarithmicLossUDAF'; create temporary function mf_predict as 'hivemall.mf.MFPredictionUDF'; create temporary function train_mf_sgd as 'hivemall.mf.MatrixFactorizationSGDUDTF';
