54 mu_assert(model->
p == 1.3,
"Incorrect model p");
84 mu_assert(model->
p == 1.3,
"Incorrect model p");
116 mu_assert(model->
p == 1.3,
"Incorrect model p");
149 mu_assert(model->
p == 1.3,
"Incorrect model p");
188 mu_assert(copy->
p == 1.3,
"Incorrect copy p");
233 mu_assert(copy->
p == 1.3,
"Incorrect copy p");
280 mu_assert(copy->
p == 1.3,
"Incorrect copy p");
328 mu_assert(copy->
p == 1.3,
"Incorrect copy p");
Minimal unit testing framework for C.
long folds
number of folds in cross validation
double coef
coef parameter for the GenModel
char * test_task_to_model_sigmoid()
double epsilon
stopping criterion for the IM algorithm.
char * test_task_to_model_poly()
long ID
numeric id of the task in the queue
double p
parameter for the L-p norm in the loss function
#define mu_assert(test, message)
char * test_copy_task_poly()
struct GenTask * gensvm_init_task(void)
Initialize a GenTask structure.
void gensvm_free_model(struct GenModel *model)
Free allocated GenModel struct.
char * test_copy_task_sigmoid()
double performance
performance after cross validation
int weight_idx
which weights to use (1 = unit, 2 = group)
#define mu_run_test(test)
struct GenModel * gensvm_init_model(void)
Initialize a GenModel structure.
double gamma
gamma parameter for the GenModel
char * test_copy_task_linear()
KernelType kerneltype
kerneltype parameter for the GenModel
A structure to represent the data.
struct GenData * test_data
pointer to the test data (if any)
A structure to represent a single GenSVM model.
long max_iter
maximum number of iterations of the algorithm
double degree
degree parameter for the GenModel
double lambda
lambda parameter for the GenModel
void gensvm_free_data(struct GenData *data)
Free allocated GenData struct.
A structure for a single task in the queue.
char * test_copy_task_rbf()
char * test_task_to_model_linear()
void gensvm_free_task(struct GenTask *t)
Free the GenTask struct.
double kappa
parameter for the Huber hinge function
char * test_task_to_model_rbf()
long max_iter
maximum number of iterations of the algorithm
double degree
kernel parameter for poly
double kappa
kappa parameter for the GenModel
struct GenTask * gensvm_copy_task(struct GenTask *t)
Deepcopy a GenTask struct.
double coef
kernel parameter for poly and sigmoid
KernelType kerneltype
type of kernel used in the model
Header file for gensvm_task.c.
double gamma
kernel parameter for RBF, poly, and sigmoid
struct GenData * gensvm_init_data(void)
Initialize a GenData structure.
double epsilon
epsilon parameter for the GenModel
double p
p parameter for the GenModel
double lambda
regularization parameter in the loss function
char * test_init_free_task()
struct GenData * train_data
pointer to the training data
void gensvm_task_to_model(struct GenTask *task, struct GenModel *model)
Copy parameters from GenTask to GenModel.
int weight_idx
weight_idx parameter for the GenModel