SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 
15 
16 using namespace shogun;
17 
18 namespace shogun
19 {
21 : CConverter()
22 {
23  m_target_dim = 1;
25  m_kernel = new CLinearKernel();
26 
27  init();
28 }
29 
31 {
34 }
35 
37 {
38  return (CSimpleFeatures<float64_t>*)apply(features);
39 }
40 
42 {
43  ASSERT(dim>0);
44  m_target_dim = dim;
45 }
46 
48 {
49  return m_target_dim;
50 }
51 
53 {
55  SG_REF(distance);
56  m_distance = distance;
57 }
58 
60 {
62  return m_distance;
63 }
64 
66 {
68  SG_REF(kernel);
69  m_kernel = kernel;
70 }
71 
73 {
75  return m_kernel;
76 }
77 
79 {
80  this->m_parameters->add(&m_target_dim, "target_dim",
81  "target dimensionality of preprocessor");
82  this->m_parameters->add((CSGObject**)&m_distance, "distance",
83  "distance to be used for embedding");
84  this->m_parameters->add((CSGObject**)&m_kernel, "kernel",
85  "kernel to be used for embedding");
86 }
87 }

SHOGUN Machine Learning Toolbox - Documentation