Data Science, Regularization, Machine Learning, Editors Pick, Hands On Tutorials.
plt.plot(lambda_array, rmse_array_lasso, color=line_color[0], linewidth=3, label='Lasso') plt.plot(lambda_array, rmse_array_ridge, color=line_color[1], linewidth=3, label='Ridge') plt.legend(loc='upper right') if plot_type == 'zoom': ax.xaxis.set_ticks(np.arange(0., 1, 0.05))