Turi Create  4.0
train_test_split.hpp
1 /* Copyright © 2017 Apple Inc. All rights reserved.
2  *
3  * Use of this source code is governed by a BSD-3-clause license that can
4  * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5  */
6 #ifndef TURI_RECSYS_TRAIN_TEST_SPLIT_H_
7 #define TURI_RECSYS_TRAIN_TEST_SPLIT_H_
8 
9 #include <cstdint>
10 #include <string>
11 #include <core/storage/sframe_data/sframe.hpp>
12 
13 namespace turi { namespace recsys {
14 
15 std::pair<sframe, sframe> make_recsys_train_test_split(
16  sframe data,
17  const std::string& user_column_name,
18  const std::string& item_column_name,
19  size_t max_num_users, double item_test_proportion,
20  size_t random_seed);
21 
22 
23 }}
24 
25 #endif /* TURI_RECSYS_TRAIN_TEST_SPLIT_H_ */