This repository has been archived by the owner on Oct 8, 2019. It is now read-only.
/
define-ftvec-udf.hive
61 lines (44 loc) · 2.15 KB
/
define-ftvec-udf.hive
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
-----------------------------------------------------------------------------
-- Hivemall: Hive scalable Machine Learning Library
--
-- Copyright (C) 2013
-- National Institute of Advanced Industrial Science and Technology (AIST)
-- Registration Number: H25PRO-1520
-----------------------------------------------------------------------------
-----------------------
-- hashing functions --
-----------------------
drop temporary function mhash;
create temporary function mhash as 'hivemall.ftvec.hashing.MurmurHash3UDF';
drop temporary function sha1;
create temporary function sha1 as 'hivemall.ftvec.hashing.Sha1UDF';
drop temporary function array_hash_values;
create temporary function array_hash_values as 'hivemall.ftvec.hashing.ArrayHashValuesUDF';
drop temporary function prefixed_hash_values;
create temporary function prefixed_hash_values as 'hivemall.ftvec.hashing.ArrayPrefixedHashValuesUDF';
-----------------------
-- scaling functions --
-----------------------
drop temporary function rescale;
create temporary function rescale as 'hivemall.ftvec.scaling.RescaleUDF';
drop temporary function rescale_fv;
create temporary function rescale_fv as 'hivemall.ftvec.scaling.RescaleFeatureValueUDF';
drop temporary function zscore;
create temporary function zscore as 'hivemall.ftvec.scaling.ZScoreUDF';
--------------------
-- misc functions --
--------------------
drop temporary function amplify;
create temporary function amplify as 'hivemall.ftvec.amplify.AmplifierUDTF';
drop temporary function rand_amplify;
create temporary function rand_amplify as 'hivemall.ftvec.amplify.RandomAmplifierUDTF';
drop temporary function conv2dense;
create temporary function conv2dense as 'hivemall.ftvec.ConvertToDenseModelUDAF';
drop temporary function addBias;
create temporary function addBias as 'hivemall.ftvec.AddBiasUDF';
drop temporary function sortByFeature;
create temporary function sortByFeature as 'hivemall.ftvec.SortByFeatureUDF';
drop temporary function extract_feature;
create temporary function extract_feature as 'hivemall.ftvec.ExtractFeatureUDF';
drop temporary function extract_weight;
create temporary function extract_weight as 'hivemall.ftvec.ExtractWeightUDF';