Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
metrics.h
Go to the documentation of this file.
1#ifndef METRICS_H
2#define METRICS_H
3
4#include "../data/data.h"
5
6namespace Brush {
11namespace Eval {
12
13/* Scoring functions */
14
15// regression ------------------------------------------------------------------
16
25float mse(const VectorXf& y, const VectorXf& yhat, VectorXf& loss,
26 const vector<float>& class_weights=vector<float>() );
27
28// binary classification -------------------------------------------------------
29
37VectorXf log_loss(const VectorXf& y, const VectorXf& predict_proba,
38 const vector<float>& class_weights=vector<float>());
39
48float mean_log_loss(const VectorXf& y, const VectorXf& predict_proba, VectorXf& loss,
49 const vector<float>& class_weights = vector<float>());
50
59float average_precision_score(const VectorXf& y, const VectorXf& predict_proba,
60 VectorXf& loss,
61 const vector<float>& class_weights=vector<float>());
62
63// multiclass classification ---------------------------------------------------
64
72VectorXf multi_log_loss(const VectorXf& y, const ArrayXXf& predict_proba,
73 const vector<float>& class_weights=vector<float>());
74
83float mean_multi_log_loss(const VectorXf& y, const ArrayXXf& predict_proba,
84 VectorXf& loss,
85 const vector<float>& class_weights=vector<float>());
86
87} // metrics
88} // Brush
89
90#endif
void bind_engine(py::module &m, string name)
float mean_log_loss(const VectorXf &y, const VectorXf &predict_proba, VectorXf &loss, const vector< float > &class_weights)
log loss
Definition metrics.cpp:51
float mean_multi_log_loss(const VectorXf &y, const ArrayXXf &predict_proba, VectorXf &loss, const vector< float > &class_weights)
Calculates the mean multinomial log loss between the predicted probabilities and the true labels.
Definition metrics.cpp:169
float average_precision_score(const VectorXf &y, const VectorXf &predict_proba, VectorXf &loss, const vector< float > &class_weights)
Calculates the average precision score between the predicted probabilities and the true labels.
Definition metrics.cpp:59
float mse(const VectorXf &y, const VectorXf &yhat, VectorXf &loss, const vector< float > &class_weights)
mean squared error
Definition metrics.cpp:9
VectorXf multi_log_loss(const VectorXf &y, const ArrayXXf &predict_proba, const vector< float > &class_weights)
Calculates the multinomial log loss between the predicted probabilities and the true labels.
Definition metrics.cpp:118
VectorXf log_loss(const VectorXf &y, const VectorXf &predict_proba, const vector< float > &class_weights)
Calculates the log loss between the predicted probabilities and the true labels.
Definition metrics.cpp:16
< nsga2 selection operator for getting the front
Definition data.cpp:12
Namespace containing scoring functions for evaluation metrics.