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')
89 const std::map<std::string,size_t>& classes(
void)
const;
101 size_t nof_classes(
void)
const;
111 bool binary(
size_t i)
const;
120 const std::vector<std::string>& labels(
void);
127 void set_binary(
size_t i,
bool b);
135 void random_shuffle(
void);
140 size_t size(
void)
const;
145 size_t size(
const std::string& label)
const;
150 size_t size(
size_t cl)
const;
156 size_t operator()(
size_t sample)
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& );
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
Class to report errors associated with IO operations.
Definition: Exception.h:109