This paper calculates the risk of each customer using machine learning. We include risk as a variable in calculating the potential value, as defined in Eq. (3). The potential value can be defined by timing the profit to the possibility of retaining the customer. In particular, the risk is defined as customer defection.