Skip to content

Add new tests to learning.py #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy