This module implements the base model class. All model things inherit from this class.
Bases: object
Get the AIC. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | Retrieve the AIC for this set of metrics |
Get the AUC. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | Retrieve the AUC coefficient for this set of metrics |
Returns a confusion matrix based of H2O’s default prediction threshold for a dataset
Return hidden layer details
Parameters: |
|
---|
Get the Gini. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | Retrieve the Gini coefficient for this set of metrics |
Get the Log Loss. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | Retrieve the log loss coefficient for this set of metrics |
Generate model metrics for this model on test_data.
Parameters: |
|
---|---|
Returns: | An object of class H2OModelMetrics. |
Parameters: |
|
---|---|
Returns: | The MSE for this regression model. |
Retreive the null degress of freedom if this model has the attribute, or None otherwise.
Parameters: |
|
---|---|
Returns: | Return the null dof, or None if it is not present. |
Retreive the null deviance if this model has the attribute, or None otherwise.
Param: | train Get the null deviance for the training set. If both train and valid are False, then train is selected by default. |
---|---|
Param: | valid Get the null deviance for the validation set. If both train and valid are True, then train is selected by default. |
Returns: | Return the null deviance, or None if it is not present. |
Pretty print the coefficents table (includes normalized coefficients) :return: None
Predict on a dataset.
Parameters: | test_data – Data to be predicted on. |
---|---|
Returns: | A new H2OFrame filled with predictions. |
Return the R^2 for this regression model.
The R^2 value is defined to be 1 - MSE/var, where var is computed as sigma*sigma.
Parameters: |
|
---|---|
Returns: | The R^2 for this regression model. |
Retreive the residual degress of freedom if this model has the attribute, or None otherwise.
Parameters: |
|
---|---|
Returns: | Return the residual dof, or None if it is not present. |
Retreive the residual deviance if this model has the attribute, or None otherwise.
Parameters: |
|
---|---|
Returns: | Return the residual deviance, or None if it is not present. |
Binomial Models
Bases: h2o.model.model_base.ModelBase
Class for Binomial models.
Get the F0.5 for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The F0.5 for the given set of thresholds. |
Get the F1 for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The F1 for the given set of thresholds. |
Get the F2 for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The F2 for the given set of thresholds. |
Get the accuracy for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The accuracy for the given set of thresholds. |
Each threshold defines a confusion matrix. For each threshold in the thresholds list, return a 2x2 list. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | A list of 2x2-lists: [, ..., [ [tns,fps], [fns,tps] ], ..., ] |
Get the confusion matrix for the specified metric If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | the confusion matrix for the metric |
Get the error for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The error for the given set of thresholds. |
Get the Fallout (AKA False Positive Rate) for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The Fallout for the given set of thresholds. |
Retrieve the index in this metric’s threshold list at which the given threshold is located. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | Return the index or throw a ValueError if no such index can be found. |
If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | the threshold at which the given metric is maximum. |
Get the False Negative Rates for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The False Negative Rate for the given set of thresholds. |
Get the False Positive Rates for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The False Positive Rate for the given set of thresholds. |
Get the max per class error for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The max per class error for the given set of thresholds. |
Get the mcc for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The mcc for the given set of thresholds. |
Get the metric value for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The metric value. |
Get the miss rate (AKA False Negative Rate) for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The miss rate for the given set of thresholds. |
Get the precision for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The precision for the given set of thresholds. |
Get the Recall (AKA True Positive Rate) for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The Recall for the given set of thresholds. |
Get the sensitivity (AKA True Positive Rate or Recall) for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The Sensitivity for the given set of thresholds. |
Get the specificity (AKA True Negative Rate) for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The specificity for the given set of thresholds. |
Get the True Negative Rate for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The True Negative Rate for the given set of thresholds. |
Get the True Positive Rate for a set of thresholds. If both train and valid are False, return the train. If both train and valid are True, return the valid.
Parameters: |
|
---|---|
Returns: | The True Positive Rate for the given set of thresholds. |
Multinomial Models
Regression Models
Bases: h2o.model.model_base.ModelBase
Class for Regression models.
Clustering Models
Bases: h2o.model.model_base.ModelBase
Get the average between cluster sum of squares.
Parameters: |
|
---|---|
Returns: | The average between cluster sum of squares for either the training or validation dataset. |
Get the average cluster sum of squares.
Parameters: |
|
---|---|
Returns: | The average cluster sum of squares for either the training or validation dataset. |
Get the average within cluster sum of squares.
Parameters: |
|
---|---|
Returns: | The average within cluster sum of squares for either the training or validation dataset. |
Get the centroid statistics for each cluster.
Parameters: |
|
---|---|
Returns: | The centroid statistics on either the training or validation dataset. |
Get the sizes of each cluster.
Parameters: |
|
---|---|
Returns: | the sizes of clusters for either the training or validation dataset. |
Get the within cluster sum of squares for each cluster.
Parameters: |
|
---|---|
Returns: | The within cluster sum of squares for each cluster on either the training or validation dataset. |
AutoEncoder Models
Bases: h2o.model.model_base.ModelBase
Class for AutoEncoder models.