17 #ifndef JUBATUS_CORE_FV_CONVERTER_NUM_FEATURE_IMPL_HPP_
18 #define JUBATUS_CORE_FV_CONVERTER_NUM_FEATURE_IMPL_HPP_
25 #include "../common/type.hpp"
30 namespace fv_converter {
37 ret_fv.push_back(std::make_pair(key, static_cast<float>(value)));
47 ss << key <<
"$" << value;
48 ret_fv.push_back(std::make_pair(ss.str(),
static_cast<float>(1.0)));
57 ret_fv.push_back(std::make_pair(
59 static_cast<float>(std::log(std::max(1.0, value)))));
67 #endif // JUBATUS_CORE_FV_CONVERTER_NUM_FEATURE_IMPL_HPP_
void add_feature(const std::string &key, double value, common::sfv_t &ret_fv) const
void add_feature(const std::string &key, double value, common::sfv_t &ret_fv) const
std::vector< std::pair< std::string, float > > sfv_t
void add_feature(const std::string &key, double value, common::sfv_t &ret_fv) const