Skip to content

Instantly share code, notes, and snippets.

@josep2
Created January 18, 2017 05:47
Show Gist options
  • Save josep2/4664ebd28c2d77d0452d9e04c29a30c2 to your computer and use it in GitHub Desktop.
Save josep2/4664ebd28c2d77d0452d9e04c29a30c2 to your computer and use it in GitHub Desktop.
// Create a General linear model parameters object from the Gaussian family in this case
val glmParams = new GLMParameters(Family.gaussian)
// Give it the data to train. You can get around using the key attribute by Lock and Update
glmParams._train = h2oData.key
// Set your dependent variable
glmParams._response_column = "Some Dependent Variable"
// Create a GLM Model
val glm = new GLM(glmParams, Key.make("lmModel.hex"))
// Use a GLM Model
val glmModel = glm.trainModel().get()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment