Learning the attribute precedence hierarchy