This repository has been archived by the owner on Oct 8, 2019. It is now read-only.
/
define-all.hive
218 lines (152 loc) · 7.92 KB
/
define-all.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
-----------------------------------------------------------------------------
-- Hivemall: Hive scalable Machine Learning Library
--
-- Copyright (C) 2013
-- National Institute of Advanced Industrial Science and Technology (AIST)
-- Registration Number: H25PRO-1520
-----------------------------------------------------------------------------
-- delete jar /home/myui/tmp/hivemall.jar;
-- add jar /home/myui/tmp/hivemall.jar;
---------------------------
-- binary classification --
---------------------------
drop temporary function perceptron;
create temporary function perceptron as 'hivemall.classifier.PerceptronUDTF';
drop temporary function train_pa;
create temporary function train_pa as 'hivemall.classifier.PassiveAggressiveUDTF';
drop temporary function train_pa1;
create temporary function train_pa1 as 'hivemall.classifier.PassiveAggressiveUDTF$PA1';
drop temporary function train_pa2;
create temporary function train_pa2 as 'hivemall.classifier.PassiveAggressiveUDTF$PA2';
drop temporary function train_cw;
create temporary function train_cw as 'hivemall.classifier.ConfidenceWeightedUDTF';
drop temporary function train_arow;
create temporary function train_arow as 'hivemall.classifier.AROWClassifierUDTF';
drop temporary function train_scw;
create temporary function train_scw as 'hivemall.classifier.SoftConfideceWeightedUDTF$SCW1';
drop temporary function train_scw2;
create temporary function train_scw2 as 'hivemall.classifier.SoftConfideceWeightedUDTF$SCW2';
--------------------------------
-- Multiclass classification --
--------------------------------
drop temporary function train_multiclass_perceptron;
create temporary function train_multiclass_perceptron as 'hivemall.classifier.multiclass.MulticlassPerceptronUDTF';
drop temporary function train_multiclass_pa;
create temporary function train_multiclass_pa as 'hivemall.classifier.multiclass.MulticlassPassiveAggressiveUDTF';
drop temporary function train_multiclass_pa1;
create temporary function train_multiclass_pa1 as 'hivemall.classifier.multiclass.MulticlassPassiveAggressiveUDTF$PA1';
drop temporary function train_multiclass_pa2;
create temporary function train_multiclass_pa2 as 'hivemall.classifier.multiclass.MulticlassPassiveAggressiveUDTF$PA2';
drop temporary function train_multiclass_cw;
create temporary function train_multiclass_cw as 'hivemall.classifier.multiclass.MulticlassConfidenceWeightedUDTF';
drop temporary function train_multiclass_arow;
create temporary function train_multiclass_arow as 'hivemall.classifier.multiclass.MulticlassAROWClassifierUDTF';
drop temporary function train_multiclass_scw;
create temporary function train_multiclass_scw as 'hivemall.classifier.multiclass.MulticlassSoftConfidenceWeightedUDTF$SCW1';
drop temporary function train_multiclass_scw2;
create temporary function train_multiclass_scw2 as 'hivemall.classifier.multiclass.MulticlassSoftConfidenceWeightedUDTF$SCW2';
----------------------
-- voting functions --
----------------------
drop temporary function voted_avg;
create temporary function voted_avg as 'hivemall.ensemble.bagging.VotedAvgUDAF';
drop temporary function weight_voted_avg;
create temporary function weight_voted_avg as 'hivemall.ensemble.bagging.WeightVotedAvgUDAF';
-- alias of weight_voted_avg
drop temporary function wvoted_avg;
create temporary function wvoted_avg as 'hivemall.ensemble.bagging.WeightVotedAvgUDAF';
--------------------
-- misc functions --
--------------------
drop temporary function max_label;
create temporary function max_label as 'hivemall.ensemble.MaxValueLabelUDAF';
drop temporary function maxrow;
create temporary function maxrow as 'hivemall.ensemble.MaxRowUDAF';
-----------------------
-- 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.AmplifierUDTF';
drop temporary function conv2dense;
create temporary function conv2dense as 'hivemall.ftvec.ConvertToDenseModelUDAF';
drop temporary function addBias;
create temporary function addBias as 'hivemall.ftvec.FtvecAddBiasUDF';
drop temporary function sortByFeature;
create temporary function sortByFeature as 'hivemall.ftvec.SortByFeatureUDF';
--------------------------
-- Regression functions --
--------------------------
drop temporary function logress;
create temporary function logress as 'hivemall.regression.LogressUDTF';
drop temporary function logress_iter;
create temporary function logress_iter as 'hivemall.regression.LogressIterUDTF';
drop temporary function pa1_regress;
create temporary function pa1_regress as 'hivemall.regression.PassiveAggressiveRegressionUDTF';
drop temporary function pa1a_regress;
create temporary function pa1a_regress as 'hivemall.regression.PassiveAggressiveRegressionUDTF$PA1a';
drop temporary function pa2_regress;
create temporary function pa2_regress as 'hivemall.regression.PassiveAggressiveRegressionUDTF$PA2';
drop temporary function pa2a_regress;
create temporary function pa2a_regress as 'hivemall.regression.PassiveAggressiveRegressionUDTF$PA2a';
drop temporary function arow_regress;
create temporary function arow_regress as 'hivemall.regression.AROWRegressionUDTF';
---------------------
-- array functions --
---------------------
drop temporary function AllocFloatArray;
create temporary function AllocFloatArray as 'hivemall.tools.array.AllocFloatArrayUDF';
drop temporary function array_remove;
create temporary function array_remove as 'hivemall.tools.array.ArrayRemoveUDF';
drop temporary function sort_and_uniq_array;
create temporary function sort_and_uniq_array as 'hivemall.tools.array.SortAndUniqArrayUDF';
drop temporary function subarray_endwith;
create temporary function subarray_endwith as 'hivemall.tools.array.SubarrayEndWithUDF';
drop temporary function subarray_startwith;
create temporary function subarray_startwith as 'hivemall.tools.array.SubarrayStartWithUDF';
drop temporary function collect_all;
create temporary function collect_all as 'hivemall.tools.array.CollectAllUDAF';
drop temporary function concat_array;
create temporary function concat_array as 'hivemall.tools.array.ConcatArrayUDF';
---------------------
-- map functions --
---------------------
drop temporary function map_get_sum;
create temporary function map_get_sum as 'hivemall.tools.map.MapGetSumUDF';
drop temporary function map_tail_n;
create temporary function map_tail_n as 'hivemall.tools.map.MapTailN';
drop temporary function to_map;
create temporary function to_map as 'hivemall.tools.map.UDAFToMap';
drop temporary function to_ordered_map;
create temporary function to_ordered_map as 'hivemall.tools.map.UDAFToOrderedMap';
----------------------
-- string functions --
----------------------
drop temporary function isStopword;
create temporary function isStopword as 'hivemall.tools.string.StopwordUDF';
drop temporary function split_words;
create temporary function split_words as 'hivemall.tools.string.SplitWordsUDF';
---------------------
-- macro functions --
---------------------
drop temporary function sigmoid;
create temporary function sigmoid as 'hivemall.tools.macros.SigmodUDF';