Commit d0211fdf authored by Antoine Cully's avatar Antoine Cully
Browse files

Halfs turns into Halves

parent 4476b810
......@@ -80,7 +80,7 @@ int main()
{
srand(time(NULL));
typedef kernel::MaternFiveHalfs<Params> Kernel_t;
typedef kernel::MaternFiveHalves<Params> Kernel_t;
typedef opt::Chained<Params, opt::NLOptNoGrad<DirectParams, nlopt::GN_DIRECT_L>, opt::NLOptNoGrad<BobyqaParams, nlopt::LN_BOBYQA>> AcquiOpt_t;
typedef boost::fusion::vector<stop::MaxIterations<Params>> Stop_t;
// typedef mean_functions::MeanFunctionARD<Params, mean_functions::MeanData<Params>> Mean_t;
......
......@@ -67,7 +67,7 @@ struct fit_eval {
int main()
{
typedef kernel::MaternFiveHalfs<Params> Kernel_t;
typedef kernel::MaternFiveHalves<Params> Kernel_t;
typedef mean::Data<Params> Mean_t;
typedef model::GP<Params, Kernel_t, Mean_t> GP_t;
typedef acqui::UCB<Params, GP_t> Acqui_t;
......
......@@ -74,7 +74,7 @@ struct SecondElem {
int main()
{
typedef kernel::MaternFiveHalfs<Params> Kernel_t;
typedef kernel::MaternFiveHalves<Params> Kernel_t;
typedef mean::Data<Params> Mean_t;
typedef model::GP<Params, Kernel_t, Mean_t> GP_t;
typedef acqui::GP_UCB<Params, GP_t> Acqui_t;
......
......@@ -122,7 +122,7 @@ namespace limbo {
For Statistics, the default value is: ``boost::fusion::vector<stat::Samples<Params>, stat::AggregatedObservations<Params>, stat::ConsoleSummary<Params>>``
Example of customization:
- ``typedef kernel::MaternFiveHalfs<Params> Kernel_t;``
- ``typedef kernel::MaternFiveHalves<Params> Kernel_t;``
- ``typedef mean::Data<Params> Mean_t;``
- ``typedef model::GP<Params, Kernel_t, Mean_t> GP_t;``
- ``typedef acqui::UCB<Params, GP_t> Acqui_t;``
......
......@@ -38,8 +38,8 @@ namespace limbo {
\endrst
*/
template <typename Params>
struct MaternFiveHalfs {
MaternFiveHalfs(size_t dim = 1) {}
struct MaternFiveHalves {
MaternFiveHalves(size_t dim = 1) {}
double operator()(const Eigen::VectorXd& v1, const Eigen::VectorXd& v2) const
{
......
......@@ -37,8 +37,8 @@ namespace limbo {
\endrst
*/
template <typename Params>
struct MaternThreeHalfs {
MaternThreeHalfs(size_t dim = 1) {}
struct MaternThreeHalves {
MaternThreeHalves(size_t dim = 1) {}
double operator()(const Eigen::VectorXd& v1, const Eigen::VectorXd& v2) const
{
......
......@@ -6,11 +6,11 @@ import os
def create(bld):
kernels = ['Exp', 'MaternThreeHalfs', 'MaternFiveHalfs', 'SquaredExpARD']
kernels = ['Exp', 'MaternThreeHalves', 'MaternFiveHalves', 'SquaredExpARD']
kernel_incompatibility = {}
kernel_incompatibility['Exp'] = ['KernelLFOpt', 'KernelMeanLFOpt', 'MeanLFOpt']
kernel_incompatibility['MaternThreeHalfs'] = ['KernelLFOpt', 'KernelMeanLFOpt', 'MeanLFOpt']
kernel_incompatibility['MaternFiveHalfs'] = ['KernelLFOpt', 'KernelMeanLFOpt', 'MeanLFOpt']
kernel_incompatibility['MaternThreeHalves'] = ['KernelLFOpt', 'KernelMeanLFOpt', 'MeanLFOpt']
kernel_incompatibility['MaternFiveHalves'] = ['KernelLFOpt', 'KernelMeanLFOpt', 'MeanLFOpt']
means = ['NullFunction', 'Constant', 'Data', 'FunctionARD']
mean_additional_params = {}
......
......@@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE(test_gp_dim)
{
using namespace limbo;
typedef kernel::MaternFiveHalfs<Params> KF_t;
typedef kernel::MaternFiveHalves<Params> KF_t;
typedef mean::Constant<Params> Mean_t;
typedef model::GP<Params, KF_t, Mean_t> GP_t;
......@@ -82,7 +82,7 @@ BOOST_AUTO_TEST_CASE(test_gp)
{
using namespace limbo;
typedef kernel::MaternFiveHalfs<Params> KF_t;
typedef kernel::MaternFiveHalves<Params> KF_t;
typedef mean::Constant<Params> Mean_t;
typedef model::GP<Params, KF_t, Mean_t> GP_t;
......@@ -124,7 +124,7 @@ BOOST_AUTO_TEST_CASE(test_gp_bw_inversion)
size_t N = 1000;
size_t failures = 0;
typedef kernel::MaternFiveHalfs<Params> KF_t;
typedef kernel::MaternFiveHalves<Params> KF_t;
typedef mean::Constant<Params> Mean_t;
typedef model::GP<Params, KF_t, Mean_t> GP_t;
......@@ -219,7 +219,7 @@ BOOST_AUTO_TEST_CASE(test_gp_blacklist)
{
using namespace limbo;
typedef kernel::MaternFiveHalfs<Params> KF_t;
typedef kernel::MaternFiveHalves<Params> KF_t;
typedef mean::Constant<Params> Mean_t;
typedef model::GP<Params, KF_t, Mean_t> GP_t;
......@@ -300,8 +300,8 @@ BOOST_AUTO_TEST_CASE(test_gp_init_variance)
};
};
// MaternThreeHalfs
typedef model::GP<Params, kernel::MaternThreeHalfs<Parameters>, mean::Constant<Params>> GP1_t;
// MaternThreeHalves
typedef model::GP<Params, kernel::MaternThreeHalves<Parameters>, mean::Constant<Params>> GP1_t;
GP1_t gp1(1, 1);
......@@ -309,8 +309,8 @@ BOOST_AUTO_TEST_CASE(test_gp_init_variance)
BOOST_CHECK_CLOSE(sigma, 10.0, 1e-5);
// MaternFiveHalfs
typedef model::GP<Params, kernel::MaternFiveHalfs<Parameters>, mean::Constant<Params>> GP2_t;
// MaternFiveHalves
typedef model::GP<Params, kernel::MaternFiveHalves<Parameters>, mean::Constant<Params>> GP2_t;
GP2_t gp2(1, 1);
......
Supports Markdown
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