score
-
class score
Abstract type representing the ensamble of usefull information to store during the couple evaluation.
In particular the class includes:
The Matthews Correlation Coefficient values of each couple (
mcc)The first gene index of the couple (
gene_a)The second gene index of the couple (
gene_b)The total accuracy of the couple (
tot)The accuracy score for each class (
class_score)
Public Functions
-
score()
Default constructor.
-
score(const int32_t &N, const int32_t &n_class)
Constructor with number of couples and number of classes.
This is the constructor used inside the DNetPRO algorithm in which the number of couples can be evaluated as
*number_of_combination = number_of_samples * (number_of_samples - 1) / 2
- Parameters:
N – The number of available couples
n_class – The number of available classes in which the samples are divided
-
score(score &&s) noexcept = default
Copy constructor.
The operator doesn’t perform a deep copy of the object but it just move all the buffers from the input object to the current one. In this way we optimize the memory management.
- Parameters:
s – Score object
-
score &operator=(score &&s) noexcept = default
Copy operator.
The operator doesn’t perform a deep copy of the object but it just move all the buffers from the input object to the current one. In this way we optimize the memory management.
- Parameters:
s – Score object
-
score(const score&) = delete
Delete copy constructor.
Note
This is employed to avoid accidental expensive copies
-
score &operator=(const score&) = delete
Delete assignment operator.
Note
This is employed to avoid accidental expensive copies
-
~score() = default
Destructor set as default.
Public Members
-
int32_t N
The number of stored results.
-
int32_t n_class
The number of classes (fixed to 2)
Public Static Functions
-
static float matthews_corrcoef(const int32_t *row_sum, const int32_t *col_sum, const int32_t &K, const int32_t &trace, const int32_t &n)
Compute the Matthews correlation coefficient.
- Parameters:
row_sum – Sum over rows of the confusion matrix.
col_sum – Sum over columns of the confusion matrix.
K – Number of classes.
trace – Trace of the confusion matrix.
n – Total number of samples.
- Returns:
Matthews correlation coefficient.