MADlib
1.1 A newer version is available
User Documentation
|
SQL functions for support vector machines. More...
Go to the source code of this file.
Functions | |
float8 | svm_dot (float8[] x, float8[] y) |
Dot product kernel function. More... | |
float8 | svm_polynomial (float8[] x, float8[] y, float8 degree) |
Polynomial kernel function. More... | |
float8 | svm_gaussian (float8[] x, float8[] y, float8 gamma) |
Gaussian kernel function. More... | |
void | svm_drop_model (text model_table) |
Drops all tables pertaining to a model. More... | |
float8 | svm_predict (text model_table, float8[] ind) |
Evaluates a support-vector model on a given data point. More... | |
set< svm_model_pr > | svm_predict_combo (text model_table, float8[] ind) |
Evaluates multiple support-vector models on a data point. More... | |
set< svm_reg_result > | svm_regression (text input_table, text model_table, bool parallel, text kernel_func) |
This is the support vector regression function. More... | |
set< svm_reg_result > | svm_regression (text input_table, text model_table, bool parallel, text kernel_func, bool verbose, float8 eta, float8 nu, float8 slambda) |
This is the support vector regression function. More... | |
set< svm_cls_result > | svm_classification (text input_table, text model_table, bool parallel, text kernel_func) |
This is the support vector classification function. More... | |
set< svm_cls_result > | svm_classification (text input_table, text model_table, bool parallel, text kernel_func, bool verbose, float8 eta, float8 nu) |
This is the support vector classification function. More... | |
set< svm_nd_result > | svm_novelty_detection (text input_table, text model_table, bool parallel, text kernel_func) |
This is the support vector novelty detection function. More... | |
set< svm_nd_result > | svm_novelty_detection (text input_table, text model_table, bool parallel, text kernel_func, bool verbose, float8 eta, float8 nu) |
This is the support vector novelty detection function. More... | |
text | svm_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 support-vector model. More... | |
void | svm_data_normalization (text input_table) |
Normalizes the data stored in a table, and save the normalized data in a new table. 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, bool parallel, bool verbose, float8 eta, float8 reg) |
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... | |
float8 | lsvm_predict (text model_table, float8[] ind) |
Evaluates a linear support-vector model on a given data point. More... | |
set< svm_model_pr > | lsvm_predict_combo (text model_table, float8[] ind) |
Evaluates multiple linear support-vector models on a data point. More... | |
Definition in file online_sv.sql_in.
set<lsvm_sgd_result> lsvm_classification | ( | text | input_table, |
text | model_table, | ||
bool | parallel | ||
) |
input_table | The name of the table/view with the training data |
model_table | The name of the table under which we want to store the learned model |
parallel | A flag indicating whether the system should learn multiple models in parallel |
Definition at line 875 of file online_sv.sql_in.
set<lsvm_sgd_result> lsvm_classification | ( | text | input_table, |
text | model_table, | ||
bool | parallel, | ||
bool | verbose, | ||
float8 | eta, | ||
float8 | reg | ||
) |
input_table | The name of the table/view with the training data |
model_table | The name of the table under which we want to store the learned model |
parallel | A flag indicating whether the system should learn multiple models in parallel |
verbose | Verbosity of reporting |
eta | Initial learning rate in (0,1] |
reg | Regularization parameter, often chosen by cross-validation |
Definition at line 900 of file online_sv.sql_in.
float8 lsvm_predict | ( | text | model_table, |
float8[] | ind | ||
) |
model_table | The table storing the learned model \( f \) to be used |
ind | The data point \( \boldsymbol x \) |
Definition at line 947 of file online_sv.sql_in.
text lsvm_predict_batch | ( | text | input_table, |
text | data_col, | ||
text | id_col, | ||
text | model_table, | ||
text | output_table, | ||
bool | parallel | ||
) |
input_table | Name of table/view containing the data points to be scored |
data_col | Name of column in input_table containing the data points |
id_col | Name of column in input_table containing the integer identifier of data points |
model_table | Name of table where the learned model to be used is stored |
output_table | Name of table to store the results |
parallel | A flag indicating whether the model to be used was learned in parallel |
Definition at line 927 of file online_sv.sql_in.
set<svm_model_pr> lsvm_predict_combo | ( | text | model_table, |
float8[] | ind | ||
) |
model_table | The table storing the learned models to be used. |
ind | The data point \( \boldsymbol x \) |
The different models are assumed to be named model_table0
, model_table1
, ....
Definition at line 968 of file online_sv.sql_in.
set<svm_cls_result> svm_classification | ( | text | input_table, |
text | model_table, | ||
bool | parallel, | ||
text | kernel_func | ||
) |
input_table | The name of the table/view with the training data |
model_table | The name of the table under which we want to store the learned model |
parallel | A flag indicating whether the system should learn multiple models in parallel |
kernel_func | Kernel function |
Definition at line 665 of file online_sv.sql_in.
set<svm_cls_result> svm_classification | ( | text | input_table, |
text | model_table, | ||
bool | parallel, | ||
text | kernel_func, | ||
bool | verbose, | ||
float8 | eta, | ||
float8 | nu | ||
) |
input_table | The name of the table/view with the training data |
model_table | The name of the table under which we want to store the learned model |
parallel | A flag indicating whether the system should learn multiple models in parallel |
kernel_func | Kernel function |
verbose | Verbosity of reporting |
eta | Learning rate in (0,1] |
nu | Compression parameter in (0,1] associated with the fraction of training data that will become support vectors |
Definition at line 692 of file online_sv.sql_in.
void svm_data_normalization | ( | text | input_table) |
input_table | Name of table/view containing the data points to be scored |
Definition at line 855 of file online_sv.sql_in.
float8 svm_dot | ( | float8[] | x, |
float8[] | y | ||
) |
x | The data point \( \boldsymbol x \) |
y | The data point \( \boldsymbol y \) |
Definition at line 428 of file online_sv.sql_in.
void svm_drop_model | ( | text | model_table) |
model_table | The table to be dropped. |
Definition at line 555 of file online_sv.sql_in.
float8 svm_gaussian | ( | float8[] | x, |
float8[] | y, | ||
float8 | gamma | ||
) |
x | The data point \( \boldsymbol x \) |
y | The data point \( \boldsymbol y \) |
gamma | The spread \( \gamma \) |
Definition at line 452 of file online_sv.sql_in.
set<svm_nd_result> svm_novelty_detection | ( | text | input_table, |
text | model_table, | ||
bool | parallel, | ||
text | kernel_func | ||
) |
input_table | The name of the table/view with the training data |
model_table | The name of the table under which we want to store the learned model |
parallel | A flag indicating whether the system should learn multiple models in parallel |
kernel_func | Kernel function |
Definition at line 716 of file online_sv.sql_in.
set<svm_nd_result> svm_novelty_detection | ( | text | input_table, |
text | model_table, | ||
bool | parallel, | ||
text | kernel_func, | ||
bool | verbose, | ||
float8 | eta, | ||
float8 | nu | ||
) |
input_table | The name of the table/view with the training data |
model_table | The name of the table under which we want to store the learned model |
parallel | A flag indicating whether the system should learn multiple models in parallel |
kernel_func | Kernel function |
verbose | Verbosity of reporting |
eta | Learning rate in (0,1] |
nu | Compression parameter in (0,1] associated with the fraction of training data that will become support vectors |
Definition at line 743 of file online_sv.sql_in.
float8 svm_polynomial | ( | float8[] | x, |
float8[] | y, | ||
float8 | degree | ||
) |
x | The data point \( \boldsymbol x \) |
y | The data point \( \boldsymbol y \) |
degree | The degree \( d \) |
Definition at line 440 of file online_sv.sql_in.
float8 svm_predict | ( | text | model_table, |
float8[] | ind | ||
) |
model_table | The table storing the learned model \( f \) to be used |
ind | The data point \( \boldsymbol x \) |
Definition at line 569 of file online_sv.sql_in.
text svm_predict_batch | ( | text | input_table, |
text | data_col, | ||
text | id_col, | ||
text | model_table, | ||
text | output_table, | ||
bool | parallel | ||
) |
input_table | Name of table/view containing the data points to be scored |
data_col | Name of column in input_table containing the data points |
id_col | Name of column in input_table containing the integer identifier of data points |
model_table | Name of table where the learned model to be used is stored |
output_table | Name of table to store the results |
parallel | A flag indicating whether the model to be used was learned in parallel |
Definition at line 770 of file online_sv.sql_in.
set<svm_model_pr> svm_predict_combo | ( | text | model_table, |
float8[] | ind | ||
) |
model_table | The table storing the learned models to be used. |
ind | The data point \( \boldsymbol x \) |
The different models are assumed to be named model_table1
, model_table2
, ....
Definition at line 590 of file online_sv.sql_in.
set<svm_reg_result> svm_regression | ( | text | input_table, |
text | model_table, | ||
bool | parallel, | ||
text | kernel_func | ||
) |
input_table | The name of the table/view with the training data |
model_table | The name of the table under which we want to store the learned model |
parallel | A flag indicating whether the system should learn multiple models in parallel |
kernel_func | Kernel function |
Definition at line 613 of file online_sv.sql_in.
set<svm_reg_result> svm_regression | ( | text | input_table, |
text | model_table, | ||
bool | parallel, | ||
text | kernel_func, | ||
bool | verbose, | ||
float8 | eta, | ||
float8 | nu, | ||
float8 | slambda | ||
) |
input_table | The name of the table/view with the training data |
model_table | The name of the table under which we want to store the learned model |
parallel | A flag indicating whether the system should learn multiple models in parallel |
kernel_func | Kernel function |
verbose | Verbosity of reporting |
eta | Learning rate in (0,1] |
nu | Compression parameter in (0,1] associated with the fraction of training data that will become support vectors |
slambda | Regularisation parameter |
Definition at line 641 of file online_sv.sql_in.