within the binand zero everywhere else figure - shows the result of the linear model on this new representationin[ ]reg linearregression(fit(x_productyline_product np hstack([line_binnedline line_binned]plt plot(linereg predict(line_product)label='linear regression product'for bin in binsplt plot([binbin][- ]':' =' 'plt plot( [: ] ' ' =' 'plt ylabel("regression output"plt xlabel("input feature"plt legend(loc="best"figure - linear regression with separate slope per bin as you can seenow each bin has its own offset and slope in this model representing data and engineering features