Пример #1
0
void QuasiNewtonMethodTest::test_set_reserve_all_training_history(void)
{
   message += "test_set_reserve_all_training_history\n";

   QuasiNewtonMethod qnm;
   qnm.set_reserve_all_training_history(true);
}
Пример #2
0
void TestQuasiNewtonMethod::test_resize_training_history(void)
{
    message += "test_resize_training_history\n";

    QuasiNewtonMethod qnm;
    qnm.resize_training_history(1);

}
Пример #3
0
void TestQuasiNewtonMethod::test_load(void)
{
    message += "test_load\n";

    QuasiNewtonMethod qnm;
    qnm.save("../Data/QuasiNewtonMethod.dat");
    qnm.load("../Data/QuasiNewtonMethod.dat");
}
Пример #4
0
void QuasiNewtonMethodTest::test_set_inverse_Hessian_approximation_method(void)
{
   message += "test_set_training_direction_method\n";

   QuasiNewtonMethod qnm;

   qnm.set_inverse_Hessian_approximation_method(QuasiNewtonMethod::BFGS);
   assert_true(qnm.get_inverse_Hessian_approximation_method() == QuasiNewtonMethod::BFGS, LOG);
}
Пример #5
0
void QuasiNewtonMethodTest::test_load(void)
{
   message += "test_load\n";

   QuasiNewtonMethod qnm;

   tinyxml2::XMLDocument* document = qnm.to_XML();
   qnm.from_XML(*document);

   delete document;
}
Пример #6
0
void QuasiNewtonMethodTest::test_to_XML(void)   
{
   message += "test_to_XML\n";

   QuasiNewtonMethod qnm;

   tinyxml2::XMLDocument* document = qnm.to_XML();
   assert_true(document != NULL, LOG);

   delete document;
}
Пример #7
0
void TestQuasiNewtonMethod::test_get_inverse_Hessian_approximation_method(void)
{
    message += "test_get_inverse_Hessian_approximation_method\n";

    QuasiNewtonMethod qnm;

    qnm.set_inverse_Hessian_approximation_method(QuasiNewtonMethod::DFP);
    assert_true(qnm.get_inverse_Hessian_approximation_method() == QuasiNewtonMethod::DFP, LOG);

    qnm.set_inverse_Hessian_approximation_method(QuasiNewtonMethod::BFGS);
    assert_true(qnm.get_inverse_Hessian_approximation_method() == QuasiNewtonMethod::BFGS, LOG);
}