SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EmbeddingConverter.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 Sergey Lisitsyn
8  * Copyright (C) 2011 Sergey Lisitsyn
9  */
10 
14 
15 using namespace shogun;
16 
17 namespace shogun
18 {
20 : CConverter()
21 {
22  m_target_dim = 1;
24  m_kernel = new CLinearKernel();
25 
26  init();
27 }
28 
30 {
33 }
34 
36 {
37  return (CDenseFeatures<float64_t>*)apply(features);
38 }
39 
41 {
42  ASSERT(dim>0)
43  m_target_dim = dim;
44 }
45 
47 {
48  return m_target_dim;
49 }
50 
52 {
53  SG_REF(distance);
56 }
57 
59 {
61  return m_distance;
62 }
63 
65 {
66  SG_REF(kernel);
68  m_kernel = kernel;
69 }
70 
72 {
74  return m_kernel;
75 }
76 
78 {
79  SG_ADD(&m_target_dim, "target_dim",
80  "target dimensionality of preprocessor", MS_AVAILABLE);
81  SG_ADD((CSGObject**)&m_distance, "distance",
82  "distance to be used for embedding", MS_AVAILABLE);
83  SG_ADD((CSGObject**)&m_kernel, "kernel", "kernel to be used for embedding",
84  MS_AVAILABLE);
85 }
86 }

SHOGUN Machine Learning Toolbox - Documentation