SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TDistributedStochasticNeighborEmbedding.cpp
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) 2013 Vladyslav S. Gorbatiuk
8  * Copyright (C) 2011-2013 Vladyslav S. Gorbatiuk
9  */
10 
12 #include <shogun/lib/tapkee/tapkee_shogun.hpp>
14 
15 using namespace shogun;
16 
19 {
20  // Default values
21  m_perplexity = 30.0;
22  m_theta = 0.5;
23  init();
24 }
25 
26 void CTDistributedStochasticNeighborEmbedding::init()
27 {
28  SG_ADD(&m_perplexity, "perplexity", "perplexity", MS_NOT_AVAILABLE);
29  SG_ADD(&m_theta, "theta", "learning rate", MS_NOT_AVAILABLE);
30 }
31 
33 {
34 }
35 
37 {
38  return "TDistributedStochasticNeighborEmbedding";
39 }
40 
42 {
43 
44  m_theta = theta;
45 }
46 
48 {
49  return m_theta;
50 }
51 
53 {
54  m_perplexity = perplexity;
55 }
56 
58 {
59  return m_perplexity;
60 }
61 
63 {
64  TAPKEE_PARAMETERS_FOR_SHOGUN parameters;
65  parameters.sne_theta = m_theta;
66  parameters.sne_perplexity = m_perplexity;
67  parameters.features = (CDotFeatures*)features;
68 
69  parameters.method = SHOGUN_TDISTRIBUTED_STOCHASTIC_NEIGHBOR_EMBEDDING;
70  parameters.target_dimension = m_target_dim;
71  CDenseFeatures<float64_t>* embedding = tapkee_embed(parameters);
72  return embedding;
73 }
74 
class EmbeddingConverter (part of the Efficient Dimensionality Reduction Toolkit) used to construct e...
Features that support dot products among other operations.
Definition: DotFeatures.h:44
double float64_t
Definition: common.h:50
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The class Features is the base class of all feature objects.
Definition: Features.h:68
#define SG_ADD(...)
Definition: SGObject.h:81

SHOGUN Machine Learning Toolbox - Documentation