Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
bind_evaluator.h
Go to the documentation of this file.
1#include "module.h"
4
5namespace py = pybind11;
6namespace br = Brush;
7namespace nl = nlohmann;
8
9using stream_redirect = py::call_guard<py::scoped_ostream_redirect, py::scoped_estream_redirect>;
10
11template <br::ProgramType T>
12void bind_evaluator(py::module& m, string name)
13{
14 using Class = br::Eval::Evaluation<T>;
15 // TODO: will this part of c++ be exposed?
16 py::class_<Class> eval(m, name.data() );
17 eval.def(py::init<>())
18 .def("assign_fit", &Class::assign_fit)
19 .def_property("scorer", &Class::get_scorer, &Class::set_scorer)
20 ;
21}
void bind_engine(py::module &m, string name)
py::call_guard< py::scoped_ostream_redirect, py::scoped_estream_redirect > stream_redirect
void bind_evaluator(py::module &m, string name)
< nsga2 selection operator for getting the front
Definition data.cpp:12