FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add new tests to learning.py by lucasmoura · Pull Request #458 · aimacode/aima-python · GitHub

Repository navigation

Add new tests to learning.py - #458

Closed
lucasmoura wants to merge 1 commit into
aimacode:masterfrom
lucasmoura:learning_tests
Closed

lucasmoura wants to merge 1 commit into
aimacode:masterfrom
lucasmoura:learning_tests

Conversation

Copy link
Copy Markdown
Contributor

Add tests for the following functions in learning.py

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

Chipe1 commented Apr 1, 2017 •
edited
Loading

Copy link
Copy Markdown
Contributor

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

Comment thread tests/test_learning.py
predictions = [1, 1, 2, 1]
targets = [1, 2, 1, 1]

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

pytest will have to be removed.

Copy link
Copy Markdown
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 closed this Apr 3, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL