Skip to content

Instantly share code, notes, and snippets.

View StephenKrewson's full-sized avatar

Stephen Krewson StephenKrewson

View GitHub Profile
@krishnanraman
krishnanraman / bayesfactor.scala
Last active August 29, 2015 14:15
Bayes Factor in Scalding
$ scalding/scripts/scald.rb --repl --local
scalding> case class BuyNotBuy(token:String, app:String, buy:Boolean)
defined class BuyNotBuy
scalding> val pipe = TextLine("bnblist.txt")
.read
.map( 'line -> 'line ){x:String =>
val cols = x.split("\t")
BuyNotBuy(cols(0), cols(1), cols(2).toBoolean)