aimacode / aima-python

Python implementation of algorithms from Russell And Norvig's "Artificial Intelligence - A Modern Approach"
MIT License
7.79k stars 3.65k forks source link

accuracy_score function #1269

Open rsrenner opened 1 year ago

rsrenner commented 1 year ago

The accuracy_score function in learning4e.py could benefit from replacing the input argument to np.mean to be (y_pred==y_true). This is because np.equal does not seem to support string element comparisons.