virtualdoubleforward1(constblitz::Array<uint16_t,1>&features)const{throwstd::runtime_error("This function is not implemented for the given data type in the current class.");}
virtualdoubleforward1(constblitz::Array<double,1>&features)const{throwstd::runtime_error("This function is not implemented for the given data type in the current class.");}
virtualvoidforward2(constblitz::Array<uint16_t,2>&features,blitz::Array<double,1>predictions)const{throwstd::runtime_error("This function is not implemented for the given data type in the current class.");}
virtualvoidforward2(constblitz::Array<double,2>&features,blitz::Array<double,1>predictions)const{throwstd::runtime_error("This function is not implemented for the given data type in the current class.");}
virtualvoidforward3(constblitz::Array<uint16_t,2>&features,blitz::Array<double,2>predictions)const{throwstd::runtime_error("This function is not implemented for the given data type in the current class.");}
virtualvoidforward3(constblitz::Array<double,2>&features,blitz::Array<double,2>predictions)const{throwstd::runtime_error("This function is not implemented for the given data type in the current class.");}
bob::python::setup_python("Bindings for the xbob.boosting machines.");
class_<WeakMachine,boost::shared_ptr<WeakMachine>,boost::noncopyable>("WeakMachine","Pure virtual base class for weak machines",no_init);
class_<StumpMachine,boost::shared_ptr<StumpMachine>,bases<WeakMachine>>("StumpMachine","A machine comparing features to a threshold.",no_init)
.def(init<double,double,int>((arg("self"),arg("threshold"),arg("polarity"),arg("index")),"Creates a StumpMachine with the given threshold, polarity and the feature index, for which the machine is valid."))
.def(init<bob::io::HDF5File&>((arg("self"),arg("file")),"Creates a new machine from file."))
.def("__call__",&f11,(arg("self"),arg("features")),"Returns the prediction for the given feature vector.")
.def("__call__",&f12,(arg("self"),arg("features"),arg("predictions")),"Computes the predictions for the given feature set (uni-variate only).")
.def("__call__",&f21,(arg("self"),arg("features")),"Returns the prediction for the given feature vector.")
.def("__call__",&f22,(arg("self"),arg("features"),arg("predictions")),"Computes the predictions for the given feature set (uni-variate only).")
.def("load",&StumpMachine::load,"Reads a Machine from file")
.def("save",&StumpMachine::save,"Writes the machine to file")
.def("feature_indices",&StumpMachine::getIndices,"The indices into the feature vector required by this machine.")
.add_property("threshold",&StumpMachine::getThreshold,"The threshold of this machine.")
.add_property("polarity",&StumpMachine::getPolarity,"The polarity for this machine.")
;
class_<LUTMachine,boost::shared_ptr<LUTMachine>,bases<WeakMachine>>("LUTMachine","A machine containing a Look-Up-Table.",no_init)
.def(init<constblitz::Array<double,2>&,constblitz::Array<uint64_t,1>&>((arg("self"),arg("look_up_tables"),arg("indices")),"Creates a LUTMachine with the given look-up-table and the feature indices, for which the LUT is valid."))
.def(init<constblitz::Array<double,2>&,constblitz::Array<int,1>&>((arg("self"),arg("look_up_tables"),arg("indices")),"Creates a LUTMachine with the given look-up-table and the feature indices, for which the LUT is valid."))
.def(init<bob::io::HDF5File&>((arg("self"),arg("file")),"Creates a new machine from file."))
.def("__call__",&LUTMachine::forward1,(arg("self"),arg("features")),"Returns the prediction for the given feature vector.")
.def("__call__",&LUTMachine::forward2,(arg("self"),arg("features"),arg("predictions")),"Computes the predictions for the given feature set (uni-variate).")