1.8
User Documentation for MADlib
lsvm.sql_in File Reference

SQL functions for linear support vector machines. More...

Functions

float8[] linear_svm_igd_transition (float8[] state, float8[] ind_var, boolean dep_var, float8[] previous_state, integer dimension, float8 stepsize, float8 reg)
 
float8[] linear_svm_igd_merge (float8[] state1, float8[] state2)
 
float8[] linear_svm_igd_final (float8[] state)
 
aggregate float8[] linear_svm_igd_step_serial (float8[] ind_var, boolean dep_var, float8[] previous_state, integer dimension, float8 stepsize, float8 reg)
 
aggregate float8[] linear_svm_igd_step (float8[] ind_var, boolean dep_var, float8[] previous_state, integer dimension, float8 stepsize, float8 reg)
 
float8 internal_linear_svm_igd_distance (float8[] state1, float8[] state2)
 
linear_svm_result internal_linear_svm_igd_result (float8[] state)
 
set< lsvm_sgd_result > lsvm_classification (text input_table, text model_table, bool parallel, bool verbose, float8 eta, float8 reg, int max_iter)
 This is the linear support vector classification function. More...
 
set< lsvm_sgd_result > lsvm_classification (text input_table, text model_table, bool parallel, bool verbose, float8 eta, float8 reg)
 This is the linear support vector classification function. More...
 
set< lsvm_sgd_result > lsvm_classification (text input_table, text model_table, bool parallel)
 This is the linear support vector classification function. More...
 
set< lsvm_sgd_result > lsvm_classification (text input_table, text model_table)
 This is the linear support vector classification function. More...
 
text lsvm_predict_batch (text input_table, text data_col, text id_col, text model_table, text output_table, bool parallel)
 Scores the data points stored in a table using a learned linear support-vector model. More...
 
text lsvm_predict_batch (text input_table, text data_col, text id_col, text model_table, text output_table)
 Scores the data points stored in a table using a learned linear support-vector model. More...
 
float8 lsvm_predict (float8[] coefficients, float8[] ind_var)
 Evaluates a linear support-vector model on a given data point. More...
 

Detailed Description

See also
For an introduction to Support vector machines (SVMs) and related kernel methods, see the module description Support Vector Machines.

Function Documentation

float8 internal_linear_svm_igd_distance ( float8[]  state1,
float8[]  state2 
)
linear_svm_result internal_linear_svm_igd_result ( float8[]  state)
float8 [] linear_svm_igd_final ( float8[]  state)
float8 [] linear_svm_igd_merge ( float8[]  state1,
float8[]  state2 
)
aggregate float8 [] linear_svm_igd_step ( float8[]  ind_var,
boolean  dep_var,
float8[]  previous_state,
integer  dimension,
float8  stepsize,
float8  reg 
)
aggregate float8 [] linear_svm_igd_step_serial ( float8[]  ind_var,
boolean  dep_var,
float8[]  previous_state,
integer  dimension,
float8  stepsize,
float8  reg 
)
float8 [] linear_svm_igd_transition ( float8[]  state,
float8[]  ind_var,
boolean  dep_var,
float8[]  previous_state,
integer  dimension,
float8  stepsize,
float8  reg 
)
set<lsvm_sgd_result> lsvm_classification ( text  input_table,
text  model_table,
bool  parallel,
bool  verbose,
float8  eta,
float8  reg,
int  max_iter 
)
Parameters
input_tableThe name of the table/view with the training data
model_tableThe name of the table under which we want to store the learned model
parallelA flag indicating whether the system should learn multiple models in parallel (Defult: False)
verboseVerbosity of reporting (Default: False)
etaInitial learning rate in (0,1] (Default: 0.1)
regRegularization parameter, often chosen by cross-validation (Default: 0.001)
max_iterMaximum number of iterations to run learning algorithm (Default: 100)
Returns
A summary of the learning process
set<lsvm_sgd_result> lsvm_classification ( text  input_table,
text  model_table,
bool  parallel,
bool  verbose,
float8  eta,
float8  reg 
)
Parameters
input_tableThe name of the table/view with the training data
model_tableThe name of the table under which we want to store the learned model
parallelA flag indicating whether the system should learn multiple models in parallel (Defult: False)
verboseVerbosity of reporting (Default: False)
etaInitial learning rate in (0,1] (Default: 0.1)
regRegularization parameter, often chosen by cross-validation (Default: 0.001)
Returns
A summary of the learning process
set<lsvm_sgd_result> lsvm_classification ( text  input_table,
text  model_table,
bool  parallel 
)
Parameters
input_tableThe name of the table/view with the training data
model_tableThe name of the table under which we want to store the learned model
parallelA flag indicating whether the system should learn multiple models in parallel (Default: false)
Returns
A summary of the learning process
set<lsvm_sgd_result> lsvm_classification ( text  input_table,
text  model_table 
)
Parameters
input_tableThe name of the table/view with the training data
model_tableThe name of the table under which we want to store the learned model
Returns
A summary of the learning process
float8 lsvm_predict ( float8[]  coefficients,
float8[]  ind_var 
)
Parameters
coefficientsThe learned model coefficients
ind_varThe independent variables of the instance to be predicted
Returns
This function returns 1 or -1
text lsvm_predict_batch ( text  input_table,
text  data_col,
text  id_col,
text  model_table,
text  output_table,
bool  parallel 
)
Parameters
input_tableName of table/view containing the data points to be scored
data_colName of column in input_table containing the data points
id_colName of column in input_table containing the integer identifier of data points
model_tableName of table where the learned model to be used is stored
output_tableName of table to store the results
parallelDeprecated and ignored boolean flag. (Default: NULL)
Returns
Textual summary of the algorithm run
text lsvm_predict_batch ( text  input_table,
text  data_col,
text  id_col,
text  model_table,
text  output_table 
)
Parameters
input_tableName of table/view containing the data points to be scored
data_colName of column in input_table containing the data points
id_colName of column in input_table containing the integer identifier of data points
model_tableName of table where the learned model to be used is stored
output_tableName of table to store the results
Returns
Textual summary of the algorithm run