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