SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NeighborhoodPreservingEmbedding.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) 2011-2013 Sergey Lisitsyn
8  * Copyright (C) 2011-2013 Sergey Lisitsyn
9  */
10 
12 #include <shogun/lib/config.h>
13 #ifdef HAVE_EIGEN3
14 #include <shogun/io/SGIO.h>
16 #include <shogun/lib/tapkee/tapkee_shogun.hpp>
17 
18 using namespace shogun;
19 
22 {
23 }
24 
26 {
27 }
28 
30 {
31  return "NeighborhoodPreservingEmbedding";
32 }
33 
35 {
36  CKernel* kernel = new CLinearKernel((CDotFeatures*)features,(CDotFeatures*)features);
37  TAPKEE_PARAMETERS_FOR_SHOGUN parameters;
38  parameters.n_neighbors = m_k;
39  parameters.eigenshift = m_nullspace_shift;
40  parameters.method = SHOGUN_NEIGHBORHOOD_PRESERVING_EMBEDDING;
41  parameters.target_dimension = m_target_dim;
42  parameters.kernel = kernel;
43  parameters.features = (CDotFeatures*)features;
44  CDenseFeatures<float64_t>* embedding = tapkee_embed(parameters);
45  SG_UNREF(kernel);
46  return embedding;
47 }
48 
49 #endif /* HAVE_EIGEN3 */

SHOGUN Machine Learning Toolbox - Documentation