A probabilistic approach to learning costs for graph edit distance