Brush C++ API
A flexible interpretable machine learning framework
|
Classes | |
class | Evaluation |
Class for evaluating the fitness of individuals in a population. More... | |
class | Scorer |
class | Scorer< P > |
Functions | |
float | mse (const VectorXf &y, const VectorXf &yhat, VectorXf &loss, const vector< float > &class_weights) |
mean squared error | |
VectorXf | log_loss (const VectorXf &y, const VectorXf &predict_proba, const vector< float > &class_weights=vector< float >()) |
Calculates the log loss between the predicted probabilities and the true labels. | |
float | mean_log_loss (const VectorXf &y, const VectorXf &predict_proba, VectorXf &loss, const vector< float > &class_weights) |
log loss | |
float | average_precision_score (const VectorXf &y, const VectorXf &predict_proba, VectorXf &loss, const vector< float > &class_weights=vector< float >()) |
Calculates the average precision score between the predicted probabilities and the true labels. | |
VectorXf | multi_log_loss (const VectorXf &y, const ArrayXXf &predict_proba, const vector< float > &class_weights=vector< float >()) |
Calculates the multinomial log loss between the predicted probabilities and the true labels. | |
float | mean_multi_log_loss (const VectorXf &y, const ArrayXXf &predict_proba, VectorXf &loss, const vector< float > &class_weights=vector< float >()) |
Calculates the mean multinomial log loss between the predicted probabilities and the true labels. | |
float Brush::Eval::average_precision_score | ( | const VectorXf & | y, |
const VectorXf & | predict_proba, | ||
VectorXf & | loss, | ||
const vector< float > & | class_weights = vector< float >() ) |
Calculates the average precision score between the predicted probabilities and the true labels.
y | The true labels. |
predict_proba | The predicted probabilities. |
loss | Reference to store the calculated losses for each sample. |
class_weights | The optional class weights. |
Definition at line 59 of file metrics.cpp.
VectorXf Brush::Eval::log_loss | ( | const VectorXf & | y, |
const VectorXf & | predict_proba, | ||
const vector< float > & | class_weights = vector< float >() ) |
Calculates the log loss between the predicted probabilities and the true labels.
y | The true labels. |
predict_proba | The predicted probabilities. |
class_weights | The optional class weights. |
Definition at line 16 of file metrics.cpp.
float Brush::Eval::mean_log_loss | ( | const VectorXf & | y, |
const VectorXf & | predict_proba, | ||
VectorXf & | loss, | ||
const vector< float > & | class_weights = vector< float >() ) |
log loss
Calculates the mean log loss between the predicted probabilities and the true labels.
y | The true labels. |
predict_proba | The predicted probabilities. |
loss | Reference to store the calculated losses for each sample. |
class_weights | The optional class weights. |
Definition at line 51 of file metrics.cpp.
float Brush::Eval::mean_multi_log_loss | ( | const VectorXf & | y, |
const ArrayXXf & | predict_proba, | ||
VectorXf & | loss, | ||
const vector< float > & | class_weights = vector< float >() ) |
Calculates the mean multinomial log loss between the predicted probabilities and the true labels.
y | The true labels. |
predict_proba | The predicted probabilities. |
loss | Reference to store the calculated losses for each sample. |
class_weights | The optional class weights. |
Definition at line 169 of file metrics.cpp.
float Brush::Eval::mse | ( | const VectorXf & | y, |
const VectorXf & | yhat, | ||
VectorXf & | loss, | ||
const vector< float > & | class_weights = vector< float >() ) |
mean squared error
Calculates the mean squared error between the predicted values and the true values.
y | The true values. |
yhat | The predicted values. |
loss | Reference to store the calculated losses for each sample. |
class_weights | The optional class weights (not used for MSE). |
Definition at line 9 of file metrics.cpp.
VectorXf Brush::Eval::multi_log_loss | ( | const VectorXf & | y, |
const ArrayXXf & | predict_proba, | ||
const vector< float > & | class_weights = vector< float >() ) |
Calculates the multinomial log loss between the predicted probabilities and the true labels.
y | The true labels. |
predict_proba | The predicted probabilities. |
class_weights | The optional class weights. |
Definition at line 118 of file metrics.cpp.