You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TODO (?): right now there is a small chance that corner data are wrongly predicted (that is fine for now).
fromparameterizedimportparameterized_classfrompsyke.utilsimportget_default_precisionfrompsykeimportloggerfromtest.psykeimportinitializeimportunittest""" TODO (?): right now there is a small chance that corner data are wrongly predicted (that is fine for now). In other words, if we use the extracted rules (with a specific default accuracy fo float) and compare their result with the one obtained by the actual decision tree (thresholds do not have truncated float) they may be different. To avoid this, when we will refactor all extractor we will also address this issue."""@parameterized_class(initialize('cart'))classTestCart(unittest.TestCase):
deftest_extract(self):
logger.info(self.expected_theory)
logger.info(self.extracted_theory)
self.assertTrue(self.expected_theory.equals(self.extracted_theory, False))
deftest_predict(self):
# self.assertEqual(self.extracted_test_y_from_theory, self.extracted_test_y_from_pruned_theory)ifisinstance(self.extracted_test_y_from_theory[0], str):
self.assertTrue(all(self.extracted_test_y_from_theory==self.extracted_test_y_from_extractor))
else:
self.assertTrue(max(abs(self.extracted_test_y_from_theory-self.extracted_test_y_from_extractor)) <get_default_precision())
if__name__=='__main__':
unittest.main()
The text was updated successfully, but these errors were encountered:
In other words, if we use the extracted rules (with a specific default accuracy fo float)
and compare their result with the one obtained by the actual decision tree (thresholds do not have truncated float)
they may be different. To avoid this, when we will refactor all extractor we will also address this issue.
psyke-python/test/psyke/extraction/cart/test_cart.py
Line 8 in 9b938e5
The text was updated successfully, but these errors were encountered: