Extending to other datasets
The same process demonstrated in this chapter can be applied to other datasets. For instance, consider a dataset that’s used for predicting the expected price of a rental apartment. In this scenario, you can use similar counterfactual analysis to determine what modifications the landlord can introduce to the apartment to achieve a certain rent. Using programs similar to the ones introduced here, you could apply genetic algorithms to explore the sensitivity of the model’s predictions to changes in input features and identify actionable insights for achieving desired outcomes.