class_docstr: This class is created to test the three stopping conditions for randomized gridsearch using
  GLM Binomial family.  The three stopping conditions are :
  
  1. max_runtime_secs:
  2. max_models:
  3. metrics.  We will be picking 2 stopping metrics to test this stopping condition with.  One metric
  will be optimized if it increases and the other one should be optimized if it decreases.
  
  I have written 4 tests:
  1. test1_glm_random_grid_search_model_number: this test will not put any stopping conditions
  on randomized search.  The purpose here is to make sure that randomized search will give us all possible
  hyper-parameter combinations.
  2. test2_glm_random_grid_search_max_model: this test the stopping condition of setting the max_model in
  search criteria;
  3. test3_glm_random_grid_search_max_runtime_secs: this test the stopping condition max_runtime_secs
  in search criteria;
  4. test4_glm_random_grid_search_metric: this test the stopping condition of using a metric which can be
  increasing or decreasing.
class_docstr_tok: ["This","class","is","created","to","test","the","three","stopping","conditions","for","randomized","gridsearch","using","GLM","Binomial","family",".","The","three","stopping","conditions","are",":","1.","max_runtime_secs",":","2.","max_models",":","3.","metrics",".","We","will","be","picking","2","stopping","metrics","to","test","this","stopping","condition","with",".","One","metric","will","be","optimized","if","it","increases","and","the","other","one","should","be","optimized","if","it","decreases",".","I","have","written","4","tests",":","1.","test1_glm_random_grid_search_model_number",":","this","test","will","not","put","any","stopping","conditions","on","randomized","search",".","The","purpose","here","is","to","make","sure","that","randomized","search","will","give","us","all","possible","hyper-parameter","combinations",".","2.","test2_glm_random_grid_search_max_model",":","this","test","the","stopping","condition","of","setting","the","max_model","in","search","criteria",";","3.","test3_glm_random_grid_search_max_runtime_secs",":","this","test","the","stopping","condition","max_runtime_secs","in","search","criteria",";","4.","test4_glm_random_grid_search_metric",":","this","test","the","stopping","condition","of","using","a","metric","which","can","be","increasing","or","decreasing","."]
docstr: Constructor.
  
  :param family: distribution family for tests
  :return: None
docstr_tok: ["Constructor",".",":","param","family",":","distribution","family","for","tests",":","return",":","None"]
code: def __init__(self, family):
      """
      Constructor.
  
      :param family: distribution family for tests
      :return: None
      """
      self.setup_data()  # setup_data training data
      self.setup_grid_params()
  
file_path: h2o-3/h2o-py/dynamic_tests/testdir_algos/glm/pyunit_glm_gaussian_gridsearch_randomdiscrete_large.py
imports: import sys
  import random
  import os
  from builtins import range
  import time
  import json
  import h2o
  from tests import pyunit_utils
  from h2o.estimators.glm import H2OGeneralizedLinearEstimator
  from h2o.grid.grid_search import H2OGridSearch
label_desc: Use image node_id 1 to create a new Test_glm_random_grid_search object  with example: obj = Test_glm_random_grid_search(family)