docstr: Retrieve the mean per class error across all classes.
  
  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 bool train: If ``True``, return the ``mean_per_class_error`` value for the training data.
  :param bool valid: If ``True``, return the ``mean_per_class_error`` value for the validation data.
  :param bool xval:  If ``True``, return the ``mean_per_class_error`` value for each of the cross-validated splits.
  
  :returns: The ``mean_per_class_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["cylinders"] = cars["cylinders"].asfactor()
  >>> r = cars[0].runif()
  >>> train = cars[r > .2]
  >>> valid = cars[r <= .2]
  >>> response_col = "cylinders"
  >>> predictors = ["displacement","power","weight","acceleration","year"]
  >>> distribution = "multinomial"
  >>> gbm = H2OGradientBoostingEstimator(nfolds=3, distribution=distribution)
  >>> gbm.train(x=predictors,
  ...           y=response_col,
  ...           training_frame=train,
  ...           validation_frame=valid)
  >>> mean_per_class_error = gbm.mean_per_class_error() # <- Default: return training metric
  >>> mean_per_class_error
  >>> mean_per_class_error1 = gbm.mean_per_class_error(train=True,
  ...                                                  valid=True,
  ...                                                  xval=True)
  >>> mean_per_class_error1
docstr_tok: ["Retrieve","the","mean","per","class","error","across","all","classes",".","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","bool","train",":","If","``","True","``",",","return","the","``","mean_per_class_error","``","value","for","the","training","data",".",":","param","bool","valid",":","If","``","True","``",",","return","the","``","mean_per_class_error","``","value","for","the","validation","data",".",":","param","bool","xval",":","If","``","True","``",",","return","the","``","mean_per_class_error","``","value","for","each","of","the","cross-validated","splits",".",":","returns",":","The","``","mean_per_class_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","[","``","cylinders","''","]","=","cars","[","``","cylinders","''","]",".asfactor","(",")",">",">",">","r","=","cars","[","0","]",".runif","(",")",">",">",">","train","=","cars","[","r",">",".2","]",">",">",">","valid","=","cars","[","r","<","=",".2","]",">",">",">","response_col","=","``","cylinders","''",">",">",">","predictors","=","[","``","displacement","''",",","''","power","''",",","''","weight","''",",","''","acceleration","''",",","''","year","''","]",">",">",">","distribution","=","``","multinomial","''",">",">",">","gbm","=","H2OGradientBoostingEstimator","(","nfolds=3",",","distribution=distribution",")",">",">",">","gbm.train","(","x=predictors",",","...","y=response_col",",","...","training_frame=train",",","...","validation_frame=valid",")",">",">",">","mean_per_class_error","=","gbm.mean_per_class_error","(",")","#","<","-","Default",":","return","training","metric",">",">",">","mean_per_class_error",">",">",">","mean_per_class_error1","=","gbm.mean_per_class_error","(","train=True",",","...","valid=True",",","...","xval=True",")",">",">",">","mean_per_class_error1"]
code: def mean_per_class_error(self, train=False, valid=False, xval=False):
      """
      Retrieve the mean per class error across all classes.
  
      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 bool train: If ``True``, return the ``mean_per_class_error`` value for the training data.
      :param bool valid: If ``True``, return the ``mean_per_class_error`` value for the validation data.
      :param bool xval:  If ``True``, return the ``mean_per_class_error`` value for each of the cross-validated splits.
  
      :returns: The ``mean_per_class_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["cylinders"] = cars["cylinders"].asfactor()
      >>> r = cars[0].runif()
      >>> train = cars[r > .2]
      >>> valid = cars[r <= .2]
      >>> response_col = "cylinders"
      >>> predictors = ["displacement","power","weight","acceleration","year"]
      >>> distribution = "multinomial"
      >>> gbm = H2OGradientBoostingEstimator(nfolds=3, distribution=distribution)
      >>> gbm.train(x=predictors,
      ...           y=response_col,
      ...           training_frame=train,
      ...           validation_frame=valid)
      >>> mean_per_class_error = gbm.mean_per_class_error() # <- Default: return training metric
      >>> mean_per_class_error
      >>> mean_per_class_error1 = gbm.mean_per_class_error(train=True,
      ...                                                  valid=True,
      ...                                                  xval=True)
      >>> mean_per_class_error1
      """
      tm = ModelBase._get_metrics(self, train, valid, xval)
      m = {}
      for k, v in zip(list(tm.keys()), list(tm.values())):
          m[k] = None if v is None else v.mean_per_class_error()
      return list(m.values())[0] if len(m) == 1 else m
  
file_path: h2o-3/h2o-py/h2o/model/models/multinomial.py
imports: import h2o
  from h2o.exceptions import H2OValueError
  from h2o.frame import H2OFrame
  from h2o.model import ModelBase
  from h2o.model.extensions import has_extension
  from h2o.utils.compatibility import *
  from h2o.utils.typechecks import assert_is_type
label_desc: Use image node_id 3 for calling the H2OMultinomialModel obj's underlying member method code with example usage: obj.mean_per_class_error(train, valid, xval) and returns: unknown