Module Import alias Import alias Import alias ImportFrom alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Assign NameStore BinOpAdd BinOpAdd BinOpPow BinOpSub BinOpAdd BinOpSub SubscriptLoad NameLoad Index Num BinOpMult BinOpDiv Num BinOpMult Num BinOpPow NameLoad Num BinOpPow SubscriptLoad NameLoad Index Num Num BinOpDiv BinOpMult Num SubscriptLoad NameLoad Index Num NameLoad Num Num BinOpMult BinOpMult Num BinOpSub Num BinOpDiv Num BinOpMult Num NameLoad Call NameLoad SubscriptLoad NameLoad Index Num Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Call NameLoad ListLoad SubscriptLoad NameLoad Index Num Num decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad ListLoad ListLoad Num ListLoad Num ListLoad Num ListLoad Num ListLoad Num Assign NameStore Call NameLoad ListComp ListLoad Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Num Expr Call NameLoad NameLoad NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad ListLoad ListLoad Num ListLoad Num ListLoad Num ListLoad Num ListLoad Num Assign NameStore Call NameLoad ListComp ListLoad Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad ListLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad Num Num Expr Call NameLoad NameLoad NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad ListComp ListLoad NameLoad comprehension NameStore Call NameLoad Num Num Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr CompareLt NameLoad Num Expr Call NameLoad NameLoad NameLoad Call NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad ListLoad ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num Assign NameStore Call NameLoad ListComp ListLoad Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Num Expr Call NameLoad NameLoad NameLoad Num Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Expr Call NameLoad NameLoad NameLoad Call NameLoad ListLoad Num Num Num Expr Call NameLoad NameLoad NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr ListLoad Num Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str orelse Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore ListLoad ListLoad Num Assign NameStore ListLoad ListLoad Num With Call AttributeLoad NameLoad attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call NameLoad ListLoad ListLoad Num Num Num ListLoad Num Num Num Assign NameStore Call NameLoad ListLoad ListLoad Num ListLoad Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Num Expr Call NameLoad NameLoad NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call NameLoad ListLoad ListLoad Num Num ListLoad Num Num ListLoad Num Num Assign NameStore Call NameLoad ListLoad ListLoad Num ListLoad Num ListLoad Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Num Expr Call NameLoad NameLoad NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call NameLoad ListLoad ListLoad Num ListLoad Num ListLoad Num ListLoad Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad ListLoad ListLoad Num Expr Call NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Assign NameStore Call NameLoad ListComp ListLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call NameLoad Num Num Num keyword Num Assign NameStore Call NameLoad ListComp ListLoad BinOpAdd NameLoad NameLoad BinOpSub NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad ListLoad ListLoad Num Num Expr Call NameLoad NameLoad NameLoad Call NameLoad ListLoad ListLoad Num Num ListLoad Num Num Num decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A unittest N/A random N/A itertools numpy array linspace sin cos pi openmdao.api KrigingSurrogate openmdao.test.util assert_rel_error six.moves zip branin N/A N/A x N/A N/A N/A y N/A N/A N/A N/A N/A N/A N/A x N/A 1 N/A N/A 5.1 N/A 4.0 N/A pi 2.0 N/A N/A x N/A 0 2.0 N/A N/A 5.0 N/A x N/A 0 pi 6.0 2.0 N/A N/A 10.0 N/A 1.0 N/A 1.0 N/A 8.0 pi N/A cos N/A x N/A 0 10.0 N/A y N/A branin_1d N/A N/A x N/A N/A N/A N/A branin N/A array N/A N/A x N/A 0 2.275 N/A TestKrigingSurrogate N/A N/A unittest TestCase N/A test_1d_training N/A N/A self N/A N/A N/A x N/A array N/A N/A 0.0 N/A 2.0 N/A 3.0 N/A 4.0 N/A 6.0 N/A y N/A array N/A N/A N/A branin_1d case N/A case x N/A surrogate N/A KrigingSurrogate N/A N/A N/A surrogate train x y N/A N/A x0 y0 N/A zip x y N/A N/A N/A mu sigma N/A N/A surrogate predict x0 N/A N/A assert_rel_error self mu y0 1e-09 N/A N/A assert_rel_error self sigma 0 1e-06 N/A test_1d_predictor N/A N/A self N/A N/A N/A x N/A array N/A N/A 0.0 N/A 2.0 N/A 3.0 N/A 4.0 N/A 6.0 N/A y N/A array N/A N/A N/A branin_1d case N/A case x N/A surrogate N/A KrigingSurrogate N/A N/A N/A surrogate train x y N/A new_x N/A array N/A pi N/A N/A mu sigma N/A N/A surrogate predict new_x N/A N/A assert_rel_error self mu 0.397887 0.1 N/A N/A assert_rel_error self sigma 0.0294172 0.01 N/A test_1d_ill_conditioned N/A N/A self N/A N/A N/A x N/A array N/A N/A case N/A case N/A linspace 0.0 1.0 40 N/A y N/A sin x N/A surrogate N/A KrigingSurrogate N/A N/A N/A surrogate train x y N/A new_x N/A array N/A 0.5 N/A N/A mu sigma N/A N/A surrogate predict new_x N/A N/A N/A self assertTrue N/A sigma 1.1e-08 N/A N/A assert_rel_error self mu N/A sin 0.5 1e-06 N/A test_2d N/A N/A self N/A N/A N/A x N/A array N/A N/A -2.0 0.0 N/A -0.5 1.5 N/A 1.0 3.0 N/A 8.5 4.5 N/A -3.5 6.0 N/A 4.0 7.5 N/A -5.0 9.0 N/A 5.5 10.5 N/A 10.0 12.0 N/A 7.0 13.5 N/A 2.5 15.0 N/A y N/A array N/A N/A N/A branin case N/A case x N/A surrogate N/A KrigingSurrogate N/A N/A N/A surrogate train x y N/A N/A x0 y0 N/A zip x y N/A N/A N/A mu sigma N/A N/A surrogate predict x0 N/A N/A assert_rel_error self mu y0 1e-09 N/A N/A assert_rel_error self sigma 0 1e-06 N/A N/A mu sigma N/A N/A surrogate predict N/A 5.0 5.0 N/A N/A assert_rel_error self mu N/A branin N/A 5.0 5.0 0.1 N/A N/A assert_rel_error self sigma 5.79 0.01 N/A test_no_training_data N/A N/A self N/A N/A N/A surrogate N/A KrigingSurrogate N/A N/A N/A N/A N/A surrogate predict N/A 0.0 1.0 N/A N/A N/A RuntimeError N/A err N/A N/A N/A N/A self assertEqual N/A str err KrigingSurrogate has not been trained, so no prediction can be made. N/A N/A N/A N/A self fail RuntimeError Expected N/A test_one_pt N/A N/A self N/A N/A N/A surrogate N/A KrigingSurrogate N/A x N/A N/A 0.0 N/A y N/A N/A 1.0 N/A N/A N/A self assertRaises ValueError cm N/A N/A N/A N/A surrogate train x y N/A N/A N/A self assertEqual N/A str N/A cm exception KrigingSurrogate require at least 2 training points. N/A test_vector_input N/A N/A self N/A N/A N/A surrogate N/A KrigingSurrogate N/A x N/A array N/A N/A 0.0 0.0 0.0 N/A 1.0 1.0 1.0 N/A y N/A array N/A N/A 0.0 N/A 3.0 N/A N/A N/A surrogate train x y N/A N/A x0 y0 N/A zip x y N/A N/A N/A mu sigma N/A N/A surrogate predict x0 N/A N/A assert_rel_error self mu y0 1e-09 N/A N/A assert_rel_error self sigma 0 1e-06 N/A test_vector_output N/A N/A self N/A N/A N/A surrogate N/A KrigingSurrogate N/A y N/A array N/A N/A 0.0 0.0 N/A 1.0 1.0 N/A 2.0 0.0 N/A x N/A array N/A N/A 0.0 N/A 2.0 N/A 4.0 N/A N/A N/A surrogate train x y N/A N/A x0 y0 N/A zip x y N/A N/A N/A mu sigma N/A N/A surrogate predict x0 N/A N/A assert_rel_error self mu y0 1e-09 N/A N/A assert_rel_error self sigma 0 1e-06 N/A test_scalar_derivs N/A N/A self N/A N/A N/A surrogate N/A KrigingSurrogate N/A x N/A array N/A N/A 0.0 N/A 1.0 N/A 2.0 N/A 3.0 N/A y N/A N/A x copy N/A N/A N/A surrogate train x y N/A jac N/A N/A surrogate linearize N/A array N/A N/A 0.0 N/A N/A assert_rel_error self N/A N/A jac N/A 0 N/A 0 1.0 0.001 N/A test_vector_derivs N/A N/A self N/A N/A N/A surrogate N/A KrigingSurrogate N/A x N/A array N/A N/A a b N/A N/A a b N/A N/A itertools product N/A linspace 0 1 10 repeat 2 N/A y N/A array N/A N/A N/A a b N/A a b N/A N/A a b x N/A N/A N/A surrogate train x y N/A jac N/A N/A surrogate linearize N/A array N/A N/A 0.5 0.5 N/A N/A assert_rel_error self jac N/A array N/A N/A 1 1 N/A 1 -1 1e-05 N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main