34 #ifndef REGULARIZERS_HPP
35 #define REGULARIZERS_HPP
92 double &best_val_loss,
101 static std::vector<double>
128 static std::vector<std::vector<double>>
130 double epsilon = 1e-5,
141 static std::vector<std::vector<double>>
143 int augmentation_factor);
static double l2_regularization(const std::vector< double > &weights, double lambda)
Computes L2 regularization penalty (Ridge regression)
static std::vector< double > ensemble_predictions(const std::vector< std::vector< double >> &predictions)
Combines predictions from multiple models using ensembling.
static void max_norm_regularization(std::vector< double > &weights, double max_norm)
Applies max norm regularization to the weights.
static std::vector< std::vector< double > > data_augmentation(const std::vector< std::vector< double >> &input_data, int augmentation_factor)
Applies data augmentation to the input data.
static std::vector< std::vector< double > > batch_normalization(const std::vector< std::vector< double >> &input_data, double epsilon=1e-5, double scale=1.0, double shift=0.0)
Applies batch normalization to the input data.
static double elastic_net_regularization(const std::vector< double > &weights, double lambda1, double lambda2)
Computes Elastic Net regularization penalty.
static double l1_regularization(const std::vector< double > &weights, double lambda)
Computes L1 regularization penalty (Lasso regression)
static double dropout_regularization(double dropout_rate, int num_neurons)
Computes Dropout regularization penalty.
static void weight_decay_regularization(std::vector< double > &weights, double lambda)
Applies weight decay regularization to the weights.
static bool early_stopping(double current_val_loss, double &best_val_loss, int patience, int epoch)
Performs early stopping based on validation loss.
The source C++ openGPMP namespace.