diff --git a/tools/python/src/svm_c_trainer.cpp b/tools/python/src/svm_c_trainer.cpp index 19348a4e8..6d9d4ef04 100644 --- a/tools/python/src/svm_c_trainer.cpp +++ b/tools/python/src/svm_c_trainer.cpp @@ -212,6 +212,8 @@ void bind_svm_c_trainer() .add_property("max_iterations", &T::get_max_iterations, &T::set_max_iterations) .add_property("force_last_weight_to_1", &T::forces_last_weight_to_1, &T::force_last_weight_to_1) .add_property("learns_nonnegative_weights", &T::learns_nonnegative_weights, &T::set_learns_nonnegative_weights) + .add_property("has_prior", &T::has_prior) + .def("set_prior", &T::set_prior) .def("be_verbose", &T::be_verbose) .def("be_quiet", &T::be_quiet); @@ -227,6 +229,8 @@ void bind_svm_c_trainer() .add_property("max_iterations", &T::get_max_iterations, &T::set_max_iterations) .add_property("force_last_weight_to_1", &T::forces_last_weight_to_1, &T::force_last_weight_to_1) .add_property("learns_nonnegative_weights", &T::learns_nonnegative_weights, &T::set_learns_nonnegative_weights) + .add_property("has_prior", &T::has_prior) + .def("set_prior", &T::set_prior) .def("be_verbose", &T::be_verbose) .def("be_quiet", &T::be_quiet); diff --git a/tools/python/src/svm_rank_trainer.cpp b/tools/python/src/svm_rank_trainer.cpp index 936dd7b10..bd355012b 100644 --- a/tools/python/src/svm_rank_trainer.cpp +++ b/tools/python/src/svm_rank_trainer.cpp @@ -93,8 +93,10 @@ void add_ranker ( .add_property("max_iterations", &trainer::get_max_iterations, &trainer::set_max_iterations) .add_property("force_last_weight_to_1", &trainer::forces_last_weight_to_1, &trainer::force_last_weight_to_1) .add_property("learns_nonnegative_weights", &trainer::learns_nonnegative_weights, &trainer::set_learns_nonnegative_weights) + .add_property("has_prior", &trainer::has_prior) .def("train", train1) .def("train", train2) + .def("set_prior", &trainer::set_prior) .def("be_verbose", &trainer::be_verbose) .def("be_quiet", &trainer::be_quiet); }