SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LatentFeatures.h
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) 2012 Viktor Gal
8  * Copyright (C) 2012 Viktor Gal
9  */
10 
11 #ifndef __LATENTFEATURES_H__
12 #define __LATENTFEATURES_H__
13 
14 #include <shogun/lib/config.h>
15 
17 #include <shogun/lib/Data.h>
18 
19 namespace shogun
20 {
26  class CLatentFeatures : public CFeatures
27  {
28  public:
31 
36  CLatentFeatures(int32_t num_samples);
37 
38  virtual ~CLatentFeatures();
39 
44  virtual CFeatures* duplicate() const;
45 
50  virtual EFeatureType get_feature_type() const;
51 
56  virtual EFeatureClass get_feature_class() const;
57 
62  virtual int32_t get_num_vectors() const;
63 
68  virtual const char* get_name() const { return "LatentFeatures"; }
69 
74  bool add_sample(CData* example);
75 
81  CData* get_sample(index_t idx);
82 
87  static CLatentFeatures* obtain_from_generic(CFeatures* base_feats);
88  protected:
91 
92  private:
94  void init();
95  };
96 }
97 
98 #endif /* __LATENTFEATURES_H__ */
99 

SHOGUN Machine Learning Toolbox - Documentation