Weights in scikit-learn metric functions Most of the scikit-learn metric functions have an option to take into account sample weights. What is the purpose or use case to use this options? Unbalanced classes?
Unbalanced classes is definitely one use case, another purpose is cost sensitive learning, where the cost of misclassifying classes is different for each class. In particular scikit-learn give weights for each sample so it allows a greater flexibility.