Tapkee
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) { }
52  ParameterKeyword operator=(const ParameterKeyword& pk);
53 
54  Parameter operator=(const T& value) const
55  {
56  return Parameter::create(name,value);
57  }
59  {
60  return Parameter::create(name,default_value);
61  }
62  operator Name() const
63  {
64  return name;
65  }
66 
67  Name name;
69  };
70  }
73 
74  namespace {
83  method("dimension reduction method", PassThru);
84 
111  eigen_method("eigendecomposition method", default_eigen_method);
112 
137  neighbors_method("nearest neighbors method", default_neighbors_method);
138 
162  num_neighbors("number of neighbors", 5);
163 
176  target_dimension("target dimension", 2);
177 
188  diffusion_map_timesteps("diffusion map timesteps", 3);
189 
204  gaussian_kernel_width("the width of the gaussian kernel", 1.0);
205 
219  max_iteration("maximal iteration", 100);
220 
231  spe_global_strategy("SPE global strategy", true);
232 
243  spe_num_updates("SPE number of updates", 100);
244 
255  spe_tolerance("SPE tolerance", 1e-9);
256 
273  landmark_ratio("ratio of landmark points", 0.5);
274 
294  nullspace_shift("diagonal shift of nullspace", 1e-9);
295 
308  klle_shift("KLLE regularizer", 1e-3);
309 
333  check_connectivity("check connectivity", true);
334 
345  fa_epsilon("epsilon of FA", 1e-9);
346 
360  progress_function("progress function", NULL);
361 
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
static Parameter create(const std::string &name, const T &value)
Definition: parameters.hpp:60
static EigenMethod default_eigen_method
Parameter operator=(const DefaultValue &) const
Definition: keywords.hpp:58
Parameter operator=(const T &value) const
Definition: keywords.hpp:54
static NeighborsMethod default_neighbors_method