コード例 #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);
}