11 py::class_<br::Data::Dataset>(m,
"Dataset")
13 .def(py::init([](
const Ref<const ArrayXXf>& X,
14 const vector<string>& feature_names=vector<string>(),
16 const float validation_size=0.0,
17 const float batch_size=1.0){
18 return br::Data::Dataset(
19 X, feature_names, c, validation_size, batch_size);
22 py::arg(
"feature_names") = vector<string>(),
24 py::arg(
"validation_size") = 0.0,
25 py::arg(
"batch_size") = 1.0
28 .def(py::init([](
const Ref<const ArrayXXf>& X,
29 const Ref<const ArrayXf>& y,
30 const vector<string>& feature_names=vector<string>(),
32 const float validation_size=0.0,
33 const float batch_size=1.0){
34 return br::Data::Dataset(
35 X, y, feature_names, {}, c, validation_size, batch_size);
39 py::arg(
"feature_names") = vector<string>(),
41 py::arg(
"validation_size") = 0.0,
42 py::arg(
"batch_size") = 1.0
48 .def(py::init([](
const Ref<const ArrayXXf>& X,
49 const br::Data::Dataset& ref_dataset,
50 const vector<string>& feature_names,
52 return br::Data::Dataset(X, ref_dataset, feature_names, c);
55 py::arg(
"ref_dataset"),
56 py::arg(
"feature_names"),
60 .def_readwrite(
"y", &br::Data::Dataset::y)
62 .def(
"get_n_samples", &br::Data::Dataset::get_n_samples)
63 .def(
"get_n_features", &br::Data::Dataset::get_n_features)
64 .def(
"print", &br::Data::Dataset::print)
65 .def(
"get_batch", &br::Data::Dataset::get_batch)
66 .def(
"get_training_data", &br::Data::Dataset::get_training_data)
67 .def(
"get_validation_data", &br::Data::Dataset::get_validation_data)
68 .def(
"get_batch_size", &br::Data::Dataset::get_batch_size)
69 .def(
"set_batch_size", &br::Data::Dataset::set_batch_size)
70 .def(
"split", &br::Data::Dataset::split)
71 .def(
"get_X", &br::Data::Dataset::get_X)
74 m.def(
"read_csv", &br::Data::read_csv, py::arg(
"path"), py::arg(
"target"), py::arg(
"sep")=
',');