171 using std::runtime_error::runtime_error;
A container for managing training, evaluation, and test data splits.
Exceptions concerning txeo::Loss.
Computes error metrics between predicted and validation tensors.
Loss(const txeo::Tensor< T > &label, txeo::LossFunc func=txeo::LossFunc::MSE)
Construct a new Loss object.
void set_loss(txeo::LossFunc func)
Set the active loss function.
T msle(const txeo::Tensor< T > &pred) const
T mean_squared_logarithmic_error(const txeo::Tensor< T > &pred) const
Compute Mean Squared Logarithmic Error (MSLE)
T mse(const txeo::Tensor< T > &pred) const
Loss(txeo::Tensor< T > &&label, txeo::LossFunc func=txeo::LossFunc::MSE)
Construct a new Loss object from a label rvalue.
T get_loss(const txeo::Tensor< T > &pred) const
Compute loss using currently selected function.
Loss & operator=(Loss &&)=default
T mean_absolute_error(const txeo::Tensor< T > &pred) const
Compute Mean Absolute Error (MAE)
T lche(const txeo::Tensor< T > &pred) const
T mae(const txeo::Tensor< T > &pred) const
const txeo::Tensor< T > & label() const
T mean_squared_error(const txeo::Tensor< T > &pred) const
Compute Mean Squared Error (MSE)
Loss & operator=(const Loss &)=default
T log_cosh_error(const txeo::Tensor< T > &pred) const
Compute Log-Cosh Error (LCHE)
Loss(const Loss &)=default
LossFunc
Types of loss functions.