A shop predicts basket value from [discount_percent, is_member, random_score]. Discounts might help members and put off everyone else. An average curve could hide that, so look at one curve per row (ICE) as well.
Task: write ice_summary(rows, baskets, column).
DecisionTreeRegressor(max_depth=4, random_state=0) on rows and baskets.partial_dependence(model, rows, features=[column], kind="both", grid_resolution=5).["average"][0] is the average curve. Its ["individual"][0] holds one curve per row."average_change": last value minus first value of the average curve, a plain float rounded to 2 decimal places"rising": how many row curves rise"falling": how many row curves fallOnce your code passes every test, a reference solution shows up here so you can compare it with yours.