aboutsummaryrefslogtreecommitdiff
path: root/include/gensvm_task.h
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2016-05-16 18:47:09 +0200
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2016-05-16 18:47:09 +0200
commit044dc5a93c33d7aa4c9c98a626890c16446a56fc (patch)
tree23cc17a595d36a35ad9cb50e3ab18c2956b5f65c /include/gensvm_task.h
parentMove includes to header (diff)
downloadgensvm-044dc5a93c33d7aa4c9c98a626890c16446a56fc.tar.gz
gensvm-044dc5a93c33d7aa4c9c98a626890c16446a56fc.zip
major refactor of the code
Diffstat (limited to 'include/gensvm_task.h')
-rw-r--r--include/gensvm_task.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/include/gensvm_task.h b/include/gensvm_task.h
new file mode 100644
index 0000000..98c8f26
--- /dev/null
+++ b/include/gensvm_task.h
@@ -0,0 +1,53 @@
+/**
+ * @file gensvm_task.h
+ * @author Gertjan van den Burg
+ * @date August, 2013
+ * @brief Struct for a single task in the queue
+ *
+ * @details
+ * The grid search for the optimal parameters is done through a queue.
+ * This file contains struct definitions for the tasks in the queue.
+ * Initialization and free functions are also included.
+ *
+ */
+
+#ifndef GENSVM_TASK_H
+#define GENSVM_TASK_H
+
+#include "gensvm_base.h"
+
+/**
+ * @brief A structure for a single task in the queue.
+ *
+ * @param folds number of folds in cross validation
+ * @param ID numeric id of the task in the queue
+ * @param weight_idx parameter for the GenModel
+ * @param p parameter for the GenModel
+ * @param kappa parameter for the GenModel
+ * @param lambda parameter for the GenModel
+ * @param epsilon parameter for the GenModel
+ * @param kerneltype parameter for the GenModel
+ * @param *kernelparam parameters for the GenModel
+ * @param *train_data pointer to the training data
+ * @param *test_data pointer to the test data (if any)
+ * @param performance performance after cross validation
+ */
+struct GenTask {
+ KernelType kerneltype;
+ int weight_idx;
+ long folds;
+ long ID;
+ double p;
+ double kappa;
+ double lambda;
+ double epsilon;
+ double *kernelparam;
+ struct GenData *train_data;
+ struct GenData *test_data;
+ double performance;
+};
+
+struct GenTask *gensvm_init_task();
+void gensvm_free_task(struct GenTask *task);
+
+#endif