This is an automated email from the ASF dual-hosted git repository. myui pushed a commit to branch libsvm in repository https://gitbox.apache.org/repos/asf/incubator-hivemall.git
commit 7d134b175bb4bdc48e682cebec5975108d3aaabc Author: Makoto Yui <[email protected]> AuthorDate: Thu Jun 20 19:07:51 2019 +0900 Added DDLs --- resources/ddl/define-all-as-permanent.hive | 3 +++ resources/ddl/define-all.hive | 4 +++- resources/ddl/define-all.spark | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/ddl/define-all-as-permanent.hive b/resources/ddl/define-all-as-permanent.hive index 0c836f2..ff20c8c 100644 --- a/resources/ddl/define-all-as-permanent.hive +++ b/resources/ddl/define-all-as-permanent.hive @@ -288,6 +288,9 @@ CREATE FUNCTION build_bins as 'hivemall.ftvec.binning.BuildBinsUDAF' USING JAR ' DROP FUNCTION IF EXISTS feature_binning; CREATE FUNCTION feature_binning as 'hivemall.ftvec.binning.FeatureBinningUDF' USING JAR '${hivemall_jar}'; +DROP FUNCTION IF EXISTS to_libsvm_format; +CREATE FUNCTION to_libsvm_format as 'hivemall.ftvec.conv.ToLibSVMFormatUDF' USING JAR '${hivemall_jar}'; + -------------------------- -- feature transformers -- -------------------------- diff --git a/resources/ddl/define-all.hive b/resources/ddl/define-all.hive index e6f7c0b..0495113 100644 --- a/resources/ddl/define-all.hive +++ b/resources/ddl/define-all.hive @@ -284,6 +284,9 @@ create temporary function build_bins as 'hivemall.ftvec.binning.BuildBinsUDAF'; drop temporary function if exists feature_binning; create temporary function feature_binning as 'hivemall.ftvec.binning.FeatureBinningUDF'; +drop temporary function if exists to_libsvm_format; +create temporary function to_libsvm_format as 'hivemall.ftvec.conv.ToLibSVMFormatUDF'; + -------------------------- -- feature transformers -- -------------------------- @@ -883,4 +886,3 @@ log(10, n_docs / max2(1,df_t)) + 1.0; create temporary macro tfidf(tf FLOAT, df_t DOUBLE, n_docs DOUBLE) tf * (log(10, n_docs / max2(1,df_t)) + 1.0); - diff --git a/resources/ddl/define-all.spark b/resources/ddl/define-all.spark index e3ff216..feadbbf 100644 --- a/resources/ddl/define-all.spark +++ b/resources/ddl/define-all.spark @@ -287,6 +287,9 @@ sqlContext.sql("CREATE TEMPORARY FUNCTION build_bins AS 'hivemall.ftvec.binning. sqlContext.sql("DROP TEMPORARY FUNCTION IF EXISTS feature_binning") sqlContext.sql("CREATE TEMPORARY FUNCTION feature_binning AS 'hivemall.ftvec.binning.FeatureBinningUDF'") +sqlContext.sql("DROP TEMPORARY FUNCTION IF EXISTS to_libsvm_format") +sqlContext.sql("CREATE TEMPORARY FUNCTION to_libsvm_format AS 'hivemall.ftvec.conv.ToLibSVMFormatUDF'") + /** * feature transformers */
