28#define LOSS_INVALID (-1)
33#define LOSS_BINARY_LOG (4)
34#define LOSS_ONEHOT (5)
38#define LOSS_STRING_MAE ("mae\0")
39#define LOSS_STRING_MSE ("mse\0")
40#define LOSS_STRING_RMSE ("rmse\0")
41#define LOSS_STRING_LOG ("log\0")
42#define LOSS_STRING_BINARY_LOG ("binary_log\0")
43#define LOSS_STRING_ONEHOT ("onehot\0")
44#define LOSS_STRING_HUBER ("huber\0")
46#define LOSS_OPTIONS "mae, mse, rmse, log, binary_log, one_hot, huber"
double loss_binary_log(const struct XCSF *xcsf, const double *pred, const double *y)
Binary logistic log loss for binary-class classification.
const char * loss_type_as_string(const int type)
Returns a string representation of a loss type from the integer.
double loss_rmse(const struct XCSF *xcsf, const double *pred, const double *y)
Root mean squared error loss function.
double loss_onehot(const struct XCSF *xcsf, const double *pred, const double *y)
One-hot classification error.
double loss_log(const struct XCSF *xcsf, const double *pred, const double *y)
Logistic log loss for multi-class classification.
int loss_type_as_int(const char *type)
Returns the integer representation of a loss type given a name.
double loss_mae(const struct XCSF *xcsf, const double *pred, const double *y)
Mean absolute error loss function.
double loss_mse(const struct XCSF *xcsf, const double *pred, const double *y)
Mean squared error loss function.
int loss_set_func(struct XCSF *xcsf)
Sets the XCSF error function to the implemented function.
double loss_huber(const struct XCSF *xcsf, const double *pred, const double *y)
Huber loss function.