Created
May 11, 2018 21:43
-
-
Save benoitdescamps/6d7f6ff5c3eebb7f48693d089c7a37cf to your computer and use it in GitHub Desktop.
code snippet for Hyperparameters (part II): Random Search on Spark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val lr = new LogisticRegression().setMaxIter(10) | |
val randomGrid = new RandomGridBuilder(10) | |
.addDistr(lr.regParam,Gamma(0.5,0.1)) | |
.addDistr(lr.elasticNetParam,Gamma(0.5,0.1)) | |
.addDistr(lr.threshold,Gaussian(0.5,0.05)) | |
.addDistr(lr.standardization,Array(true,false)) | |
.build() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment