2.1.0
User Documentation for Apache MADlib
pred_metrics.sql_in File Reference

A collection of summary statistics to gauge model accuracy based on predicted values vs. ground-truth values. More...

Functions

void mean_abs_error (text table_in, text table_out, text prediction_col, text observed_col, text grouping_cols)
 Mean Absolute Error. More...
 
void mean_abs_error (text table_in, text table_out, text prediction_col, text observed_col)
 
text mean_abs_error (text message)
 
text mean_abs_error ()
 
void mean_abs_perc_error (text table_in, text table_out, text prediction_col, text observed_col, text grouping_cols)
 Mean Absolute Percentage Error. More...
 
void mean_abs_perc_error (text table_in, text table_out, text prediction_col, text observed_col)
 
text mean_abs_perc_error (text message)
 
text mean_abs_perc_error ()
 
void mean_perc_error (text table_in, text table_out, text prediction_col, text observed_col, text grouping_cols)
 Mean Percentage Error. More...
 
void mean_perc_error (text table_in, text table_out, text prediction_col, text observed_col)
 
text mean_perc_error (text message)
 
text mean_perc_error ()
 
void mean_squared_error (text table_in, text table_out, text prediction_col, text observed_col, text grouping_cols)
 Mean Squared Error. More...
 
void mean_squared_error (text table_in, text table_out, text prediction_col, text observed_col)
 
text mean_squared_error (text message)
 
text mean_squared_error ()
 
void r2_score (text table_in, text table_out, text prediction_col, text observed_col, text grouping_cols)
 R2 Score. More...
 
void r2_score (text table_in, text table_out, text prediction_col, text observed_col)
 
text r2_score (text message)
 
text r2_score ()
 
void adjusted_r2_score (text table_in, text table_out, text prediction_col, text observed_col, integer num_predictors, integer training_size, text grouping_cols)
 Adjusted R2 Score. More...
 
void adjusted_r2_score (text table_in, text table_out, text prediction_col, text observed_col, integer num_predictors, integer training_size)
 
text adjusted_r2_score (text message)
 
text adjusted_r2_score ()
 
void binary_classifier (text table_in, text table_out, text prediction_col, text observed_col, text grouping_cols)
 Binary Classifier. More...
 
void binary_classifier (text table_in, text table_out, text prediction_col, text observed_col)
 
text binary_classifier (text message)
 
text binary_classifier ()
 
void area_under_roc (text table_in, text table_out, text prediction_col, text observed_col, text grouping_cols)
 Area under ROC Curve. More...
 
void area_under_roc (text table_in, text table_out, text prediction_col, text observed_col)
 
text area_under_roc (text message)
 
text area_under_roc ()
 
void confusion_matrix (text table_in, text table_out, text prediction_col, text observed_col)
 Confusion Matrix. More...
 
text confusion_matrix (text message)
 
text confusion_matrix ()
 

Detailed Description

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Date
April 2016

Function Documentation

◆ adjusted_r2_score() [1/4]

void adjusted_r2_score ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col,
integer  num_predictors,
integer  training_size,
text  grouping_cols 
)
Parameters
table_inName of the input table.
table_outName of the output table.
prediction_colName of the column of predicted values from input table.
observed_colName of the column of observed values from input table.
num_predictorsThe number of parameters in the predicting model, not counting the constant term.
training_sizeThe number of rows used for training, excluding any NULL rows.
grouping_colsName of the column of grouping values from input table.

◆ adjusted_r2_score() [2/4]

void adjusted_r2_score ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col,
integer  num_predictors,
integer  training_size 
)

◆ adjusted_r2_score() [3/4]

text adjusted_r2_score ( text  message)

◆ adjusted_r2_score() [4/4]

text adjusted_r2_score ( )

◆ area_under_roc() [1/4]

void area_under_roc ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col,
text  grouping_cols 
)
Parameters
table_inName of the input table.
table_outName of the output table.
prediction_colName of the column of predicted values from input table.
observed_colName of the column of observed values from input table.
grouping_colsName of the column of grouping values from input table.

