9#ifndef WEIGHTEDSQUAREDERROR_H
10#define WEIGHTEDSQUAREDERROR_H
24#include "loss_index.h"
57 type get_normalizaton_coefficient()
const;
74 type weighted_sum_squared_error(
const Tensor<type, 2>& x,
const Tensor<type, 2>& y)
const;
127 #include "../../opennn-cuda/opennn-cuda/weighted_squared_error_cuda.h"
This class represents the concept of data set for data modelling problems, such as approximation,...
This abstract class represents the concept of loss index composed of an error term and a regularizati...
This class represents the weighted squared error term.
type positives_weight
Weight for the positives for the calculation of the error.
void set_weights()
Calculates of the weights for the positives and negatives values with the data of the data set.
type normalization_coefficient
Coefficient of normalization.
void set_data_set_pointer(DataSet *)
set_data_set_pointer
void set_normalization_coefficient()
Calculates of the normalization coefficient with the data of the data set.
void from_XML(const tinyxml2::XMLDocument &)
void set_default()
Set the default values for the object.
type get_positives_weight() const
Returns the weight of the positives.
type negatives_weight
Weight for the negatives for the calculation of the error.
void set_negatives_weight(const type &)
string get_error_type() const
Returns a string with the name of the weighted squared error loss type, "WEIGHTED_SQUARED_ERROR".
void set_positives_weight(const type &)
void calculate_error_gradient_lm(const DataSetBatch &, LossIndexBackPropagationLM &) const
void write_XML(tinyxml2::XMLPrinter &) const
string get_error_type_text() const
Returns a string with the name of the weighted squared error loss type in text format.
type get_negatives_weight() const
Returns the weight of the negatives.
virtual ~WeightedSquaredError()
Destructor.
A loss index composed of several terms, this structure represent the First Order for this function.