Cosan  1.0
Data Analytics Library
KFoldTest.cpp File Reference
#include <iostream>
#include <vector>
#include <cosan/selection/kfold.h>

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 8 of file KFoldTest.cpp.

8  {
9 
10  auto a = Cosan::KFold(11).GetSplit();
11 
12  for (auto & each:a){
13  fmt::print("Train Index: ");
14  for (auto& each_test :std::get<0>(each)){
15  std::cout<<each_test;
16  }
17  std::cout<<std::endl;
18  fmt::print("Test Index: ");
19  for (auto& each_test :std::get<1>(each)){
20  std::cout<<each_test;
21  }
22  std::cout<<std::endl;
23 
24  }
25  std::cout<<a.size()<<std::endl;
26 
27 
28  // auto a = Cosan::RandomKFoldParallel(11).GetSplit();
29 
30  // for (auto & each:a){
31  // fmt::print("Train Index: ");
32  // for (auto& each_test :std::get<0>(each)){
33  // std::cout<<each_test;
34  // }
35  // fmt::print("Test Index: ");
36  // for (auto& each_test :std::get<1>(each)){
37  // std::cout<<each_test;
38  // }
39 
40  // std::cout<<std::endl;
41  // }
42  // a = Cosan::RandomKFold(11).GetSplit();
43 
44  // for (auto & each:a){
45  // fmt::print("Train Index: ");
46  // for (auto& each_test :std::get<0>(each)){
47  // std::cout<<each_test;
48  // }
49  // fmt::print("Test Index: ");
50  // for (auto& each_test :std::get<1>(each)){
51  // std::cout<<each_test;
52  // }
53  // std::cout<<std::endl;
54  // }
55  return 0;
56 }
Cosan::KFold
Definition: kfold.h:12
Cosan::KFold::GetSplit
std::vector< std::tuple< std::vector< gsl::index >, std::vector< gsl::index > > > & GetSplit()
Definition: kfold.h:65