From aa75c36976e7502b01d3bd0c9cd800abcf4e3634 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 24 Oct 2016 14:54:11 +0200 Subject: update copyright information --- src/gensvm_gridsearch.c | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) (limited to 'src/gensvm_gridsearch.c') diff --git a/src/gensvm_gridsearch.c b/src/gensvm_gridsearch.c index 0368731..6e48320 100644 --- a/src/gensvm_gridsearch.c +++ b/src/gensvm_gridsearch.c @@ -1,12 +1,31 @@ /** * @file gensvm_gridsearch.c - * @author Gertjan van den Burg - * @date January, 2014 + * @author G.J.J. van den Burg + * @date 2014-01-07 * @brief Functions for finding the optimal parameters for the dataset * * @details * The GenSVM algorithm takes a number of parameters. The functions in * this file are used to find the optimal parameters. + * + * @copyright + Copyright 2016, G.J.J. van den Burg. + + This file is part of GenSVM. + + GenSVM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + GenSVM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GenSVM. If not, see . + */ #include "gensvm_gridsearch.h" @@ -351,7 +370,7 @@ void consistency_repeats(struct GenQueue *q, long repeats, TrainType traintype) } for (r=0; r 1) { std[i] /= ((double) repeats) - 1.0; @@ -360,7 +379,7 @@ void consistency_repeats(struct GenQueue *q, long repeats, TrainType traintype) std[i] = 0.0; } note("(m = %3.3f, s = %3.3f, t = %3.3f)\n", mean[i], std[i], - time[i]); + time[i]); task = get_next_task(nq); i++; } @@ -378,8 +397,8 @@ void consistency_repeats(struct GenQueue *q, long repeats, TrainType traintype) pt = prctile(time, N, p); for (i=0; ifolds; model->n = 0; @@ -497,7 +511,7 @@ void start_training(struct GenQueue *q) train_folds[f] = gensvm_init_data(); test_folds[f] = gensvm_init_data(); gensvm_get_tt_split(task->train_data, train_folds[f], - test_folds[f], cv_idx, f); + test_folds[f], cv_idx, f); } Timer(main_s); @@ -511,9 +525,9 @@ void start_training(struct GenQueue *q) if (test_folds[f]->Z != test_folds[f]->RAW) free(test_folds[f]->Z); gensvm_kernel_preprocess(model, - train_folds[f]); + train_folds[f]); gensvm_kernel_postprocess(model, - train_folds[f], test_folds[f]); + train_folds[f], test_folds[f]); } note(".\n"); } @@ -527,7 +541,7 @@ void start_training(struct GenQueue *q) note("\t%3.3f%% (%3.3fs)\t(best = %3.3f%%)\n", perf, gensvm_elapsed_time(&loop_s, &loop_e), - current_max); + current_max); q->tasks[task->ID]->performance = perf; prevtask = task; @@ -568,7 +582,7 @@ void start_training(struct GenQueue *q) * cross validation */ double gensvm_cross_validation(struct GenModel *model, - struct GenData **train_folds, struct GenData **test_folds, + struct GenData **train_folds, struct GenData **test_folds, int folds, long n_total) { FILE *fid = NULL; -- cgit v1.2.3