1
$\begingroup$

Suppose you want to penalize a model when it makes mistakes in classifying some points in a test set more than other points in the test set. How would you do this? Would you just use another measure of performance like $F1$-score, balanced accuracy, etc.?

$\endgroup$
1
$\begingroup$

One thing you can do is make duplicates of the points you want weighted that the algorithm is misclassifying. This will favor correct classification of these points at the expense of misclassification of other points.

Some algorithms, such as randomForest in Python's scikit-learn has a weight argument built in.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.