9 #ifndef META_CLASSIFY_DUAL_PERCEPTRON_H_
10 #define META_CLASSIFY_DUAL_PERCEPTRON_H_
44 const static std::string
id;
58 template <
class Kernel>
70 std::function<double(pdata, pdata)> fun
72 return kernel_fn(a, b);
74 kernel_ = functional::memoize(fun);
91 void train(
const std::vector<doc_id>& docs)
override;
102 class_label
classify(doc_id d_id)
override;
108 void reset()
override;
123 std::unordered_map<class_label, std::unordered_map<doc_id, uint64_t>>
163 const cpptoml::table&, std::shared_ptr<index::forward_index>);