docstr: Retrieve Qini value (area between Qini cumulative uplift curve and random curve)
  
  If all are False (default), then return the training metric AUUC table.
  If more than one options is set to True, then return a dictionary of metrics where the 
  keys are "train" and "valid".
  
  :param bool train: If True, return the Qini value for the training data.
  :param bool valid: If True, return the Qini value for the validation data.
  
  :returns: the Qini value for the specified key(s).
  
  :examples:
  
  >>> from h2o.estimators import H2OUpliftRandomForestEstimator
  >>> train = h2o.import_file("https://s3.amazonaws.com/h2o-public-test-data/smalldata/uplift/criteo_uplift_13k.csv")
  >>> treatment_column = "treatment"
  >>> response_column = "conversion"
  >>> train[treatment_column] = train[treatment_column].asfactor()
  >>> train[response_column] = train[response_column].asfactor()
  >>> predictors = ["f1", "f2", "f3", "f4", "f5", "f6"]
  >>>
  >>> uplift_model = H2OUpliftRandomForestEstimator(ntrees=10,
  ...                                               max_depth=5,
  ...                                               treatment_column=treatment_column,
  ...                                               uplift_metric="kl",
  ...                                               distribution="bernoulli",
  ...                                               min_rows=10,
  ...                                               auuc_type="gain")
  >>> uplift_model.train(y=response_column, x=predictors, training_frame=train)
  >>> uplift_model.qini() # <- Default: return training metric value
  >>> uplift_model.qini(train=True)
docstr_tok: ["Retrieve","Qini","value","(","area","between","Qini","cumulative","uplift","curve","and","random","curve",")","If","all","are","False","(","default",")",",","then","return","the","training","metric","AUUC","table",".","If","more","than","one","options","is","set","to","True",",","then","return","a","dictionary","of","metrics","where","the","keys","are","``","train","''","and","``","valid","''",".",":","param","bool","train",":","If","True",",","return","the","Qini","value","for","the","training","data",".",":","param","bool","valid",":","If","True",",","return","the","Qini","value","for","the","validation","data",".",":","returns",":","the","Qini","value","for","the","specified","key","(","s",")",".",":","examples",":",">",">",">","from","h2o.estimators","import","H2OUpliftRandomForestEstimator",">",">",">","train","=","h2o.import_file","(","``","https",":","\/\/s3.amazonaws.com\/h2o-public-test-data\/smalldata\/uplift\/criteo_uplift_13k.csv","''",")",">",">",">","treatment_column","=","``","treatment","''",">",">",">","response_column","=","``","conversion","''",">",">",">","train","[","treatment_column","]","=","train","[","treatment_column","]",".asfactor","(",")",">",">",">","train","[","response_column","]","=","train","[","response_column","]",".asfactor","(",")",">",">",">","predictors","=","[","``","f1","''",",","``","f2","''",",","``","f3","''",",","``","f4","''",",","``","f5","''",",","``","f6","''","]",">",">",">",">",">",">","uplift_model","=","H2OUpliftRandomForestEstimator","(","ntrees=10",",","...","max_depth=5",",","...","treatment_column=treatment_column",",","...","uplift_metric=","''","kl","''",",","...","distribution=","''","bernoulli","''",",","...","min_rows=10",",","...","auuc_type=","''","gain","''",")",">",">",">","uplift_model.train","(","y=response_column",",","x=predictors",",","training_frame=train",")",">",">",">","uplift_model.qini","(",")","#","<","-","Default",":","return","training","metric","value",">",">",">","uplift_model.qini","(","train=True",")"]
code: def qini(self, train=False, valid=False):
      """
      Retrieve Qini value (area between Qini cumulative uplift curve and random curve)
  
      If all are False (default), then return the training metric AUUC table.
      If more than one options is set to True, then return a dictionary of metrics where the
      keys are "train" and "valid".
  
      :param bool train: If True, return the Qini value for the training data.
      :param bool valid: If True, return the Qini value for the validation data.
  
      :returns: the Qini value for the specified key(s).
  
      :examples:
  
      >>> from h2o.estimators import H2OUpliftRandomForestEstimator
      >>> train = h2o.import_file("https://s3.amazonaws.com/h2o-public-test-data/smalldata/uplift/criteo_uplift_13k.csv")
      >>> treatment_column = "treatment"
      >>> response_column = "conversion"
      >>> train[treatment_column] = train[treatment_column].asfactor()
      >>> train[response_column] = train[response_column].asfactor()
      >>> predictors = ["f1", "f2", "f3", "f4", "f5", "f6"]
      >>>
      >>> uplift_model = H2OUpliftRandomForestEstimator(ntrees=10,
      ...                                               max_depth=5,
      ...                                               treatment_column=treatment_column,
      ...                                               uplift_metric="kl",
      ...                                               distribution="bernoulli",
      ...                                               min_rows=10,
      ...                                               auuc_type="gain")
      >>> uplift_model.train(y=response_column, x=predictors, training_frame=train)
      >>> uplift_model.qini() # <- Default: return training metric value
      >>> uplift_model.qini(train=True)
      """
      return self._delegate_to_metrics(
          method="qini", train=train, valid=valid
      )
  
file_path: h2o-3/h2o-py/h2o/model/models/uplift.py
imports: from h2o.utils.compatibility import *
  from h2o.model import ModelBase
  from h2o.utils.metaclass import deprecated_params_order
label_desc: Use image node_id 9 for calling the H2OBinomialUpliftModel obj's underlying member method code with example usage: obj.qini(train, valid) and returns: self