NetDEM v1.0
Loading...
Searching...
No Matches
mlpack_utils.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <mlpack.hpp>
4
5namespace netdem {
6
11public:
19 enum class LayerType {
20 Identity,
21 Linear,
22 ReLU,
23 LeakyReLU,
24 ELU,
25 Softmax,
27 };
28
40 static double GetMSE(const arma::mat &pred, const arma::mat &Y);
41
53 static double GetMAE(const arma::mat &pred, const arma::mat &Y);
54
64 static arma::mat GetLabels(const arma::mat &ann_outputs);
65};
66
67} // namespace netdem
A class that defines several utility methods for ANN.
Definition mlpack_utils.hpp:10
LayerType
An enumeration of neural network layer types.
Definition mlpack_utils.hpp:19
@ Softmax
The softmax layer type.
@ Linear
The linear layer type.
@ LogSoftMax
The log-softmax layer type.
@ ELU
The exponential linear unit (ELU) layer type.
@ LeakyReLU
The leaky ReLU layer type.
@ Identity
The identity layer type.
@ ReLU
The rectified linear unit (ReLU) layer type.
static double GetMSE(const arma::mat &pred, const arma::mat &Y)
Calculates the mean squared error between predicted and ground truth data.
Definition mlpack_utils.cpp:6
static arma::mat GetLabels(const arma::mat &ann_outputs)
Converts continuous output vectors to class labels.
Definition mlpack_utils.cpp:28
static double GetMAE(const arma::mat &pred, const arma::mat &Y)
Calculates the mean absolute error between predicted and ground truth data.
Definition mlpack_utils.cpp:17
Definition bond_entry.hpp:7