In [ ]:
#---------------------------------------------------------------------
#
# Include and run all the Python code snippets from the H2O GLM Vignette.
#
# The snippets are broken out into separate files so the exact same
# piece of code both shows up in the document and is run by this
# script.
#
#---------------------------------------------------------------------
In [ ]:
import h2o
In [ ]:
import os
print(os.getcwd())
In [ ]:
h2o.init()
In [ ]:
h2o.remove_all()
execfile("glm/glm_gaussian_example.py")
h2o.remove_all()
execfile("glm/glm_binomial_example.py")
h2o.remove_all()
execfile("glm/glm_poisson_example.py")
h2o.remove_all()
execfile("glm/glm_gamma_example.py")
h2o.remove_all()
execfile("glm/glm_tweedie_example.py")
In [ ]:
h2o.remove_all()
execfile("glm/coerce_column_to_factor.py")
In [ ]:
h2o.remove_all()
execfile("glm/glm_cross_validation.py")
In [ ]:
h2o.remove_all()
execfile("glm/glm_stopping_criteria.py")
In [ ]:
h2o.remove_all()
execfile("glm/glm_grid_search_over_alpha.py")
In [ ]:
# Not supported right now.
#
# h2o.remove_all()
# execfile("glm/glm_grid_search_over_lambda.py")
In [ ]:
h2o.remove_all()
execfile("glm/glm_model_output_10.py")
execfile("glm/glm_model_output_20.py")
execfile("glm/glm_model_output_30.py")
execfile("glm/glm_model_output_40.py")
execfile("glm/glm_accessors.py")
execfile("glm/glm_confusion_matrix.py")
execfile("glm/glm_scoring_history.py")
In [ ]:
h2o.remove_all()
execfile("glm/glm_binomial_predictions_with_response.py")
execfile("glm/glm_binomial_predictions_without_response.py")
execfile("glm/glm_recalculate_predict.py")
In [ ]:
h2o.remove_all()
execfile("glm/glm_download_pojo.py")