6 #ifndef _mean_imputer_INDEXER_H_ 7 #define _mean_imputer_INDEXER_H_ 9 #include <model_server/lib/toolkit_class_macros.hpp> 10 #include <toolkits/feature_engineering/transformer_base.hpp> 11 #include <toolkits/feature_engineering/statistics_tracker.hpp> 12 #include <core/export.hpp> 16 namespace feature_engineering {
18 class EXPORT mean_imputer :
public transformer_base {
20 static constexpr
size_t MEAN_IMPUTER_VERSION = 0;
21 std::map<std::string, std::shared_ptr<statistics_tracker>> means_map;
22 std::map<std::string, flex_type_enum> feature_types;
23 flexible_type feature_columns;
33 virtual inline ~mean_imputer() {}
42 void init_options(
const std::map<std::string, flexible_type>&_options)
override;
47 size_t get_version()
const override;
63 void init_transformer(
const std::map<std::string,
64 flexible_type>& _options)
override;
71 void fit(gl_sframe data)
override;
83 gl_sframe
transform(gl_sframe data)
override;
92 gl_sframe fit_transform(gl_sframe data) {
111 mean_imputer::get_default_options);
113 mean_imputer::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 >())