Commit 548b35f4 authored by Manuel Günther's avatar Manuel Günther

Finished porting the documentation to bob::extension's documentation classes

parent 93d9b59e
......@@ -36,13 +36,7 @@ namespace bob { namespace learn { namespace linear {
bool WhiteningTrainer::operator!= (const WhiteningTrainer& other) const
{
return !(this->operator==(other));
}
bool WhiteningTrainer::is_similar_to (const WhiteningTrainer& other,
const double r_epsilon, const double a_epsilon) const
{
return true;
return false;
}
void WhiteningTrainer::train(Machine& machine, const blitz::Array<double,2>& ar) const {
......
......@@ -56,11 +56,6 @@ namespace bob { namespace learn { namespace linear {
* @brief Not equal to
*/
bool operator!=(const WhiteningTrainer& other) const;
/**
* @brief Similar to
*/
bool is_similar_to(const WhiteningTrainer& other, const double r_epsilon=1e-5,
const double a_epsilon=1e-8) const;
/**
* @brief Trains the LinearMachine to perform the Whitening
......
......@@ -41,6 +41,7 @@ extern bool init_BobLearnLinearPCA(PyObject* module);
extern bool init_BobLearnLinearLDA(PyObject* module);
extern bool init_BobLearnLinearCGLogReg(PyObject* module);
extern bool init_BobLearnLinearWCCN(PyObject* module);
extern bool init_BobLearnLinearWhitening(PyObject* module);
extern bool init_BobLearnLinearBIC(PyObject* module);
static PyObject* create_module (void) {
......@@ -57,14 +58,12 @@ static PyObject* create_module (void) {
auto m_ = make_safe(m);
/* register the types to python */
Py_INCREF(&PyBobLearnLinearWhiteningTrainer_Type);
if (PyModule_AddObject(m, "WhiteningTrainer", (PyObject *)&PyBobLearnLinearWhiteningTrainer_Type) < 0) return 0;
if (!init_BobLearnLinearMachine(m)) return 0;
if (!init_BobLearnLinearPCA(m)) return 0;
if (!init_BobLearnLinearLDA(m)) return 0;
if (!init_BobLearnLinearCGLogReg(m)) return 0;
if (!init_BobLearnLinearWCCN(m)) return 0;
if (!init_BobLearnLinearWhitening(m)) return 0;
if (!init_BobLearnLinearBIC(m)) return 0;
static void* PyBobLearnLinear_API[PyBobLearnLinear_API_pointers];
......
......@@ -603,11 +603,8 @@ def test_whitening_initialization():
t3 = WhiteningTrainer(t2)
t4 = t3
assert t1 == t2
assert t1.is_similar_to(t2)
assert t1 == t3
assert t1.is_similar_to(t3)
assert t1 == t4
assert t1.is_similar_to(t4)
def test_whitening_train():
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment