Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add new tests to learning.py#458

Closed
lucasmoura wants to merge 1 commit intoaimacode:masteraimacode/aima-python:masterfrom
lucasmoura:learning_testslucasmoura/aima-python:learning_testsCopy head branch name to clipboard
Closed

Add new tests to learning.py#458
lucasmoura wants to merge 1 commit intoaimacode:masteraimacode/aima-python:masterfrom
lucasmoura:learning_testslucasmoura/aima-python:learning_testsCopy head branch name to clipboard

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

Comments

Close sidebar
Morty Proxy This is a proxified and sanitized view of the page, visit original site.