38 from_model->
kappa = 1.0;
45 mu_assert(to_model->
p == 2.0,
"to_model->p incorrect.");
50 "to_model->weight_idx incorrect.");
68 from_model->
kappa = 1.0;
71 from_model->
gamma = 1.0;
72 from_model->
coef = 2.0;
77 mu_assert(to_model->
p == 2.0,
"to->p incorrect.");
101 from_model->
kappa = 1.0;
104 from_model->
gamma = 1.0;
105 from_model->
coef = 2.0;
110 mu_assert(to_model->
p == 2.0,
"to_model->p incorrect.");
115 "to_model->weight_idx incorrect.");
135 from_model->
kappa = 1.0;
138 from_model->
gamma = 5.0;
142 mu_assert(to_model->
p == 2.0,
"to_model->p incorrect.");
147 "to_model->weight_idx incorrect.");
165 from_model->
kappa = 1.0;
168 from_model->
gamma = 5.0;
172 mu_assert(to_model->
p == 2.0,
"to_model->p incorrect.");
177 "to_model->weight_idx incorrect.");
195 from_model->
kappa = 1.0;
198 from_model->
gamma = 5.0;
199 from_model->
coef = 10.0;
203 mu_assert(to_model->
p == 2.0,
"to_model->p incorrect.");
208 "to_model->weight_idx incorrect.");
210 "to->kerneltype incorrect");
228 from_model->
kappa = 1.0;
231 from_model->
gamma = 5.0;
232 from_model->
coef = 10.0;
236 mu_assert(to_model->
p == 2.0,
"to_model->p incorrect.");
241 "to_model->weight_idx incorrect.");
243 "to->kerneltype incorrect");
Minimal unit testing framework for C.
double epsilon
stopping criterion for the IM algorithm.
double p
parameter for the L-p norm in the loss function
#define mu_assert(test, message)
char * test_copy_model_sigmoid_1()
void gensvm_free_model(struct GenModel *model)
Free allocated GenModel struct.
int weight_idx
which weights to use (1 = unit, 2 = group)
char * test_copy_model_rbf_2()
#define mu_run_test(test)
struct GenModel * gensvm_init_model(void)
Initialize a GenModel structure.
A structure to represent a single GenSVM model.
char * test_copy_model_poly_1()
long max_iter
maximum number of iterations of the algorithm
void gensvm_copy_model(struct GenModel *from, struct GenModel *to)
Copy model parameters between two GenModel structs.
double kappa
parameter for the Huber hinge function
char * test_copy_model_sigmoid_2()
double degree
kernel parameter for poly
double coef
kernel parameter for poly and sigmoid
Header file for gensvm_copy.c.
KernelType kerneltype
type of kernel used in the model
double gamma
kernel parameter for RBF, poly, and sigmoid
char * test_copy_model_poly_2()
char * test_copy_model_linear()
char * test_copy_model_rbf_1()
double lambda
regularization parameter in the loss function