1 #ifndef _theplu_yat_classifier_target_
2 #define _theplu_yat_classifier_target_
29 #include "yat/utility/Exception.h"
42 namespace classifier {
64 Target(
const std::vector<std::string>& labels,
const Target&);
69 Target(std::istream&,
char sep=
'\0')
89 const std::map<std::string,size_t>&
classes(
void)
const;
111 bool binary(
size_t i)
const;
120 const std::vector<std::string>&
labels(
void);
140 size_t size(
void)
const;
145 size_t size(
const std::string& label)
const;
150 size_t size(
size_t cl)
const;
164 size_t operator[](
size_t sample)
const YAT_DEPRECATE;
177 std::vector<char> binary_;
178 std::vector<size_t> classes_;
180 std::map<std::string,size_t> class_map_;
181 std::vector<std::string> labels_;
183 void init(
const std::vector<std::string>&);
192 std::ostream& operator<<(std::ostream&,
const Target& );