SQL functions for elastic net regularization. More...
Functions | |
| void | elastic_net_train (text tbl_source, text tbl_result, text col_dep_var, text col_ind_var, text regress_family, float8 alpha, float8 lambda_value, boolean standardize, text grouping_col, text optimizer, text optimizer_params, text excluded, integer max_iter, float8 tolerance) |
| Interface for elastic net. More... | |
| void | elastic_net_train (text tbl_source, text tbl_result, text col_ind_var, text col_dep_var, text regress_family, float8 alpha, float8 lambda_value, boolean standardization, text grouping_columns, text optimizer, text optimizer_params, text excluded, integer max_iter) |
| void | elastic_net_train (text tbl_source, text tbl_result, text col_ind_var, text col_dep_var, text regress_family, float8 alpha, float8 lambda_value, boolean standardization, text grouping_columns, text optimizer, text optimizer_params, text excluded) |
| void | elastic_net_train (text tbl_source, text tbl_result, text col_ind_var, text col_dep_var, text regress_family, float8 alpha, float8 lambda_value, boolean standardization, text grouping_columns, text optimizer, text optimizer_params) |
| void | elastic_net_train (text tbl_source, text tbl_result, text col_ind_var, text col_dep_var, text regress_family, float8 alpha, float8 lambda_value, boolean standardization, text grouping_columns, text optimizer) |
| void | elastic_net_train (text tbl_source, text tbl_result, text col_ind_var, text col_dep_var, text regress_family, float8 alpha, float8 lambda_value, boolean standardization, text grouping_columns) |
| void | elastic_net_train (text tbl_source, text tbl_result, text col_ind_var, text col_dep_var, text regress_family, float8 alpha, float8 lambda_value, boolean standardization) |
| void | elastic_net_train (text tbl_source, text tbl_result, text col_ind_var, text col_dep_var, text regress_family, float8 alpha, float8 lambda_value) |
| text | elastic_net_train () |
| Help function, to print out the supported families. More... | |
| text | elastic_net_train (text family_or_optimizer) |
| Help function, to print out the supported optimizer for a family or print out the parameter list for an optimizer. More... | |
| void | elastic_net_predict (text tbl_model, text tbl_new_source, text col_id, text tbl_predict) |
| Prediction and put the result in a table can be used together with General-CV. More... | |
| float8 | elastic_net_predict (text regress_family, float8[] coefficients, float8 intercept, float8[] ind_var) |
| Prediction use learned coefficients for a given example. More... | |
| float8 | elastic_net_gaussian_predict (float8[] coefficients, float8 intercept, float8[] ind_var) |
| Prediction for linear models use learned coefficients for a given example. More... | |
| boolean | elastic_net_binomial_predict (float8[] coefficients, float8 intercept, float8[] ind_var) |
| Prediction for logistic models use learned coefficients for a given example. More... | |
| float8 | elastic_net_binomial_prob (float8[] coefficients, float8 intercept, float8[] ind_var) |
| Compute the probability of belonging to the True class for a given observation. More... | |
| float8 | __elastic_net_binomial_loglikelihood (float8[] coefficients, float8 intercept, boolean dep_var, float8[] ind_var) |
| float8 [] | __gaussian_igd_transition (float8[] state, float8[] ind_var, float8 dep_var, float8[] pre_state, float8 lambda, float8 alpha, integer dimension, float8 stepsize, integer total_rows, float8[] xmean, float8 ymean, float8 step_decay) |
| float8 [] | __gaussian_igd_merge (float8[] state1, float8[] state2) |
| float8 [] | __gaussian_igd_final (float8[] state) |
| aggregate float8 [] | __gaussian_igd_step (float8[], float8, float8[], float8, float8, integer, float8, integer, float8[], float8, float8) |
| aggregate float8 [] | __gaussian_igd_step_single_seg (float8[], float8, float8[], float8, float8, integer, float8, integer, float8[], float8, float8) |
| float8 | __gaussian_igd_state_diff (float8[] state1, float8[] state2) |
| __elastic_net_result | __gaussian_igd_result (float8[] in_state, float8[] feature_sq, float8 threshold, float8 tolerance) |
| float8 [] | __gaussian_fista_transition (float8[] state, float8[] ind_var, float8 dep_var, float8[] pre_state, float8 lambda, float8 alpha, integer dimension, integer total_rows, float8 max_stepsize, float8 eta, integer use_active_set, integer is_active, integer random_stepsize) |
| float8 [] | __gaussian_fista_merge (float8[] state1, float8[] state2) |
| float8 [] | __gaussian_fista_final (float8[] state) |
| aggregate float8 [] | __gaussian_fista_step (float8[], float8, float8[], float8, float8, integer, integer, float8, float8, integer, integer, integer) |
| float8 | __gaussian_fista_state_diff (float8[] state1, float8[] state2) |
| __elastic_net_result | __gaussian_fista_result (float8[] in_state) |
| float8 [] | __binomial_igd_transition (float8[] state, float8[] ind_var, boolean dep_var, float8[] pre_state, float8 lambda, float8 alpha, integer dimension, float8 stepsize, integer total_rows, float8[] xmean, float8 ymean, float8 step_decay) |
| float8 [] | __binomial_igd_merge (float8[] state1, float8[] state2) |
| float8 [] | __binomial_igd_final (float8[] state) |
| aggregate float8 [] | __binomial_igd_step (float8[], boolean, float8[], float8, float8, integer, float8, integer, float8[], float8, float8) |
| aggregate float8 [] | __binomial_igd_step_single_seg (float8[], boolean, float8[], float8, float8, integer, float8, integer, float8[], float8, float8) |
| float8 | __binomial_igd_state_diff (float8[] state1, float8[] state2) |
| __elastic_net_result | __binomial_igd_result (float8[] in_state, float8[] feature_sq, float8 threshold, float8 tolerance) |
| float8 [] | __binomial_fista_transition (float8[] state, float8[] ind_var, boolean dep_var, float8[] pre_state, float8 lambda, float8 alpha, integer dimension, integer total_rows, float8 max_stepsize, float8 eta, integer use_active_set, integer is_active, integer random_stepsize) |
| float8 [] | __binomial_fista_merge (float8[] state1, float8[] state2) |
| float8 [] | __binomial_fista_final (float8[] state) |
| aggregate float8 [] | __binomial_fista_step (float8[], boolean, float8[], float8, float8, integer, integer, float8, float8, integer, integer, integer) |
| float8 | __binomial_fista_state_diff (float8[] state1, float8[] state2) |
| __elastic_net_result | __binomial_fista_result (float8[] in_state) |
| float8 [] __binomial_fista_final | ( | float8 [] | state | ) |
| float8 [] __binomial_fista_merge | ( | float8 [] | state1, |
| float8 [] | state2 | ||
| ) |
| __elastic_net_result __binomial_fista_result | ( | float8 [] | in_state | ) |
| float8 __binomial_fista_state_diff | ( | float8 [] | state1, |
| float8 [] | state2 | ||
| ) |
| aggregate float8 [] __binomial_fista_step | ( | float8 | [], |
| boolean | , | ||
| float8 | [], | ||
| float8 | , | ||
| float8 | , | ||
| integer | , | ||
| integer | , | ||
| float8 | , | ||
| float8 | , | ||
| integer | , | ||
| integer | , | ||
| integer | |||
| ) |
| float8 [] __binomial_fista_transition | ( | float8 [] | state, |
| float8 [] | ind_var, | ||
| boolean | dep_var, | ||
| float8 [] | pre_state, | ||
| float8 | lambda, | ||
| float8 | alpha, | ||
| integer | dimension, | ||
| integer | total_rows, | ||
| float8 | max_stepsize, | ||
| float8 | eta, | ||
| integer | use_active_set, | ||
| integer | is_active, | ||
| integer | random_stepsize | ||
| ) |
| float8 [] __binomial_igd_final | ( | float8 [] | state | ) |
| float8 [] __binomial_igd_merge | ( | float8 [] | state1, |
| float8 [] | state2 | ||
| ) |
| __elastic_net_result __binomial_igd_result | ( | float8 [] | in_state, |
| float8 [] | feature_sq, | ||
| float8 | threshold, | ||
| float8 | tolerance | ||
| ) |
| float8 __binomial_igd_state_diff | ( | float8 [] | state1, |
| float8 [] | state2 | ||
| ) |
| aggregate float8 [] __binomial_igd_step | ( | float8 | [], |
| boolean | , | ||
| float8 | [], | ||
| float8 | , | ||
| float8 | , | ||
| integer | , | ||
| float8 | , | ||
| integer | , | ||
| float8 | [], | ||
| float8 | , | ||
| float8 | |||
| ) |
| aggregate float8 [] __binomial_igd_step_single_seg | ( | float8 | [], |
| boolean | , | ||
| float8 | [], | ||
| float8 | , | ||
| float8 | , | ||
| integer | , | ||
| float8 | , | ||
| integer | , | ||
| float8 | [], | ||
| float8 | , | ||
| float8 | |||
| ) |
| float8 [] __binomial_igd_transition | ( | float8 [] | state, |
| float8 [] | ind_var, | ||
| boolean | dep_var, | ||
| float8 [] | pre_state, | ||
| float8 | lambda, | ||
| float8 | alpha, | ||
| integer | dimension, | ||
| float8 | stepsize, | ||
| integer | total_rows, | ||
| float8 [] | xmean, | ||
| float8 | ymean, | ||
| float8 | step_decay | ||
| ) |
| float8 __elastic_net_binomial_loglikelihood | ( | float8 [] | coefficients, |
| float8 | intercept, | ||
| boolean | dep_var, | ||
| float8 [] | ind_var | ||
| ) |
| float8 [] __gaussian_fista_final | ( | float8 [] | state | ) |
| float8 [] __gaussian_fista_merge | ( | float8 [] | state1, |
| float8 [] | state2 | ||
| ) |
| __elastic_net_result __gaussian_fista_result | ( | float8 [] | in_state | ) |
| float8 __gaussian_fista_state_diff | ( | float8 [] | state1, |
| float8 [] | state2 | ||
| ) |
| aggregate float8 [] __gaussian_fista_step | ( | float8 | [], |
| float8 | , | ||
| float8 | [], | ||
| float8 | , | ||
| float8 | , | ||
| integer | , | ||
| integer | , | ||
| float8 | , | ||
| float8 | , | ||
| integer | , | ||
| integer | , | ||
| integer | |||
| ) |
| float8 [] __gaussian_fista_transition | ( | float8 [] | state, |
| float8 [] | ind_var, | ||
| float8 | dep_var, | ||
| float8 [] | pre_state, | ||
| float8 | lambda, | ||
| float8 | alpha, | ||
| integer | dimension, | ||
| integer | total_rows, | ||
| float8 | max_stepsize, | ||
| float8 | eta, | ||
| integer | use_active_set, | ||
| integer | is_active, | ||
| integer | random_stepsize | ||
| ) |
| float8 [] __gaussian_igd_final | ( | float8 [] | state | ) |
| float8 [] __gaussian_igd_merge | ( | float8 [] | state1, |
| float8 [] | state2 | ||
| ) |
| __elastic_net_result __gaussian_igd_result | ( | float8 [] | in_state, |
| float8 [] | feature_sq, | ||
| float8 | threshold, | ||
| float8 | tolerance | ||
| ) |
| float8 __gaussian_igd_state_diff | ( | float8 [] | state1, |
| float8 [] | state2 | ||
| ) |
| aggregate float8 [] __gaussian_igd_step | ( | float8 | [], |
| float8 | , | ||
| float8 | [], | ||
| float8 | , | ||
| float8 | , | ||
| integer | , | ||
| float8 | , | ||
| integer | , | ||
| float8 | [], | ||
| float8 | , | ||
| float8 | |||
| ) |
| aggregate float8 [] __gaussian_igd_step_single_seg | ( | float8 | [], |
| float8 | , | ||
| float8 | [], | ||
| float8 | , | ||
| float8 | , | ||
| integer | , | ||
| float8 | , | ||
| integer | , | ||
| float8 | [], | ||
| float8 | , | ||
| float8 | |||
| ) |
| float8 [] __gaussian_igd_transition | ( | float8 [] | state, |
| float8 [] | ind_var, | ||
| float8 | dep_var, | ||
| float8 [] | pre_state, | ||
| float8 | lambda, | ||
| float8 | alpha, | ||
| integer | dimension, | ||
| float8 | stepsize, | ||
| integer | total_rows, | ||
| float8 [] | xmean, | ||
| float8 | ymean, | ||
| float8 | step_decay | ||
| ) |
| boolean elastic_net_binomial_predict | ( | float8 [] | coefficients, |
| float8 | intercept, | ||
| float8 [] | ind_var | ||
| ) |
| coefficients | Logistic fitting coefficients |
| intercept | Logistic fitting intercept |
| ind_var | Features (independent variables) |
returns a boolean value
| float8 elastic_net_binomial_prob | ( | float8 [] | coefficients, |
| float8 | intercept, | ||
| float8 [] | ind_var | ||
| ) |
| coefficients | Logistic fitting coefficients |
| intercept | Logistic fitting intercept |
| ind_var | Features (independent variables) |
returns a double value, which is the probability of this data point being True class
| float8 elastic_net_gaussian_predict | ( | float8 [] | coefficients, |
| float8 | intercept, | ||
| float8 [] | ind_var | ||
| ) |
| coefficients | Linear fitting coefficients |
| intercept | Linear fitting intercept |
| ind_var | Features (independent variables) |
returns a double value
| void elastic_net_predict | ( | text | tbl_model, |
| text | tbl_new_source, | ||
| text | col_id, | ||
| text | tbl_predict | ||
| ) |
| tbl_model | The result from elastic_net_train |
| tbl_new_source | Data table |
| col_id | Unique ID associated with each row |
| tbl_predict | Prediction result |
| float8 elastic_net_predict | ( | text | regress_family, |
| float8 [] | coefficients, | ||
| float8 | intercept, | ||
| float8 [] | ind_var | ||
| ) |
| regress_family | model family |
| coefficients | The fitting coefficients |
| intercept | The fitting intercept |
| ind_var | Features (independent variables) |
Note: Please use function elastic_net_gaussian_predict() or elastic_net_binomial_predict() instead if you could. This may be deprecated in the future, as users are confused between this function and the table function with the same name.
When regress_family is 'binomial' or 'logistic', this function returns 1 for True and 0 for False
| void elastic_net_train | ( | text | tbl_source, |
| text | tbl_result, | ||
| text | col_dep_var, | ||
| text | col_ind_var, | ||
| text | regress_family, | ||
| float8 | alpha, | ||
| float8 | lambda_value, | ||
| boolean | standardize, | ||
| text | grouping_col, | ||
| text | optimizer, | ||
| text | optimizer_params, | ||
| text | excluded, | ||
| integer | max_iter, | ||
| float8 | tolerance | ||
| ) |
| tbl_source | Name of data source table |
| tbl_result | Name of the table to store the results |
| col_ind_var | Name of independent variable column, independent variable is an array |
| col_dep_var | Name of dependent variable column |
| regress_family | Response type (gaussian or binomial) |
| alpha | The elastic net parameter, [0, 1] |
| lambda_value | The regularization parameter |
| standardize | Whether to normalize the variables (default True) |
| grouping_col | List of columns on which to apply grouping (currently only a placeholder) |
| optimizer | The optimization algorithm, 'fista' or 'igd'. Default is 'fista' |
| optimizer_params | Parameters of the above optimizer, the format is 'arg = value, ...'. Default is NULL |
| excluded | Which columns to exclude? Default is NULL (applicable only if col_ind_var is set as * or a column of array, column names as 'col1, col2, ...' if col_ind_var is '*'; element indices as '1,2,3, ...' if col_ind_var is a column of array) |
| max_iter | Maximum number of iterations to run the algorithm (default value of 1000) |
| tolerance | Iteration stopping criteria. Default is 1e-6 |
| void elastic_net_train | ( | text | tbl_source, |
| text | tbl_result, | ||
| text | col_ind_var, | ||
| text | col_dep_var, | ||
| text | regress_family, | ||
| float8 | alpha, | ||
| float8 | lambda_value, | ||
| boolean | standardization, | ||
| text | grouping_columns, | ||
| text | optimizer, | ||
| text | optimizer_params, | ||
| text | excluded, | ||
| integer | max_iter | ||
| ) |
| void elastic_net_train | ( | text | tbl_source, |
| text | tbl_result, | ||
| text | col_ind_var, | ||
| text | col_dep_var, | ||
| text | regress_family, | ||
| float8 | alpha, | ||
| float8 | lambda_value, | ||
| boolean | standardization, | ||
| text | grouping_columns, | ||
| text | optimizer, | ||
| text | optimizer_params, | ||
| text | excluded | ||
| ) |
| void elastic_net_train | ( | text | tbl_source, |
| text | tbl_result, | ||
| text | col_ind_var, | ||
| text | col_dep_var, | ||
| text | regress_family, | ||
| float8 | alpha, | ||
| float8 | lambda_value, | ||
| boolean | standardization, | ||
| text | grouping_columns, | ||
| text | optimizer, | ||
| text | optimizer_params | ||
| ) |
| void elastic_net_train | ( | text | tbl_source, |
| text | tbl_result, | ||
| text | col_ind_var, | ||
| text | col_dep_var, | ||
| text | regress_family, | ||
| float8 | alpha, | ||
| float8 | lambda_value, | ||
| boolean | standardization, | ||
| text | grouping_columns, | ||
| text | optimizer | ||
| ) |
| void elastic_net_train | ( | text | tbl_source, |
| text | tbl_result, | ||
| text | col_ind_var, | ||
| text | col_dep_var, | ||
| text | regress_family, | ||
| float8 | alpha, | ||
| float8 | lambda_value, | ||
| boolean | standardization, | ||
| text | grouping_columns | ||
| ) |
| void elastic_net_train | ( | text | tbl_source, |
| text | tbl_result, | ||
| text | col_ind_var, | ||
| text | col_dep_var, | ||
| text | regress_family, | ||
| float8 | alpha, | ||
| float8 | lambda_value, | ||
| boolean | standardization | ||
| ) |
| void elastic_net_train | ( | text | tbl_source, |
| text | tbl_result, | ||
| text | col_ind_var, | ||
| text | col_dep_var, | ||
| text | regress_family, | ||
| float8 | alpha, | ||
| float8 | lambda_value | ||
| ) |
| text elastic_net_train | ( | ) |
| text elastic_net_train | ( | text | family_or_optimizer | ) |
| family_or_optimizer | Response type, 'gaussian' or 'binomial', or optimizer type |