SHOGUN  5.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
slep_options.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2012 Sergey Lisitsyn
8  * Copyright (C) 2012 Sergey Lisitsyn
9  */
10 
11 #ifndef SLEP_OPTIONS_H_
12 #define SLEP_OPTIONS_H_
13 
14 
15 #define IGNORE_IN_CLASSLIST
16 
17 #include <shogun/lib/config.h>
18 #ifdef USE_GPL_SHOGUN
19 
20 #include <stdlib.h>
21 #include <shogun/lib/SGMatrix.h>
22 #include <shogun/lib/SGVector.h>
23 
24 namespace shogun
25 {
26 
27 #ifndef DOXYGEN_SHOULD_SKIP_THIS
28 IGNORE_IN_CLASSLIST enum slep_mode
29 {
30  MULTITASK_GROUP,
31  MULTITASK_TREE,
32  FEATURE_GROUP,
33  FEATURE_TREE,
34  PLAIN,
35  FUSED
36 };
37 
38 IGNORE_IN_CLASSLIST enum slep_loss
39 {
40  LOGISTIC,
41  LEAST_SQUARES
42 };
43 
44 IGNORE_IN_CLASSLIST struct slep_result_t
45 {
46  SGMatrix<double> w;
47  SGVector<double> c;
48 
49  slep_result_t(SGMatrix<double> w_, SGVector<double> c_)
50  {
51  w = w_;
52  c = c_;
53  }
54 };
55 
56 IGNORE_IN_CLASSLIST struct slep_options
57 {
58  bool general;
59  int termination;
60  double tolerance;
61  int max_iter;
62  int restart_num;
63  int n_nodes;
64  int n_tasks;
65  int regularization;
66  int n_feature_blocks;
67  int* ind;
68  double rsL2;
69  double* ind_t;
70  double* G;
71  double* gWeight;
72  double q;
73  SGVector<index_t>* tasks_indices;
74  slep_loss loss;
75  slep_mode mode;
76  slep_result_t* last_result;
77 
78  static slep_options default_options()
79  {
80  slep_options opts;
81  opts.general = false;
82  opts.termination = 0;
83  opts.tolerance = 1e-3;
84  opts.max_iter = 1000;
85  opts.restart_num = 100;
86  opts.regularization = 0;
87  opts.q = 2.0;
88  opts.gWeight = NULL;
89  opts.ind = NULL;
90  opts.ind_t = NULL;
91  opts.G = NULL;
92  opts.rsL2 = 0.0;
93  opts.last_result = NULL;
94  opts.tasks_indices = NULL;
95  opts.loss = LOGISTIC;
96  opts.mode = MULTITASK_GROUP;
97  return opts;
98  }
99 };
100 #endif
101 }
102 #endif //USE_GPL_SHOGUN
103 #endif /* ----- #ifndef SLEP_OPTIONS_H_ ----- */
104 
#define IGNORE_IN_CLASSLIST
Definition: slep_options.h:15
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18

SHOGUN Machine Learning Toolbox - Documentation