10 #include <Eigen/Dense>
15 using Eigen::MatrixXf;
16 using Eigen::VectorXf;
18 using Eigen::VectorXi;
21 typedef Eigen::Array<bool,Eigen::Dynamic,1>
ArrayXb;
23 typedef std::map<string, std::pair<vector<ArrayXf>, vector<ArrayXf>>>
LongData;
26 #include "../util/utils.h"
52 Data(MatrixXf& X, VectorXf& y,
LongData& Z,
bool c =
false,
53 vector<bool> protect = vector<bool>());
55 void set_validation(
bool v=
true);
56 void set_protected_groups();
59 void get_batch(
Data &db,
int batch_size)
const;
101 vector<bool> protect = vector<bool>());
103 void init(MatrixXf& X, VectorXf& y,
LongData& Z,
104 bool c=
false, vector<bool> protect = vector<bool>());
106 void setOriginalData(MatrixXf& X, VectorXf& y,
108 vector<bool> protect = vector<bool>());
110 void setOriginalData(
Data *d);
112 void setTrainingData(MatrixXf& X_t, VectorXf& y_t,
115 vector<bool> protect = vector<bool>());
117 void setTrainingData(
Data *d,
bool toDelete =
false);
119 void setValidationData(MatrixXf& X_v, VectorXf& y_v,
122 vector<bool> protect = vector<bool>());
124 void setValidationData(
Data *d);
130 void split_stratified(
float split);
133 void train_test_split(
bool shuffle,
float split);
135 void split_longitudinal(
142 void reorder_longitudinal(vector<ArrayXf> &vec1,
143 const vector<int>& order);
data holding X, y, and Z data
vector< int > protected_groups
map< int, vector< float > > protect_levels
Eigen::Array< bool, Eigen::Dynamic, 1 > ArrayXb
std::map< string, std::pair< vector< ArrayXf >, vector< ArrayXf > > > LongData