print("x_binned shape{}format(x_binned shape)out[ ]x_binned shape( now we build new linear regression model and new decision tree model on the one-hot-encoded data the result is visualized in figure - together with the bin boundariesshown as dotted black linesin[ ]line_binned encoder transform(np digitize(linebins=bins)reg linearregression(fit(x_binnedyplt plot(linereg predict(line_binned)label='linear regression binned'reg decisiontreeregressor(min_samples_split= fit(x_binnedyplt plot(linereg predict(line_binned)label='decision tree binned'plt plot( [: ] ' ' =' 'plt vlines(bins- linewidth= alpha plt legend(loc="best"plt ylabel("regression output"plt xlabel("input feature"figure - comparing linear regression and decision tree regression on binned features binningdiscretizationlinear modelsand trees