6 #ifndef TURI_DIMENSION_REDUCTION_H_ 7 #define TURI_DIMENSION_REDUCTION_H_ 8 #include <model_server/lib/toolkit_class_macros.hpp> 9 #include <toolkits/feature_engineering/transformer_base.hpp> 11 #include <core/export.hpp> 15 namespace feature_engineering {
17 typedef Eigen::MatrixXd dense_matrix;
18 typedef Eigen::Matrix<double, Eigen::Dynamic, 1> dense_vector;
73 static constexpr
size_t RANDOM_PROJECTION_VERSION = 0;
76 std::vector<std::string> feature_columns;
77 std::map<std::string, flex_type_enum> feature_types;
79 size_t original_dimension = 0;
80 std::shared_ptr<dense_matrix> projection_matrix;
92 void init_options(
const std::map<std::string, flexible_type>& user_opts)
override;
97 size_t get_version()
const override;
102 void save_impl(
oarchive& iarc)
const override;
107 void load_version(
iarchive & iarc,
size_t version)
override;
112 void init_transformer(
const std::map<std::string, flexible_type>& user_opts)
override;
#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.
const std::map< std::string, flexible_type > & get_current_options() const
#define END_CLASS_MEMBER_REGISTRATION
void fit(gl_sframe data) override
const variant_type & get_value_from_state(std::string key)
std::vector< std::string > list_fields()
gl_sframe fit_transform(gl_sframe data)
#define REGISTER_NAMED_CLASS_MEMBER_FUNCTION(name, function,...)
std::map< std::string, flexible_type > get_default_options() const
gl_sframe transform(gl_sframe data) override
The serialization output archive object which, provided with a reference to an ostream, will write to the ostream, providing serialization capabilities.
void init_transformer(const std::map< std::string, flexible_type > &user_opts) override
void transform(S &&input, T &&output, TransformFn transformfn, std::set< size_t > constraint_segments=std::set< size_t >())