NNFS
Neural network library from scratch
Loading...
Searching...
No Matches
NNFS::Metrics Class Reference

Metrics class. More...

#include <Metrics.hpp>

Static Public Member Functions

static void accuracy (double &accuracy, const Eigen::MatrixXd &predicted, const Eigen::MatrixXd &labels)
 Calculates the accuracy of the model.
 
static void onehotdecode (Eigen::VectorXi &decoded, const Eigen::MatrixXd &onehot)
 Decodes one-hot encoded data.
 

Detailed Description

Metrics class.

This class implements the metrics used to evaluate the performance of the model.

Member Function Documentation

◆ accuracy()

static void NNFS::Metrics::accuracy ( double &  accuracy,
const Eigen::MatrixXd &  predicted,
const Eigen::MatrixXd &  labels 
)
inlinestatic

Calculates the accuracy of the model.

Parameters
[out]accuracyThe accuracy of the model.
[in]predictedThe predicted data.
[in]labelsThe labels.

◆ onehotdecode()

static void NNFS::Metrics::onehotdecode ( Eigen::VectorXi &  decoded,
const Eigen::MatrixXd &  onehot 
)
inlinestatic

Decodes one-hot encoded data.

Parameters
[out]decodedThe decoded data.
[in]onehotThe one-hot encoded data.

The documentation for this class was generated from the following file: