File:Nonsmooth coordinate descent.svg

来自testwiki
跳转到导航 跳转到搜索
原始文件 (SVG文件,尺寸为900 × 900像素,文件大小:35 KB)

本文件来自维基共享资源并可能被其他项目使用。 其文件描述页上的描述显示在下面。

摘要

描述
English: Coordinate descent attempt in a nonsmooth function. Note that moving in any of the two coordinates will increase the value of the objective functions.
日期
来源 自己的作品
 本W3C状态不明的图表使用Matplotlib创作.
作者 Nicoguaro

Creation

This file was created with Python, SciPy and Matplotlib.

from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rcParams

rcParams['font.family'] = 'serif'
rcParams['font.size'] = 16


def fun(x, y):
    return np.abs(y + x) + 3*np.abs(y - x)


X, Y = np.mgrid[-3:3:301j, -3:3:301j]
Z = fun(X, Y)
plt.figure(figsize=(10, 10))
levels = range(1,7)
CS = plt.contour(X, Y, Z, levels=levels, colors='k')
plt.clabel(CS)
plt.arrow(-2, -2, 0.5, 0, fc='r', ec='r', length_includes_head=True)
plt.arrow(-2, -2, 0, 0.5, fc='r', ec='r', length_includes_head=True)
plt.axis('image')
plt.xlabel(r'$x$', size=18)
plt.ylabel(r'$y$', size=18)
plt.title(r'$f(x,y) = |x + y| + 3|y -x|$')
plt.savefig('nonsmooth coordinate descent.svg')
plt.show()

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
w:zh:知识共享
署名
本文件采用知识共享署名 4.0 国际许可协议授权。
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2016年1月10日 (日) 01:162016年1月10日 (日) 01:16版本的缩略图900 × 900​(35 KB)wikimediacommons>NicoguaroUser created page with UploadWizard

以下页面使用本文件: