How to interpret the precision score of a model when the problem is an anomaly detection? In a binary classification with a balanced label, the precision score is usually considered “positive” if it performs better than a random guess, i.e a precision above 0.5.
When the event (label = 1) happens very rarely, the precision could be, for instance, 0.2, and still perform better than a random guess.
Is there a known way to interpret the precision for anomaly detection or similar metrics for that type of problem?
 A: The best way is to compute the metrics you wish to use using a random guess. This is sometimes called the no information rate. It can be done using formulas based on class imbalance etc, but in practice I recommed just using a random classifier as a baseline model. In Python this can be done using DummyClassifier from scikit-learn. 
Even in the balanced binary classification case this can be useful, because the precision/recall will change depending on what probability threshold one uses to convert to a binary outcome.
A: It depends what kind of interpretation you are looking for.
Suppose the positive to negative class ratio is 1:99: Any random guess that amounts to a coin flip (even with a biased coin) would, in theory, achieve a precision of about 1% in the long run. If the only interpretation you need is "is it better than random guessing?", then all you need is 1% precision.
I suspect that's not what you're looking for. Even in the perfectly balanced binary case, 51% precision is, in most applications, not acceptable, even though it's better than random chance.
Usually, precision alone is not enough to evaluate a model. This is even more important when faced with imbalanced classes. You will rarely evaluate a precision score alone.
The two main types of interpretations would be:


*

*When comparing two models, with a comparable recall performance: does one outperform the other in terms of precision? (i.e. which model is better)

*When determining if you should use the model or not: What are the consequences of this precision score on what the model will be used for?


There is no absolute threshold for a "good" precision: it will all depend on the problem to which it is applied, and on other performance metrics (like recall).