◆ area_under_roc() [2/4]

void area_under_roc ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col 
)

◆ area_under_roc() [3/4]

text area_under_roc ( text  message)

◆ area_under_roc() [4/4]

text area_under_roc ( )

◆ binary_classifier() [1/4]

void binary_classifier ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col,
text  grouping_cols 
)
Parameters
table_inName of the input table.
table_outName of the output table.
prediction_colName of the column of predicted values from input table.
observed_colName of the column of observed values from input table.
grouping_colsName of the column of grouping values from input table.

◆ binary_classifier() [2/4]

void binary_classifier ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col 
)

◆ binary_classifier() [3/4]

text binary_classifier ( text  message)

◆ binary_classifier() [4/4]

text binary_classifier ( )

◆ confusion_matrix() [1/3]

void confusion_matrix ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col 
)
Parameters
table_inName of the input table.
table_outName of the output table.
prediction_colName of the column of predicted values from input table.
observed_colName of the column of observed values from input table.
grouping_colsName of the column of grouping values from input table.

◆ confusion_matrix() [2/3]

text confusion_matrix ( text  message)

◆ confusion_matrix() [3/3]

text confusion_matrix ( )

◆ mean_abs_error() [1/4]

void mean_abs_error ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col,
text  grouping_cols 
)
Parameters
table_inName of the input table.
table_outName of the output table.
prediction_colName of the column of predicted values from input table.
observed_colName of the column of observed values from input table.
grouping_colsName of the column of grouping values from input table.

◆ mean_abs_error() [2/4]

void mean_abs_error ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col 
)

◆ mean_abs_error() [3/4]

text mean_abs_error ( text  message)

◆ mean_abs_error() [4/4]

text mean_abs_error ( )

◆ mean_abs_perc_error() [1/4]

void mean_abs_perc_error ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col,
text  grouping_cols 
)
Parameters
table_inName of the input table.
table_outName of the output table.
prediction_colName of the column of predicted values from input table.
observed_colName of the column of observed values from input table.
grouping_colsName of the column of grouping values from input table.

◆ mean_abs_perc_error() [2/4]

void mean_abs_perc_error ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col 
)

◆ mean_abs_perc_error() [3/4]

text mean_abs_perc_error ( text  message)

◆ mean_abs_perc_error() [4/4]

text mean_abs_perc_error ( )

◆ mean_perc_error() [1/4]

void mean_perc_error ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col,
text  grouping_cols 
)
Parameters
table_inName of the input table.
table_outName of the output table.
prediction_colName of the column of predicted values from input table.
observed_colName of the column of observed values from input table.
grouping_colsName of the column of grouping values from input table.

◆ mean_perc_error() [2/4]

void mean_perc_error ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col 
)

◆ mean_perc_error() [3/4]

text mean_perc_error ( text  message)

◆ mean_perc_error() [4/4]

text mean_perc_error ( )

◆ mean_squared_error() [1/4]

void mean_squared_error ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col,
text  grouping_cols 
)
Parameters
table_inName of the input table.
table_outName of the output table.
prediction_colName of the column of predicted values from input table.
observed_colName of the column of observed values from input table.
grouping_colsName of the column of grouping values from input table.

◆ mean_squared_error() [2/4]

void mean_squared_error ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col 
)

◆ mean_squared_error() [3/4]

text mean_squared_error ( text  message)

◆ mean_squared_error() [4/4]

text mean_squared_error ( )

◆ r2_score() [1/4]

void r2_score ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col,
text  grouping_cols 
)
Parameters
table_inName of the input table.
table_outName of the output table.
prediction_colName of the column of predicted values from input table.
observed_colName of the column of observed values from input table.
grouping_colsName of the column of grouping values from input table.

◆ r2_score() [2/4]

void r2_score ( text  table_in,
text  table_out,
text  prediction_col,
text  observed_col 
)

◆ r2_score() [3/4]

text r2_score ( text  message)

◆ r2_score() [4/4]

text r2_score ( )