If metric is a callable function, it is called on each pair of instances (rows) and the resulting value recorded.