Skip to content
Snippets Groups Projects
Commit edf02c7a authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Increase size of feature values for Abs test

Should stablize the test
parent 5da54afd
Branches
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ protected: ...@@ -30,7 +30,7 @@ protected:
{ {
nlopt_wrapper::MAX_PARAM_DEPTH = 2; nlopt_wrapper::MAX_PARAM_DEPTH = 2;
_task_sizes_train = {9000}; _task_sizes_train = {900};
_task_sizes_test = {100}; _task_sizes_test = {100};
node_value_arrs::initialize_values_arr(_task_sizes_train, _task_sizes_test, 1, 2, true); node_value_arrs::initialize_values_arr(_task_sizes_train, _task_sizes_test, 1, 2, true);
...@@ -40,7 +40,7 @@ protected: ...@@ -40,7 +40,7 @@ protected:
std::default_random_engine generator(0); std::default_random_engine generator(0);
nlopt::srand(42); nlopt::srand(42);
std::uniform_real_distribution<double> distribution_feats(-3.0, 3.0); std::uniform_real_distribution<double> distribution_feats(-50.0, 50.0);
std::uniform_real_distribution<double> distribution_params(-2.00, 2.00); std::uniform_real_distribution<double> distribution_params(-2.00, 2.00);
for (int ii = 0; ii < _task_sizes_train[0]; ++ii) for (int ii = 0; ii < _task_sizes_train[0]; ++ii)
...@@ -146,6 +146,8 @@ TEST_F(AbsParamNodeTest, HardCopyTest) ...@@ -146,6 +146,8 @@ TEST_F(AbsParamNodeTest, HardCopyTest)
_node_test = std::make_shared<AbsParamNode>(_phi[1], feat_ind, 1e-50, 1e50, _optimizer); _node_test = std::make_shared<AbsParamNode>(_phi[1], feat_ind, 1e-50, 1e50, _optimizer);
node_ptr copy_test = _node_test->hard_copy(); node_ptr copy_test = _node_test->hard_copy();
std::cout << _node_test->parameters()[0] << '\t' << _node_test->parameters()[1] << '\t' << _node_test->parameters()[2] << '\t' << _node_test->parameters()[3] << std::endl;
std::cout << _alpha << '\t' << _a << std::endl;
EXPECT_EQ(copy_test->rung(), 2); EXPECT_EQ(copy_test->rung(), 2);
...@@ -196,6 +198,8 @@ TEST_F(AbsParamNodeTest, AttributesTest) ...@@ -196,6 +198,8 @@ TEST_F(AbsParamNodeTest, AttributesTest)
_node_test->set_value(); _node_test->set_value();
_node_test->set_test_value(); _node_test->set_test_value();
std::cout << _node_test->parameters()[0] << '\t' << _node_test->parameters()[1] << '\t' << _node_test->parameters()[2] << '\t' << _node_test->parameters()[3] << std::endl;
std::cout << _alpha << '\t' << _a << std::endl;
EXPECT_EQ(_node_test->rung(), 2); EXPECT_EQ(_node_test->rung(), 2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment