Tapkee
keywords.hpp
Go to the documentation of this file.
00001 /* This software is distributed under BSD 3-clause license (see LICENSE file).
00002  *
00003  * Copyright (c) 2012-2013 Sergey Lisitsyn
00004  */
00005 
00006 #ifndef TAPKEE_DEFINES_KEYWORDS_H_
00007 #define TAPKEE_DEFINES_KEYWORDS_H_
00008 
00009 /* Tapkee includes */
00010 #include <tapkee/defines/types.hpp>
00011 /* End of Tapkee includes */
00012 
00013 namespace tapkee
00014 {
00016     namespace keywords
00017     {
00019         namespace keywords_internal
00020         {
00027             struct DefaultValue
00028             {
00029                 DefaultValue() { }
00030             };
00031 
00045             template <typename T> 
00046             struct ParameterKeyword
00047             {
00048                 typedef std::string Name;
00049 
00050                 ParameterKeyword(const Name& n, const T& dv) : name(n), default_value(dv) { }
00051                 ParameterKeyword(const ParameterKeyword& pk);
00052                 ParameterKeyword operator=(const ParameterKeyword& pk); 
00053 
00054                 Parameter operator=(const T& value) const
00055                 {
00056                     return Parameter::create(name,value);
00057                 }
00058                 Parameter operator=(const DefaultValue&) const
00059                 {
00060                     return Parameter::create(name,default_value);
00061                 }
00062                 operator Name() const
00063                 {
00064                     return name;
00065                 }
00066 
00067                 Name name;
00068                 T default_value;
00069             };
00070         }
00071         using keywords_internal::ParameterKeyword;
00072         using keywords_internal::DefaultValue;
00073 
00074         namespace {
00082             const ParameterKeyword<DimensionReductionMethod>
00083                 method("dimension reduction method", PassThru);
00084 
00110             const ParameterKeyword<EigenMethod>
00111                 eigen_method("eigendecomposition method", default_eigen_method);
00112 
00136             const ParameterKeyword<NeighborsMethod> 
00137                 neighbors_method("nearest neighbors method", default_neighbors_method);
00138 
00161             const ParameterKeyword<IndexType>
00162                 num_neighbors("number of neighbors", 5);
00163 
00175             const ParameterKeyword<IndexType> 
00176                 target_dimension("target dimension", 2);
00177 
00187             const ParameterKeyword<IndexType>
00188                 diffusion_map_timesteps("diffusion map timesteps", 3);
00189 
00203             const ParameterKeyword<ScalarType>
00204                 gaussian_kernel_width("the width of the gaussian kernel", 1.0);
00205 
00218             const ParameterKeyword<IndexType>
00219                 max_iteration("maximal iteration", 100);
00220 
00230             const ParameterKeyword<bool>
00231                 spe_global_strategy("SPE global strategy", true);
00232 
00242             const ParameterKeyword<IndexType>
00243                 spe_num_updates("SPE number of updates", 100);
00244 
00254             const ParameterKeyword<ScalarType>
00255                 spe_tolerance("SPE tolerance", 1e-9);
00256 
00272             const ParameterKeyword<ScalarType>
00273                 landmark_ratio("ratio of landmark points", 0.5);
00274 
00293             const ParameterKeyword<ScalarType>
00294                 nullspace_shift("diagonal shift of nullspace", 1e-9);
00295 
00307             const ParameterKeyword<ScalarType>
00308                 klle_shift("KLLE regularizer", 1e-3);
00309 
00332             const ParameterKeyword<bool>
00333                 check_connectivity("check connectivity", true);
00334 
00344             const ParameterKeyword<ScalarType>
00345                 fa_epsilon("epsilon of FA", 1e-9);
00346 
00359             const ParameterKeyword<void (*)(double)>  
00360                 progress_function("progress function", NULL);
00361 
00378             const ParameterKeyword<bool (*)()>
00379                 cancel_function("cancel function", NULL);
00380 
00390             const ParameterKeyword<ScalarType> sne_perplexity("SNE perplexity", 30.0);
00391 
00401             const ParameterKeyword<ScalarType> sne_theta("SNE theta", 0.5);
00402 
00412             const ParameterKeyword<ScalarType> squishing_rate("squishing rate", 0.99);
00413 
00417             const DefaultValue by_default;
00418         }
00419     }
00420 }
00421 
00422 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines