feature_hashing


feature_hashing(array features [, const string options]) – returns a hashed feature vector in array

select feature_hashing(array(‘aaa:1.0′,’aaa’,’bbb:2.0′), ‘-libsvm’);
[“4063537:1.0″,”4063537:1″,”8459207:2.0”]

select feature_hashing(array(‘aaa:1.0′,’aaa’,’bbb:2.0′), ‘-features 10’);
[“7:1.0″,”7″,”1:2.0”]

select feature_hashing(array(‘aaa:1.0′,’aaa’,’bbb:2.0′), ‘-features 10 -libsvm’);
[“1:2.0″,”7:1.0″,”7:1”]

Platforms: WhereOS, Spark, Hive
Class: hivemall.ftvec.hashing.FeatureHashingUDF

More functions can be added to WhereOS via Python or R bindings or as Java & Scala UDF (user-defined function), UDAF (user-defined aggregation function) and UDTF (user-defined table generating function) extensions. Custom libraries can be added on via Settings-page or installed from WhereOS Store.

Leave a Reply