docstr: Get the error for a set of thresholds.
  
  If all are ``False`` (default), then return the training metric value.
  If more than one option is set to ``True``, then return a dictionary of metrics where the keys are "train",
  "valid", and "xval".
  
  :param thresholds: If None, then the threshold minimizing the error will be used.
  :param bool train: If ``True``, return the error value for the training data.
  :param bool valid: If ``True``, return the error value for the validation data.
  :param bool xval: If ``True``, return the error value for each of the cross-validated splits.
  
  :returns: The error values for the specified key(s).
  
  :examples:
  
  >>> cars = h2o.import_file("https://s3.amazonaws.com/h2o-public-test-data/smalldata/junit/cars_20mpg.csv")
  >>> cars["economy_20mpg"] = cars["economy_20mpg"].asfactor()
  >>> r = cars[0].runif()
  >>> train = cars[r > .2]
  >>> valid = cars[r <=.2]
  >>> response_col = "economy_20mpg"
  >>> distribution = "bernoulli"
  >>> predictors = ["displacement", "power", "weight", "acceleration", "year"]
  >>> from h2o.estimators.gbm import H2OGradientBoostingEstimator
  >>> gbm = H2OGradientBoostingEstimator(nfolds=3,
  ...                                    distribution=distribution,
  ...                                    fold_assignment="Random")
  >>> gbm.train(y=response_col,
  ...           x=predictors,
  ...           validation_frame=valid,
  ...           training_frame=train)
  >>> gbm.error() # <- Default: return training metric
  >>> gbm.error(train=True, valid=True, xval=True)
docstr_tok: ["Get","the","error","for","a","set","of","thresholds",".","If","all","are","``","False","``","(","default",")",",","then","return","the","training","metric","value",".","If","more","than","one","option","is","set","to","``","True","``",",","then","return","a","dictionary","of","metrics","where","the","keys","are","``","train","''",",","''","valid","''",",","and","``","xval","''",".",":","param","thresholds",":","If","None",",","then","the","threshold","minimizing","the","error","will","be","used",".",":","param","bool","train",":","If","``","True","``",",","return","the","error","value","for","the","training","data",".",":","param","bool","valid",":","If","``","True","``",",","return","the","error","value","for","the","validation","data",".",":","param","bool","xval",":","If","``","True","``",",","return","the","error","value","for","each","of","the","cross-validated","splits",".",":","returns",":","The","error","values","for","the","specified","key","(","s",")",".",":","examples",":",">",">",">","cars","=","h2o.import_file","(","``","https",":","\/\/s3.amazonaws.com\/h2o-public-test-data\/smalldata\/junit\/cars_20mpg.csv","''",")",">",">",">","cars","[","``","economy_20mpg","''","]","=","cars","[","``","economy_20mpg","''","]",".asfactor","(",")",">",">",">","r","=","cars","[","0","]",".runif","(",")",">",">",">","train","=","cars","[","r",">",".2","]",">",">",">","valid","=","cars","[","r","<","=.2","]",">",">",">","response_col","=","``","economy_20mpg","''",">",">",">","distribution","=","``","bernoulli","''",">",">",">","predictors","=","[","``","displacement","''",",","``","power","''",",","``","weight","''",",","``","acceleration","''",",","``","year","''","]",">",">",">","from","h2o.estimators.gbm","import","H2OGradientBoostingEstimator",">",">",">","gbm","=","H2OGradientBoostingEstimator","(","nfolds=3",",","...","distribution=distribution",",","...","fold_assignment=","''","Random","''",")",">",">",">","gbm.train","(","y=response_col",",","...","x=predictors",",","...","validation_frame=valid",",","...","training_frame=train",")",">",">",">","gbm.error","(",")","#","<","-","Default",":","return","training","metric",">",">",">","gbm.error","(","train=True",",","valid=True",",","xval=True",")"]
code: def error(
      self, thresholds=None, train=False, valid=False, xval=False
  ):
      """
      Get the error for a set of thresholds.
  
      If all are ``False`` (default), then return the training metric value.
      If more than one option is set to ``True``, then return a dictionary of metrics where the keys are "train",
      "valid", and "xval".
  
      :param thresholds: If None, then the threshold minimizing the error will be used.
      :param bool train: If ``True``, return the error value for the training data.
      :param bool valid: If ``True``, return the error value for the validation data.
      :param bool xval: If ``True``, return the error value for each of the cross-validated splits.
  
      :returns: The error values for the specified key(s).
  
      :examples:
  
      >>> cars = h2o.import_file("https://s3.amazonaws.com/h2o-public-test-data/smalldata/junit/cars_20mpg.csv")
      >>> cars["economy_20mpg"] = cars["economy_20mpg"].asfactor()
      >>> r = cars[0].runif()
      >>> train = cars[r > .2]
      >>> valid = cars[r <=.2]
      >>> response_col = "economy_20mpg"
      >>> distribution = "bernoulli"
      >>> predictors = ["displacement", "power", "weight", "acceleration", "year"]
      >>> from h2o.estimators.gbm import H2OGradientBoostingEstimator
      >>> gbm = H2OGradientBoostingEstimator(nfolds=3,
      ...                                    distribution=distribution,
      ...                                    fold_assignment="Random")
      >>> gbm.train(y=response_col,
      ...           x=predictors,
      ...           validation_frame=valid,
      ...           training_frame=train)
      >>> gbm.error() # <- Default: return training metric
      >>> gbm.error(train=True, valid=True, xval=True)
      """
      return self.metric("error", thresholds, train, valid, xval)
  
imports: from h2o.utils.compatibility import *
  from h2o.exceptions import H2OValueError
  from h2o.model import ModelBase
  from h2o.model.extensions import has_extension
  from h2o.utils.metaclass import deprecated_params
  from h2o.utils.typechecks import assert_is_type
label_desc: Use image node_id 6 for calling the H2OBinomialModel obj's underlying member method code with example usage: obj.error(thresholds, train, valid, xval) and returns: self