mirror of
https://github.com/WallabyLester/RBF-aPID-Controller.git
synced 2026-06-02 04:47:00 +08:00
Added to prediction test.
This commit is contained in:
@@ -30,6 +30,8 @@ class TestRBFNetwork(unittest.TestCase):
|
|||||||
output_after = self.rbf_network.predict(self.x)
|
output_after = self.rbf_network.predict(self.x)
|
||||||
self.assertIsInstance(output_after, float)
|
self.assertIsInstance(output_after, float)
|
||||||
self.assertNotEqual(output_before, output_after)
|
self.assertNotEqual(output_before, output_after)
|
||||||
|
if not abs(target - output_after) < abs(target - output_before):
|
||||||
|
print("Output did not move closer to the target after prediction.")
|
||||||
|
|
||||||
def test_train(self):
|
def test_train(self):
|
||||||
"""Test the training function."""
|
"""Test the training function."""
|
||||||
|
|||||||
Reference in New Issue
Block a user