Type: New Feature
Affects Version/s: None
Fix Version/s: None
Weka is one of the most popular data mining package on the planet. It's used by numerous people around the world. Since weka is in Java, it should be pretty straight-forward to integrate weka with Hive.
We just need to create some GenericUDAF functions that maps to Weka classifier training process. The output of the GenericUDAF can just be the serialized version of the trained classifiers.
We should add another GenericUDF to load the classifier to classify new instances.
The hive syntax can be as simple as this: (Note: In the example above, most of the "table." can be omitted. I put it there just for easier understanding of the query semantics.)
The query builds a model (logistic regression) for predicting the CTR of each link on each page, based on user information, and evaluates the model on some data.
Use Weka in your Java Code: http://weka.wiki.sourceforge.net/Use+Weka+in+your+Java+code
Weka is under GPL license. We won't be able to include the code directly into Hive, but we can keep the discussions here.