Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 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()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement