aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libMSVMMaj.c3
-rw-r--r--src/trainMSVMMaj.c21
2 files changed, 6 insertions, 18 deletions
diff --git a/src/libMSVMMaj.c b/src/libMSVMMaj.c
index 1976262..04c5035 100644
--- a/src/libMSVMMaj.c
+++ b/src/libMSVMMaj.c
@@ -226,7 +226,7 @@ void main_loop(struct Model *model, struct Data *data)
Lbar = L;
L = get_msvmmaj_loss(model, data, ZV);
- if (it%1 == 0)
+ if (it%500 == 0)
info("iter = %li, L = %15.16f, Lbar = %15.16f, reldiff = %15.16f\n",
it, L, Lbar, (Lbar - L)/L);
it++;
@@ -253,7 +253,6 @@ void main_loop(struct Model *model, struct Data *data)
free(ZAZ);
free(ZAZV);
free(ZAZVT);
-
}
void step_doubling(struct Model *model)
diff --git a/src/trainMSVMMaj.c b/src/trainMSVMMaj.c
index cf31b63..75eeaea 100644
--- a/src/trainMSVMMaj.c
+++ b/src/trainMSVMMaj.c
@@ -12,13 +12,14 @@ void exit_with_help()
printf("This is MSVMMaj, version %1.1f\n\n", VERSION);
printf("Usage: trainMSVMMaj [options] training_data_file [output_file]\n");
printf("Options:\n");
- printf("-p p-value : set the value of p in the lp norm (1.0 <= p <= 2.0)\n");
- printf("-l lambda : set the value of lambda (lambda > 0)\n");
+ printf("-c folds : perform cross validation with given number of folds\n");
printf("-e epsilon : set the value of the stopping criterion\n");
+ printf("-h | -help : print this help.\n");
printf("-k kappa : set the value of kappa used in the Huber hinge\n");
- printf("-r rho : choose the weigth specification (1 = unit, 2 = group)\n");
+ printf("-l lambda : set the value of lambda (lambda > 0)\n");
+ printf("-p p-value : set the value of p in the lp norm (1.0 <= p <= 2.0)\n");
printf("-q : quiet mode (no output)\n");
- printf("-h | -help : print this help.\n");
+ printf("-r rho : choose the weigth specification (1 = unit, 2 = group)\n");
exit(0);
}
@@ -31,9 +32,6 @@ int main(int argc, char **argv)
{
char input_filename[MAX_LINE_LENGTH];
struct Model *model = Malloc(struct Model, 1);
- model->n = 0;
- model->K = 0;
- model->m = 0;
struct Data *data = Malloc(struct Data, 1);
if (argc < MINARGS || check_argv(argc, argv, "-help") || check_argv_eq(argc, argv, "-h") ) {
@@ -110,12 +108,3 @@ void parse_command_line(int argc, char **argv, char *input_filename, struct Mode
strcpy(input_filename, argv[i]);
}
-
-
-
-
-
-
-
-
-