Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. // Create a General linear model parameters object from the Gaussian family in this case
  2.  
  3. val glmParams = new GLMParameters(Family.gaussian)
  4.  
  5. // Give it the data to train. You can get around using the key attribute by Lock and Update
  6. glmParams._train = h2oData.key
  7. // Set your dependent variable
  8. glmParams._response_column = "Some Dependent Variable"
  9. // Create a GLM Model
  10. val glm = new GLM(glmParams, Key.make("lmModel.hex"))
  11. // Use a GLM Model
  12. val glmModel = glm.trainModel().get()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement