Skip to content
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

docs - metrics namespace #57

Open
hjrnunes opened this issue Apr 11, 2021 · 1 comment
Open

docs - metrics namespace #57

hjrnunes opened this issue Apr 11, 2021 · 1 comment

Comments

@hjrnunes
Copy link

many docstrings in the tech.v3.ml.metrics namespace seem wrong/outdated.

The ones in question generally state or imply returns to be arrays of 0.0 and 1.0 values. In reality, booleans are returned because tech.v3.datatype.functional/eq or tech.v3.datatype.functional/not-eq are used underneath.

Examples:

(require '[tech.v3.ml.metrics :as m])

(doc m/wrongs)
-------------------------
tech.v3.ml.metrics/wrongs
([y y_hat])
  Given `y` array of ground truth labels and `y_hat` classifier predictions,
  returns array with 1.0 values where `y` does not equal `y_hat`.

(m/wrongs [:a :a :b] [:a :a :a])
=> [false false true]


(doc m/true-negatives)
-------------------------
tech.v3.ml.metrics/true-negatives
([y y_hat])
  Returns array with 1. values assigned to true negatives.

(m/true-negatives [1.0 1.0 0.0] [1.0 1.0 1.0])
=> [false false false]
@cnuernber
Copy link
Collaborator

Good point. Booleans will convert to 1,0 when read as a number but the docs are wrong.

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

No branches or pull requests

2 participants