Guest User

Untitled

a guest
Dec 18th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import h2o
  2.  
  3. h2o.init(nthreads = -1, max_mem_size = "110g")
  4. df = h2o.import_file(path = "C:/user/path_to_data.csv")
  5.  
  6. #predictors
  7. x = [col for col in df.column if 'target' not in col]
  8. y = 'target'
  9.  
  10. #establish model
  11. m = h2o.estimators.H2ORandomForestEstimator(model_id="RF_defaults", nfolds = 5)
  12.  
  13. #train
  14. m.train(x,y, df)
  15.  
  16. #view results
  17. print (m.cross_validation_metrics_summary())
Add Comment
Please, Sign In to add comment