Skip to content

Instantly share code, notes, and snippets.

View romovpa's full-sized avatar

Peter Romov romovpa

View GitHub Profile
@raelg
raelg / gist:e12d731ba01ba58f0006
Created January 20, 2015 16:44
Scala Gson Serializer
package services
import java.lang.reflect.Type
import com.google.gson._
import org.joda.time.format.ISODateTimeFormat
import org.joda.time.{DateTime, DateTimeZone}
object Serializers {
@pprett
pprett / grid_search.py
Created October 31, 2012 19:42
Parallel grid search for sklearn Gradient Boosting
"""Parallel grid search for sklearn's GradientBoosting.
This script uses IPython.parallel to run cross-validated
grid search on an IPython cluster. Each cell on the parameter grid
will be evaluated ``K`` times - results are stored in MongoDB.
The procedure tunes the number of trees ``n_estimators`` by averaging
the staged scores of the GBRT model averaged over all K folds.
You need an IPython ipcluster to connect to - for local use simply