6 #ifndef TURI_ML2DATA_SFRAME_TRANSLATION_H_ 7 #define TURI_ML2DATA_SFRAME_TRANSLATION_H_ 11 #include <core/storage/sframe_data/sframe.hpp> 12 #include <toolkits/ml_data_2/metadata.hpp> 13 #include <toolkits/ml_data_2/indexing/column_indexer.hpp> 21 namespace turi {
namespace v2 {
56 std::shared_ptr<sarray<flexible_type> > map_to_indexed_sarray(
57 const std::shared_ptr<ml_data_internal::column_indexer>& indexer,
58 const std::shared_ptr<sarray<flexible_type> >& src,
59 bool allow_new_categorical_values =
true);
94 sframe map_to_indexed_sframe(
95 const std::vector<std::shared_ptr<ml_data_internal::column_indexer> >& indexer,
97 bool allow_new_categorical_values =
true);
134 sframe map_to_indexed_sframe(
135 const std::shared_ptr<ml_metadata>& metadata,
137 bool allow_new_categorical_values =
true);
148 std::shared_ptr<sarray<flexible_type> > map_from_indexed_sarray(
149 const std::shared_ptr<ml_data_internal::column_indexer>& indexer,
150 const std::shared_ptr<sarray<flexible_type> >& indexed_x);
162 sframe map_from_indexed_sframe(
163 const std::vector<std::shared_ptr<ml_data_internal::column_indexer> >& indexer,
175 sframe map_from_indexed_sframe(
176 const std::shared_ptr<ml_metadata>& metadata, sframe indexed_x);
187 sframe map_from_custom_indexed_sframe(
188 const std::map<std::string, std::shared_ptr<ml_data_internal::column_indexer> >& indexer,