# Machine Learning in Elixir: B3, Chapter 5, page 110

**URL:** <https://forum.devtalk.com/t/machine-learning-in-elixir-b3-chapter-5-page-110/146940>\
**Category:** PragProg Customers\
**Tags:** book-machine-learning-in-elixir, errata\
**Created:** [11 March 2024 12:17 UTC](https://forum.devtalk.com/t/machine-learning-in-elixir-b3-chapter-5-page-110/146940 "2024-03-11T12:17:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdarla](https://forum.devtalk.com/user_avatar/forum.devtalk.com/bdarla/32/860_2.png) [@bdarla](https://forum.devtalk.com/u/bdarla)\
**Post date:** [11 March 2024 12:17 UTC](https://forum.devtalk.com/t/machine-learning-in-elixir-b3-chapter-5-page-110/146940/1 "2024-03-11T12:17:43Z")

</div>

@seanmor5

The KNN accuracy code has a small error. Please replace  
`Scholar.Metrics.confusion_matrix(test_targets, test_preds, num_classes: 3)`  
with  
`Scholar.Metrics.Classification.confusion_matrix(test_targets, test_preds, num_classes: 3)`

(edit)  
In addition, on page 114, please replace  
`Scholar.Metrics.accuracy(test_targets, test_preds)`  
with  
`Scholar.Metrics.Classification.accuracy(test_targets, test_preds)`
