Data Science, Product Analytics, Ab Testing, Simulation, Deep Dives.
probability, then a customer is retained (it happens with specified probability), otherwise, the customer has churned. sample_df['retention'] = sample_df.predicted_retention_proba.map( lambda x: 1 if x > np.random.uniform() else 0) You can run a few simulations to ensure our sampling function works