turicreate.random_forest_regression.RandomForestRegression.evaluate

RandomForestRegression.evaluate(dataset, metric='auto', missing_value_action='auto')

Evaluate the model on the given dataset.

Parameters:
dataset : SFrame

Dataset in the same format used for training. The columns names and types of the dataset must be the same as that used in training.

metric : str, optional

Name of the evaluation metric. Possible values are: ‘auto’ : Compute all metrics. ‘rmse’ : Rooted mean squared error. ‘max_error’ : Maximum error.

missing_value_action : str, optional

Action to perform when missing values are encountered. Can be one of:

  • ‘auto’: By default the model will treat missing value as is.
  • ‘impute’: Proceed with evaluation by filling in the missing values with the mean of the training data. Missing values are also imputed if an entire column of data is missing during evaluation.
  • ‘error’: Do not proceed with evaluation and terminate with an error message.
Returns:
out : dict

A dictionary containing the evaluation result.

See also

create, predict

Examples

>>> results = model.evaluate(test_data, 'rmse')