6 #ifndef TURI_GROUPED_TIMESERIES_HPP 7 #define TURI_GROUPED_TIMESERIES_HPP 9 #include <model_server/lib/toolkit_class_macros.hpp> 10 #include <model_server/lib/extensions/model_base.hpp> 11 #include <model_server/extensions/grouped_sframe.hpp> 14 namespace timeseries {
18 class EXPORT gl_grouped_timeseries :
public model_base {
35 void group(
const gl_sframe &sf,
36 std::string index_col_name,
37 const std::vector<std::string> column_names);
52 gl_sframe get_group(
const std::vector<flexible_type> key);
57 size_t num_groups()
const {
58 return m_grouped_sframe.num_groups();
65 gl_sframe group_info()
const {
66 return m_grouped_sframe.group_info();
73 return m_grouped_sframe.groups();
76 void begin_iterator() {
77 m_grouped_sframe.begin_iterator();
80 std::vector<std::pair<flexible_type, gl_sframe>> iterator_get_next(
size_t num);
86 gl_sframe get_sframe()
const {
87 return m_grouped_sframe.get_sframe();
94 std::string get_index_column_name()
const {
95 return m_time_index_name;
101 std::vector<std::string> get_value_col_names()
const {
102 return m_value_col_names;
108 std::vector<std::string> get_key_col_names()
const {
109 return m_key_col_names;
113 grouped_sframe m_grouped_sframe;
114 std::string m_time_index_name;
115 std::vector<std::string> m_key_col_names;
116 std::vector<std::string> m_value_col_names;
122 "index_name", "column_names")
133 gl_grouped_timeseries::get_index_column_name)
134 REGISTER_GETTER("value_col_names", gl_grouped_timeseries::get_value_col_names)
135 REGISTER_GETTER("key_columns", gl_grouped_timeseries::get_key_col_names)
142 #endif // TURI_GROUPED_TIMESERIES_HPP #define BEGIN_CLASS_MEMBER_REGISTRATION(python_facing_classname)
#define REGISTER_CLASS_MEMBER_FUNCTION(function,...)
sframe group(sframe sframe_in, std::string key_column)
#define END_CLASS_MEMBER_REGISTRATION
#define REGISTER_GETTER(propname, function)