6 #ifndef TURI_UNITY_TOOLKITS_TRANSFORM_TO_FLAT_DICT_HPP 7 #define TURI_UNITY_TOOLKITS_TRANSFORM_TO_FLAT_DICT_HPP 10 #include <model_server/lib/toolkit_class_macros.hpp> 11 #include <toolkits/feature_engineering/dict_transform_utils.hpp> 12 #include <core/export.hpp> 13 #include <toolkits/feature_engineering/transformer_base.hpp> 17 namespace feature_engineering {
19 class EXPORT transform_to_flat_dictionary :
public transformer_base {
21 static constexpr
size_t TRANSFORM_TO_FLAT_DICTIONARY_VERSION = 0;
22 std::map<std::string, flex_type_enum> feature_types;
23 std::vector<std::string> feature_columns;
24 flexible_type unprocessed_features;
35 virtual inline ~transform_to_flat_dictionary() {}
44 void init_options(
const std::map<std::string, flexible_type>&_options)
override;
49 size_t get_version()
const override;
65 void init_transformer(
const std::map<std::string,
66 flexible_type>& _options)
override;
73 void fit(gl_sframe data)
override;
85 gl_sframe
transform(gl_sframe data)
override;
94 gl_sframe fit_transform(gl_sframe data) {
110 transform_to_flat_dictionary::get_default_options);
112 transform_to_flat_dictionary::get_value_from_state,
#define BEGIN_CLASS_MEMBER_REGISTRATION(python_facing_classname)
#define REGISTER_CLASS_MEMBER_FUNCTION(function,...)
The serialization input archive object which, provided with a reference to an istream, will read from the istream, providing deserialization capabilities.
#define END_CLASS_MEMBER_REGISTRATION
#define REGISTER_NAMED_CLASS_MEMBER_FUNCTION(name, function,...)
The serialization output archive object which, provided with a reference to an ostream, will write to the ostream, providing serialization capabilities.
void transform(S &&input, T &&output, TransformFn transformfn, std::set< size_t > constraint_segments=std::set< size_t >())