Calc the confidence and generate rules