@@ -440,15 +440,13 @@ def test_d_shearflow2():
440440 assert(len(model.bestExpressions) == 1)
441441 assert(sr.expr_eq(sympy.expand(model.bestExpressions[0][0]), sympy.expand(sympy.simplify(sympy.sympify("(cos(y)**2+0.1*sin(y)**2)*sin(x)")))))
442442"""
443- """
444- #This test need some work to find the right expression
445443
446444def test_d_vdp1 ():
447445 label , x , y = file_data ("https://raw.githubusercontent.com/lacava/ode-strogatz/master/d_vdp1.txt" )
448446
449447 #import matplotlib.pyplot as plt
450448 #plt.scatter(list(range(0, len(label))), label)
451- #plt.scatter(list(range(0, len(label))), 10*(y-(1/3*(x**3-y ))))
449+ #plt.scatter(list(range(0, len(label))), 10*(y-(1/3*(x**3-x ))))
452450 #plt.show()
453451
454452 global loss , plot_y
@@ -462,16 +460,15 @@ def test_d_vdp1():
462460 binary_operators = {"*" : (operator .mul , operator .mul ),
463461 "+" : (operator .add , operator .add )},
464462 operator_depth = {"*" : 2 , "+" : 2 },
465- discrete_param_values = [0, -10/3, 40/3],
466463 #callback = callback,
467464 #monothread = True,
468465 foundBreak = True )
469466
470467 model .fit ([x , y ], label , ["x" , "y" ])
471468
472469 assert (len (model .bestExpressions ) == 1 )
473- assert(sr.expr_eq(sympy.expand(model.bestExpressions[0][0]), sympy.expand(sympy.simplify(sympy.sympify("10*(y-(1/3*(x**3-y )))")))))
474- """
470+ assert (sr .expr_eq (sympy .expand (model .bestExpressions [0 ][0 ]), sympy .expand (sympy .simplify (sympy .sympify ("10*(y-(1/3*(x**3-x )))" )))))
471+
475472def test_d_vdp2 ():
476473 label , x , y = file_data ("https://raw.githubusercontent.com/lacava/ode-strogatz/master/d_vdp2.txt" )
477474
0 commit comments