diff options
| author | Gertjan van den Burg <burg@ese.eur.nl> | 2013-08-05 19:08:20 +0200 |
|---|---|---|
| committer | Gertjan van den Burg <burg@ese.eur.nl> | 2013-08-05 19:08:20 +0200 |
| commit | 8f2ee4b160ef7a7eaca501a11a302075af57c715 (patch) | |
| tree | 63a477db7b0d7ede7a857ae12497d70be7cb975f /src | |
| parent | initialize matrices in training loop using Calloc (diff) | |
| download | gensvm-8f2ee4b160ef7a7eaca501a11a302075af57c715.tar.gz gensvm-8f2ee4b160ef7a7eaca501a11a302075af57c715.zip | |
less verbosity in progress, alphabetize cmd options, remove init of n, m, K
Diffstat (limited to 'src')
| -rw-r--r-- | src/libMSVMMaj.c | 3 | ||||
| -rw-r--r-- | src/trainMSVMMaj.c | 21 |
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]); } - - - - - - - - - |
