1 #ifndef _theplu_yat_classifier_target_ 2 #define _theplu_yat_classifier_target_ 29 #include "yat/utility/Exception.h" 42 namespace classifier {
59 explicit Target(
const std::vector<std::string>& labels);
64 Target(
const std::vector<std::string>& labels,
const Target&);
69 Target(std::istream&,
char sep=
'\0');
88 const std::map<std::string,size_t>& classes(
void)
const;
100 size_t nof_classes(
void)
const;
110 bool binary(
size_t i)
const;
119 const std::vector<std::string>& labels(
void);
126 void set_binary(
size_t i,
bool b);
134 void random_shuffle(
void);
139 size_t size(
void)
const;
144 size_t size(
const std::string& label)
const;
149 size_t size(
size_t cl)
const;
155 size_t operator()(
size_t sample)
const;
163 size_t operator[](
size_t sample)
const YAT_DEPRECATE;
176 std::vector<char> binary_;
177 std::vector<size_t> classes_;
179 std::map<std::string,size_t> class_map_;
180 std::vector<std::string> labels_;
182 void init(
const std::vector<std::string>&);
191 std::ostream& operator<<(std::ostream&,
const Target& );
Class for containing sample labels.
Definition: Target.h:47
The Department of Theoretical Physics namespace as we define it.
Class for storing indices of, e.g., a MatrixLookup.
Definition: Index.h:41