Share Your Experience: Take the 2024 Developer Survey

# Tag Info

### 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 ...
• 4,979
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 ...
• 3,560
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 ...

### 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 ...

### 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 ...
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 (...
• 2,009
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: ...
• 6,377

### 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 ...
• 381

### 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, ...
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 ...
• 3,903
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 ...
• 7,998
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 ...
• 311
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 ...
• 9,368

### 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 ...
• 9,368

### 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 ...
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$.
• 4,213
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 ...
• 3,898

### 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 ...
• 2,572

### 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 ...
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 ...
• 286

### 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 ...
• 1,959
Accepted

### Micro Average vs Macro Average for Class Imbalance

The question is actually about understanding what it means to "take imbalance into account": Micro-average "takes imbalance into account" in the sense that the resulting ...
• 25.5k

### 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 ...
• 25.5k

### Micro Average vs Macro average Performance in a Multiclass classification setting

Assume that we are classifying an email into one of the three groups: urgent, normal and spam. We compare the predicts with the ground truth labels, then we get the following confusion matrix and the ...
• 516

### 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, ...

### precision@k and recall@k

A quick answer. Note: Checking the references I could access fully, there are no discrepancies between the definitions as long as the terms are translated correctly. Some definitions: Relevant items: ...
• 2,353
Accepted

### XGBoost increase the error when changing evaluation function

If your goal is to minimize the RMSLE, the easier way is to transform the labels directly into log scale and use reg:linear as objective (which is the default) and <...
• 1,009

### Micro Average vs Macro average Performance in a Multiclass classification setting

That's how it should be. I had the same result for my research. It seemed weird at first. But precision and recall should be the same while micro-averaging the result of multi-class single-label ...
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 ...
• 6,377