From f2cf3f6ad50848fb521128a53704f3d30a56914c Mon Sep 17 00:00:00 2001 From: Barry57 <160387047+Barry57@users.noreply.github.com> Date: Sat, 26 Oct 2024 22:09:27 +0800 Subject: [PATCH] Create test_func_ge.py --- pytest/test_func_ge.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 pytest/test_func_ge.py diff --git a/pytest/test_func_ge.py b/pytest/test_func_ge.py new file mode 100644 index 0000000..844d428 --- /dev/null +++ b/pytest/test_func_ge.py @@ -0,0 +1,11 @@ +from GENetLib.sim_data_func import sim_data_func +from GENetLib.func_ge import func_ge + +@pytest.fixture +def func_continuous_data(): + return sim_data_func(n=1500, m=30, ytype='Continuous', seed=123) + +def test_func_ge(func_continuous_data): + func_continuous = func_continuous_data + func_ge_res = func_ge(func_continuous['y'], func_continuous['z'], func_continuous['location'], func_continuous['X'], 'Continuous', 'Bspline', num_hidden_layers=2, nodes_hidden_layer=[100,10], Learning_Rate2=0.035, L2=0.01, Learning_Rate1=0.02, L=0.01, Num_Epochs=50, nbasis1=5, params1=4, Bsplines=5, norder1=4, model=None, split_type=1, ratio=[3, 1, 1], plot_res=True) + assert func_ge_res is not None