6 #ifndef TURI_UNITY_ML_DATA_2_TESTING_UTILS_H_ 7 #define TURI_UNITY_ML_DATA_2_TESTING_UTILS_H_ 9 #include <core/storage/sframe_data/sframe.hpp> 10 #include <toolkits/ml_data_2/ml_data.hpp> 11 #include <toolkits/ml_data_2/ml_data_iterators.hpp> 16 #include <unordered_set> 17 #include <core/storage/sframe_data/testing_utils.hpp> 19 namespace turi {
namespace v2 {
54 size_t n_rows, std::string column_types,
bool create_target_column =
false,
55 const std::map<std::string, flexible_type>& options = std::map<std::string, flexible_type>());
63 std::vector<sframe> side_sframes;
64 std::vector<std::vector<flexible_type> > joined_data;
75 size_t n_main_rows,
const std::string& main,
76 const std::vector<std::pair<size_t, std::string> >& side,
77 bool create_target_column,
78 const std::map<std::string, flexible_type>& options = std::map<std::string, flexible_type>());
93 return (std::unordered_set<flexible_type>(
96 std::unordered_set<flexible_type>(
103 }
else if(v1.
size() == 0) {
104 for(
size_t i = 0; i < v2.
size(); ++i) {
105 if(v2[i] != 0)
return false;
108 }
else if(v2.
size() == 0) {
109 for(
size_t i = 0; i < v1.
size(); ++i) {
110 if(v1[i] != 0)
return false;
129 std::ostream& operator<<(std::ostream& os, const std::vector<turi::v2::ml_data_entry>& v);
std::pair< sframe, ml_data > make_random_sframe_and_ml_data(size_t n_rows, std::string column_types, bool create_target_column=false, bool target_column_categorical=false)
flex_type_enum get_type() const
static bool ml_testing_equals(const flexible_type &v1, const flexible_type &v2)
std::vector< flexible_type > flex_list