Skip to content

Instantly share code, notes, and snippets.

@myui
Created October 29, 2016 00:08
Show Gist options
  • Save myui/87c792ce1b5633f8d1ba10a4ce2dd431 to your computer and use it in GitHub Desktop.
Save myui/87c792ce1b5633f8d1ba10a4ce2dd431 to your computer and use it in GitHub Desktop.
a = load 'a9a.train'
as (rowid:int, label:float, features:{(featurepair:chararray)});
b = foreach c generate flatten(
logress(features, label, '-total_steps ${total_steps}')
) as (feature, weight);
c = group b by feature;
d = foreach c generate group, AVG(c.weight);
store d into 'a9a_model1';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment