Skip to content

Instantly share code, notes, and snippets.

View bjedwards's full-sized avatar
🏠
Working from home

Benjamin Edwards bjedwards

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@bjedwards
bjedwards / LDASerializationBug.scala
Last active February 27, 2017 18:05
Minimal example that exercises Serialization/Deserialization bug for LocalLDA model
import org.apache.spark.ml.clustering.LDA
import org.apache.spark.ml.clustering.LDAModel
import java.io._
val dataset = spark.read.format("libsvm").load("data/mllib/sample_lda_libsvm_data.txt")
val lda = new LDA().setK(10).setMaxIter(10).setOptimizer("online")
val model = lda.fit(dataset)
// works
model.transform(dataset).show()
@bjedwards
bjedwards / Scipy shifted lognormal vs. PyMC3 lognormal.ipynb
Last active November 4, 2015 17:14
Scipy shifted lognormal vs. PyMC3 lognormal
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.