Exemple #1
0
 def test_generalizedsigmoid(self):
     dt = equations.GeneralizedSigmoid()
     assert dt.parameters == {
         'high': 1.0,
         'midpoint': 1.0,
         'sigma': 0.3,
         'low': 0.0
     }
Exemple #2
0
 def test_generalizedsigmoid(self):
     dt = equations.GeneralizedSigmoid()
     self.assertEqual(dt.parameters, {
         'high': 1.0,
         'midpoint': 1.0,
         'sigma': 0.3,
         'low': 0.0
     })
     self.assertEqual(
         dt.ui_equation,
         'low + (high - low) / (1.0 + 2.71**(-1.8137993642342178 * '
         '(var-midpoint)/sigma))')
Exemple #3
0
 def test_generalizedsigmoid(self):
     t = np.linspace(0,2)
     dt = equations.GeneralizedSigmoid()
     assert dt.parameters == {'high': 1.0, 'midpoint': 1.0, 'sigma': 0.3, 'low': 0.0}
     np.testing.assert_allclose( dt.evaluate(t)[10:], dt.evaluate(t[10:]))