427 votes

Micro Average vs Macro average Performance in a Multiclass classification setting

Micro- and macro-averages (for whatever metric) will compute slightly different things, and thus their interpretation differs. A macro-average will compute the metric independently for each class and ...
user avatar
  • 4,379
62 votes
Accepted

When is precision more important over recall?

For rare cancer data modeling, anything that doesn't account for false-negatives is a crime. Recall is a better measure than precision. For YouTube recommendations, false-negatives is less of a ...
user avatar
  • 3,390
52 votes
Accepted

What is the difference between bootstrapping and cross-validation?

Both cross validation and bootstrapping are resampling methods. bootstrap resamples with replacement (and usually produces new "surrogate" data sets with the same number of cases as the original ...
user avatar
40 votes

Micro Average vs Macro average Performance in a Multiclass classification setting

This is the Original Post. In Micro-average method, you sum up the individual true positives, false positives, and false negatives of the system for different sets and the apply them to get the ...
user avatar
27 votes

Micro Average vs Macro average Performance in a Multiclass classification setting

In a multi-class setting micro-averaged precision and recall are always the same. $$ P = \frac{\sum_c TP_c}{\sum_c TP_c + \sum_c FP_c}\\ R = \frac{\sum_c TP_c}{\sum_c TP_c + \sum_c FN_c} $$ where c ...
user avatar
22 votes

How to define a custom performance metric in Keras?

You have to use Keras backend functions. Unfortunately they do not support the &-operator, so that you have to build a workaround: We generate matrices of the ...
user avatar
  • 381
22 votes
Accepted

Train/Test Split after performing SMOTE

When you use any sampling technique (specifically synthetic) you divide your data first and then apply synthetic sampling on the training data only. After you do the training, you use the test set (...
user avatar
22 votes
Accepted

How many features to sample using Random Forests

I think in the original paper they suggest using $\log_2(N +1$), but either way the idea is the following: The number of randomly selected features can influence the generalization error in two ways: ...
user avatar
  • 5,995
20 votes

When is precision more important over recall?

I can give you my real case when recall is more important: We have thousands of free customers registering in our website every week. The call center team wants to call them all, but it is imposible, ...
user avatar
19 votes
Accepted

What are the disadvantages of accuracy?

A common complaint about accuracy is that it fails when the classes are imbalanced. For instance, if you get an accuracy of $98\%$, that sounds like a high $\text{A}$ in school, so you might be pretty ...
user avatar
  • 2,915
16 votes
Accepted

When do I have to use aucPR instead of auROC? (and vice versa)

Yes, you are correct that the dominant difference between the area under the curve of a receiver operator characteristic curve (ROC-AUC) and the area under the curve of a Precision-Recall curve (PR-...
user avatar
  • 6,668
14 votes
Accepted

Macro- or micro-average for imbalanced class problems

The choice of a metric depends on how you rank the importance of your classes and what you value from a classifier. Let's look at your example: For example if we have a data set with 90%-10% class ...
user avatar
  • 7,568
13 votes
Accepted

Micro-F1 and Macro-F1 are equal in binary classification and I don't know why

The difference between macro and micro averaging for performance metrics (such as the F1-score) is that macro weighs each class equally whereas micro weights each sample equally. If the distribution ...
user avatar
  • 181
11 votes

When is precision more important over recall?

Which is more important simply depends on what the costs of each error are. Precision tends to involve direct costs; the more false positives you have, the more cost per true positive you have. If ...
user avatar
11 votes
Accepted

Is the F1 Score sensitive to the threshold?

Yes, it is. The formula: $$F_1 = \frac{2TP}{2TP + FP + FN}$$ There is no symmetry. You have only $TP$ in the nominator which means that $F_1=0$ if $threshold=1$.
user avatar
10 votes

Neural Networks - Loss and Accuracy correlation

Log loss has the nice property that it is a differentiable function. Accuracy might be more important and is definitely more interpretable but is not directly usable in the training of the network due ...
user avatar
9 votes
Accepted

Irregular Precision-Recall Curve

This is definitely possible. When you are reducing the threshold, you will never decrease the recall (you can only flag more of the positive examples as positive). Precision is looking at all the ...
user avatar
9 votes

When is precision more important over recall?

Although in some situations recall may be more important than precision (or vice versa), you need both to get a more interpretable assessment. For instance, as noted by @SmallChess, in the medical ...
user avatar
  • 2,422
9 votes
Accepted

What is Continuous Ranked Probability Score (CRPS)?

CRPS is in a sense just the mean square error (MSE) of your predicted cumulative density function (CDF) and the true CDF. The CRPS generalizes the MAE (Mean Absolute Error) to the case of ...
user avatar
  • 2,376
9 votes

Do I need validation data if my train and test accuracy/loss is consistent?

You don't always need 3 separate datasets. You usually split a dataset into 3 if you are doing some parameter or hyperparameter tuning before choosing a final model. Tuning will usually add bias from ...
user avatar
  • 1,779
8 votes
Accepted

Difference between using RMSE and nDCG to evaluate Recommender Systems

nDCG is used to evaluate a golden ranked list (typically human judged) against your output ranked list. The more is the correlation between the two ranked lists, i.e. the more similar are the ranks of ...
user avatar
  • 1,516
8 votes
Accepted

Difference between learning_curve and validation_curve

Both curves show the training and validation scores of an estimator on the y-axis. A learning curve plots the score over varying numbers of training samples, while a validation curve plots the score ...
user avatar
  • 266
8 votes

What are the disadvantages of accuracy?

In general, the main disadvantage of accuracy is that it masks the issue of class imbalance. For example if the data contains only 10% of positive instances, a majority baseline classifier which ...
user avatar
  • 22.1k
7 votes

Neural Networks - Loss and Accuracy correlation

Loss is more general than accuracy. In classification, you can go to 100% accuracy, where all the labels are predicted correctly. But what about regression or forecasting? There is no definition of 0% ...
user avatar
7 votes

When is precision more important over recall?

I had a tough time remembering the difference between precision and recall, until I came up with this mnemonic for myself: PREcision is to PREgnancy tests as reCALL is to CALL center. With a ...
user avatar
7 votes

What is the difference between bootstrapping and cross-validation?

Bootstrapping is any test or metric that relies on random sampling with replacement.It is a method that helps in many situations like validation of a predictive model performance, ensemble methods, ...
user avatar
6 votes
Accepted

Is Gini coefficient a good metric for measuring predictive model performance on highly imbalanced data

The Gini Coefficient can also be expressed in terms of the area under the ROC curve (AUC): G = 2*AUC -1 link. The ROC curve, on the other hand, is influenced by ...
user avatar
  • 5,995
6 votes

When is precision more important over recall?

Accumulation has a great answer on how you can come up with more examples explaining the importance of precision over recall and vice versa. Most of the other answers make a compelling case for the ...
user avatar
  • 61
6 votes
Accepted

Can Micro-Average Roc Auc Score be larger than Class Roc Auc Scores

In a binary problem there's no reason to average the ROC (or any other metric). Normally micro and macro performances are used to obtain a single performance value based on individual binary ...
user avatar
  • 22.1k
6 votes

How to evaluate when recommender systems are influencing behavior?

This is a case for A/B testing: Two versions of the website are prepared, one offering the coupon and another not offering it. Users are randomly split into two groups, some of them getting the coupon ...
user avatar
  • 22.1k

Only top scored, non community-wiki answers of a minimum length are eligible