>>> for column, color in zip(range(weights.shape[1]), colors):
    ...     plt.plot(params, weights[:, column],
    ...              label=df_wine.columns[column + 1],
    ...              color=color)
    >>> plt.axhline(0, color='black', linestyle='--', linewidth=3)
    >>> plt.xlim([10**(-5), 10**5])
    >>> plt.ylabel('Weight coefficient')
    >>> plt.xlabel('C (inverse regularization strength)')
    >>> plt.xscale('log')
    >>> plt.legend(loc='upper left')
    >>> ax.legend(loc='upper center',
    ...           bbox_to_anchor=(1.38, 1.03),
    ...           ncol=1, fancybox=True)
    >>> plt.show()
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.