Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
limbo
Commits
5c768708
Commit
5c768708
authored
Jun 21, 2018
by
Konstantinos Chatzilygeroudis
Browse files
Fix gp tests for new sigma
parent
ee62dd35
Changes
1
Show whitespace changes
Inline
Side-by-side
src/tests/test_gp.cpp
View file @
5c768708
...
...
@@ -474,7 +474,7 @@ BOOST_AUTO_TEST_CASE(test_gp_dim)
BOOST_CHECK
(
std
::
abs
((
mu
(
0
)
-
5
))
<
1
);
BOOST_CHECK
(
std
::
abs
((
mu
(
1
)
-
5
))
<
1
);
BOOST_CHECK
(
sigma
<=
Params
::
kernel
::
noise
()
+
1e-8
);
BOOST_CHECK
(
sigma
<=
2.
*
(
Params
::
kernel
::
noise
()
+
1e-8
)
)
;
}
BOOST_AUTO_TEST_CASE
(
test_gp
)
...
...
@@ -496,15 +496,15 @@ BOOST_AUTO_TEST_CASE(test_gp)
double
sigma
;
std
::
tie
(
mu
,
sigma
)
=
gp
.
query
(
make_v1
(
1
));
BOOST_CHECK
(
std
::
abs
((
mu
(
0
)
-
5
))
<
1
);
BOOST_CHECK
(
sigma
<=
Params
::
kernel
::
noise
()
+
1e-8
);
BOOST_CHECK
(
sigma
<=
2.
*
(
Params
::
kernel
::
noise
()
+
1e-8
)
)
;
std
::
tie
(
mu
,
sigma
)
=
gp
.
query
(
make_v1
(
2
));
BOOST_CHECK
(
std
::
abs
((
mu
(
0
)
-
10
))
<
1
);
BOOST_CHECK
(
sigma
<=
Params
::
kernel
::
noise
()
+
1e-8
);
BOOST_CHECK
(
sigma
<=
2.
*
(
Params
::
kernel
::
noise
()
+
1e-8
)
)
;
std
::
tie
(
mu
,
sigma
)
=
gp
.
query
(
make_v1
(
3
));
BOOST_CHECK
(
std
::
abs
((
mu
(
0
)
-
5
))
<
1
);
BOOST_CHECK
(
sigma
<=
Params
::
kernel
::
noise
()
+
1e-8
);
BOOST_CHECK
(
sigma
<=
2.
*
(
Params
::
kernel
::
noise
()
+
1e-8
)
)
;
for
(
double
x
=
0
;
x
<
4
;
x
+=
0.05
)
{
Eigen
::
VectorXd
mu
;
...
...
@@ -690,15 +690,15 @@ BOOST_AUTO_TEST_CASE(test_gp_auto)
double
sigma
;
std
::
tie
(
mu
,
sigma
)
=
gp
.
query
(
make_v1
(
1
));
BOOST_CHECK
(
std
::
abs
((
mu
(
0
)
-
5
))
<
1
);
BOOST_CHECK
(
sigma
<=
gp
.
kernel_function
().
noise
()
+
1e-8
);
BOOST_CHECK
(
sigma
<=
2.
*
(
gp
.
kernel_function
().
noise
()
+
1e-8
)
)
;
std
::
tie
(
mu
,
sigma
)
=
gp
.
query
(
make_v1
(
2
));
BOOST_CHECK
(
std
::
abs
((
mu
(
0
)
-
10
))
<
1
);
BOOST_CHECK
(
sigma
<=
gp
.
kernel_function
().
noise
()
+
1e-8
);
BOOST_CHECK
(
sigma
<=
2.
*
(
gp
.
kernel_function
().
noise
()
+
1e-8
)
)
;
std
::
tie
(
mu
,
sigma
)
=
gp
.
query
(
make_v1
(
3
));
BOOST_CHECK
(
std
::
abs
((
mu
(
0
)
-
5
))
<
1
);
BOOST_CHECK
(
sigma
<=
gp
.
kernel_function
().
noise
()
+
1e-8
);
BOOST_CHECK
(
sigma
<=
2.
*
(
gp
.
kernel_function
().
noise
()
+
1e-8
)
)
;
}
BOOST_AUTO_TEST_CASE
(
test_gp_init_variance
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment