Skip to content

Instantly share code, notes, and snippets.

@myui
Last active October 29, 2016 00:17
Show Gist options
  • Save myui/5a31738ea9d7dff3cea6d43fbb6d3ec5 to your computer and use it in GitHub Desktop.
Save myui/5a31738ea9d7dff3cea6d43fbb6d3ec5 to your computer and use it in GitHub Desktop.
val trainDf =
spark.read.format("libsvm”).load(“a9a.train")
trainDf.train_logregr($"feature", $"label")
.groupby("feature")
.agg("weight"->"avg")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment