HMRF algorithm for performance diagnosis

This document describes the implementation detail of our HMRF algorithm.