Пример #1
0
def random_forest(x,y,validation_x=None,validation_y=None,**kwargs):
  """
  Build a Random Forest Model (kwargs are the same arguments that you can find in FLOW)

  :return: A new classifier or regression model.
  """
  return h2o_model_builder.supervised_model_build(x,y,validation_x,validation_y,"drf",kwargs)
Пример #2
0
def gbm(x,y,validation_x=None,validation_y=None,**kwargs):
  """
  Build a Gradient Boosted Method model (kwargs are the same arguments that you can find in FLOW)

  :return: A new classifier or regression model.
  """
  return h2o_model_builder.supervised_model_build(x,y,validation_x,validation_y,"gbm",kwargs)
Пример #3
0
def random_forest(x, y, validation_x=None, validation_y=None, **kwargs):
    """
  Build a Random Forest Model (kwargs are the same arguments that you can find in FLOW)
  """
    return h2o_model_builder.supervised_model_build(x, y, validation_x,
                                                    validation_y, "drf",
                                                    kwargs)
Пример #4
0
def deeplearning(x,y=None,validation_x=None,validation_y=None,**kwargs):
  """
  Build a supervised Deep Learning model (kwargs are the same arguments that you can find in FLOW)

  :return: Return a new classifier or regression model.
  """
  return h2o_model_builder.supervised_model_build(x,y,validation_x,validation_y,"deeplearning",kwargs)
Пример #5
0
def gbm(x, y, validation_x=None, validation_y=None, **kwargs):
    """
  Build a Gradient Boosted Method model (kwargs are the same arguments that you can find in FLOW)
  """
    return h2o_model_builder.supervised_model_build(x, y, validation_x,
                                                    validation_y, "gbm",
                                                    kwargs)
Пример #6
0
def deeplearning(x, y, validation_x=None, validation_y=None, **kwargs):
    """
  Build a supervised Deep Learning model (kwargs are the same arguments that you can find in FLOW)
  """
    return h2o_model_builder.supervised_model_build(x, y, validation_x,
                                                    validation_y,
                                                    "deeplearning", kwargs)
Пример #7
0
def deeplearning(x,y=None,validation_x=None,validation_y=None,**kwargs):
  """
  Build a supervised Deep Learning model (kwargs are the same arguments that you can find in FLOW)

  :return: Return a new classifier or regression model.
  """
  return h2o_model_builder.supervised_model_build(x,y,validation_x,validation_y,"deeplearning",kwargs)
Пример #8
0
def glm(x,y,validation_x=None,validation_y=None,**kwargs):
  """
  Build a Generalized Linear Model (kwargs are the same arguments that you can find in FLOW)

  :return: A new regression or binomial classifier.
  """
  kwargs = dict([(k, kwargs[k]) if k != "Lambda" else ("lambda", kwargs[k]) for k in kwargs])
  return h2o_model_builder.supervised_model_build(x,y,validation_x,validation_y,"glm",kwargs)
Пример #9
0
def glm(x,y,validation_x=None,validation_y=None,**kwargs):
  """
  Build a Generalized Linear Model (kwargs are the same arguments that you can find in FLOW)

  :return: A new regression or binomial classifier.
  """
  kwargs = dict([(k, kwargs[k]) if k != "Lambda" else ("lambda", kwargs[k]) for k in kwargs])
  return h2o_model_builder.supervised_model_build(x,y,validation_x,validation_y,"glm",kwargs)
Пример #10
0
def naive_bayes(x,y,validation_x=None,validation_y=None,**kwargs):
  """
  The naive Bayes classifier assumes independence between predictor variables conditional on the response, and a
  Gaussian distribution of numeric predictors with mean and standard deviation computed from the training dataset.
  When building a naive Bayes classifier, every row in the training dataset that contains at least one NA will be
  skipped completely. If the test dataset has missing values, then those predictors are omitted in the probability
  calculation during prediction.

  :param laplace: A positive number controlling Laplace smoothing. The default zero disables smoothing.
  :param threshold: The minimum standard deviation to use for observations without enough data. Must be at least 1e-10.
  :param eps: A threshold cutoff to deal with numeric instability, must be positive.
  :param compute_metrics: A logical value indicating whether model metrics should be computed. Set to FALSE to reduce
  the runtime of the algorithm.
  :return: Returns an H2OBinomialModel if the response has two categorical levels, H2OMultinomialModel otherwise.
  """
  return h2o_model_builder.supervised_model_build(x,y,validation_x,validation_y,"naivebayes",kwargs)
Пример #11
0
def naive_bayes(x,y,validation_x=None,validation_y=None,**kwargs):
  """
  The naive Bayes classifier assumes independence between predictor variables conditional on the response, and a
  Gaussian distribution of numeric predictors with mean and standard deviation computed from the training dataset.
  When building a naive Bayes classifier, every row in the training dataset that contains at least one NA will be
  skipped completely. If the test dataset has missing values, then those predictors are omitted in the probability
  calculation during prediction.

  :param laplace: A positive number controlling Laplace smoothing. The default zero disables smoothing.
  :param threshold: The minimum standard deviation to use for observations without enough data. Must be at least 1e-10.
  :param eps: A threshold cutoff to deal with numeric instability, must be positive.
  :param compute_metrics: A logical value indicating whether model metrics should be computed. Set to FALSE to reduce
  the runtime of the algorithm.
  :return: Returns an H2OBinomialModel if the response has two categorical levels, H2OMultinomialModel otherwise.
  """
  return h2o_model_builder.supervised_model_build(x,y,validation_x,validation_y,"naivebayes",kwargs)
Пример #12
0
def deeplearning(x,y,validation_x=None,validation_y=None,**kwargs):
  """
  Build a supervised Deep Learning model (kwargs are the same arguments that you can find in FLOW)
  """
  return h2o_model_builder.supervised_model_build(x,y,validation_x,validation_y,"deeplearning",kwargs)