Skip to content

Conversation

@lucasmoura
Copy link
Contributor

Add tests for the following functions in learning.py

  • rms_error
  • ms_error
  • mean_error
  • manhattan_distance
  • mean_boolean_error
  • hamming_distance

@Chipe1
Copy link
Contributor

Chipe1 commented Apr 1, 2017

Most of the tests were already added in #293. Line 60 throws "AttributeError: 'module' object has no attribute 'approx'" when running py.test

predictions = [1, 1, 2, 1]
targets = [1, 2, 1, 1]

assert rms_error(predictions, targets) == pytest.approx(sqrt(0.5))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pytest will have to be removed.

@lucasmoura
Copy link
Contributor Author

@Chipe1 Thanks for pointing out about the other MR request. I have also realized that I am using a newer version of py.test than the one in the build. But since there is another MR covering the same tests as these ones, I will close it for now.

@lucasmoura lucasmoura closed this Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants