daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest Dec 18th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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())
RAW Paste Data
Top