HuwCampbell / grenade

Deep Learning in Haskell
BSD 2-Clause "Simplified" License
1.44k stars 84 forks source link

Accuracy #62

Closed CSVdB closed 6 years ago

CSVdB commented 6 years ago

Added the type Accuracy, representing the accuracy of a network on a dataset. Also added the function accuracy, which calculates this accuracy, and some helper functions.

This PR comes after 'DataSet'.

HuwCampbell commented 6 years ago

Cheers.

A few points; Please try to keep error contained in either Either or ExceptT. I would very much like grenade to not throw exceptions. I previously wrote a dodgy one in a util component, but it turned out to be a really bad idea.

Accuracy is probably a bit too overloaded a word to use here. This is classification accuracy for a multiclass logistic regression by the looks of it. I'm sure there's better nomenclature.