I work with domain knowledge experts that work mostly with R2 and explained variance as metrics. Hence, when I share models with them, I want my model to minimize a specific metric (R2). I often use DecisionTreeRegressor from scikit-learn, and the criterion
parameter only accepts the following :
{“squared_error”, “friedman_mse”, “absolute_error”, “poisson”}
Is there an easy workaround to create our own cost function to optimize a model (with R2 in my case)?