SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
LatentFeatures.h
Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 2012 Viktor Gal
00008  * Copyright (C) 2012 Viktor Gal
00009  */
00010 
00011 #ifndef __LATENTFEATURES_H__
00012 #define __LATENTFEATURES_H__
00013 
00014 #include <shogun/features/Features.h>
00015 #include <shogun/lib/Data.h>
00016 
00017 namespace shogun
00018 {
00024     class CLatentFeatures : public CFeatures
00025     {
00026         public:
00028             CLatentFeatures();
00029 
00034             CLatentFeatures(int32_t num_samples);
00035 
00036             virtual ~CLatentFeatures();
00037 
00042             virtual CFeatures* duplicate() const;
00043 
00048             virtual EFeatureType get_feature_type() const;
00049 
00054             virtual EFeatureClass get_feature_class() const;
00055 
00060             virtual int32_t get_num_vectors() const;
00061 
00066             virtual const char* get_name() const { return "LatentFeatures"; }
00067 
00072             bool add_sample(CData* example);
00073 
00079             CData* get_sample(index_t idx);
00080 
00085             static CLatentFeatures* obtain_from_generic(CFeatures* base_feats);
00086         protected:
00088             CDynamicObjectArray* m_samples;
00089 
00090         private:
00092             void init();
00093     };
00094 }
00095 
00096 #endif /* __LATENTFEATURES_H__ */
00097 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation