Tapkee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
keywords.hpp
Go to the documentation of this file.
1 /* This software is distributed under BSD 3-clause license (see LICENSE file).
2  *
3  * Copyright (c) 2012-2013 Sergey Lisitsyn
4  */
5 
6 #ifndef TAPKEE_DEFINES_KEYWORDS_H_
7 #define TAPKEE_DEFINES_KEYWORDS_H_
8 
9 /* Tapkee includes */
10 #include <tapkee/defines/types.hpp>
11 /* End of Tapkee includes */
12 
13 namespace tapkee
14 {
16  namespace keywords
17  {
19  namespace keywords_internal
20  {
27  struct DefaultValue
28  {
30  };
31 
45  template <typename T>
47  {
48  typedef std::string Name;
49 
50  ParameterKeyword(const Name& n, const T& dv) : name(n), default_value(dv) { }
53 
54  Parameter operator=(const T& value) const
55  {
56  return Parameter::create(name,value);
57  }
59  {
61  }
62  operator Name() const
63  {
64  return name;
65  }
66 
69  };
70  }
73 
74  namespace {
82  const ParameterKeyword<DimensionReductionMethod>
83  method("dimension reduction method", PassThru);
84 
110  const ParameterKeyword<EigenMethod>
111  eigen_method("eigendecomposition method", default_eigen_method);
112 
136  const ParameterKeyword<NeighborsMethod>
137  neighbors_method("nearest neighbors method", default_neighbors_method);
138 
161  const ParameterKeyword<IndexType>
162  num_neighbors("number of neighbors", 5);
163 
175  const ParameterKeyword<IndexType>
176  target_dimension("target dimension", 2);
177 
187  const ParameterKeyword<IndexType>
188  diffusion_map_timesteps("diffusion map timesteps", 3);
189 
203  const ParameterKeyword<ScalarType>
204  gaussian_kernel_width("the width of the gaussian kernel", 1.0);
205 
218  const ParameterKeyword<IndexType>
219  max_iteration("maximal iteration", 100);
220 
230  const ParameterKeyword<bool>
231  spe_global_strategy("SPE global strategy", true);
232 
242  const ParameterKeyword<IndexType>
243  spe_num_updates("SPE number of updates", 100);
244 
254  const ParameterKeyword<ScalarType>
255  spe_tolerance("SPE tolerance", 1e-9);
256 
272  const ParameterKeyword<ScalarType>
273  landmark_ratio("ratio of landmark points", 0.5);
274 
293  const ParameterKeyword<ScalarType>
294  nullspace_shift("diagonal shift of nullspace", 1e-9);
295 
307  const ParameterKeyword<ScalarType>
308  klle_shift("KLLE regularizer", 1e-3);
309 
332  const ParameterKeyword<bool>
333  check_connectivity("check connectivity", true);
334 
344  const ParameterKeyword<ScalarType>
345  fa_epsilon("epsilon of FA", 1e-9);
346 
359  const ParameterKeyword<void (*)(double)>
360  progress_function("progress function", NULL);
361 
378  const ParameterKeyword<bool (*)()>
379  cancel_function("cancel function", NULL);
380 
390  const ParameterKeyword<ScalarType> sne_perplexity("SNE perplexity", 30.0);
391 
401  const ParameterKeyword<ScalarType> sne_theta("SNE theta", 0.5);
402 
412  const ParameterKeyword<ScalarType> squishing_rate("squishing rate", 0.99);
413 
417  const DefaultValue by_default;
418  }
419  }
420 }
421 
422 #endif
Parameter operator=(const T &value) const
Definition: keywords.hpp:54
static Parameter create(const std::string &name, const T &value)
Definition: parameters.hpp:60
static EigenMethod default_eigen_method
ParameterKeyword operator=(const ParameterKeyword &pk)
Parameter operator=(const DefaultValue &) const
Definition: keywords.hpp:58
static NeighborsMethod default_neighbors_method