neural-networks-and-deep-learning misleading_gradient_contours.py
2016-07-21 16:24
507 查看
其实是康托图,和之前的misleading_gradient没有什么太大的本质区别。
contour的level就是选择哪些值画线。
contour的level就是选择哪些值画线。
""" misleading_gradient_contours ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Plots the contours of the function from misleading_gradient.py""" #### Libraries # Third party libraries import matplotlib.pyplot as plt import numpy X = numpy.arange(-1, 1, 0.02) Y = numpy.arange(-1, 1, 0.02) X, Y = numpy.meshgrid(X, Y) Z = X**2 + 10*Y**2 plt.figure() CS = plt.contour(X, Y, Z, levels=[0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]) plt.xlabel("$w_1$", fontsize=16) plt.ylabel("$w_2$", fontsize=16) plt.show()
相关文章推荐
- java directmemory监控
- dex文件的反编译-dex2jar和jd-gui
- SAP 限制出货数量小于销售订单数量
- 参数估计方法
- linux环境变量设置
- Spring MVC 之@Controller@RequestMapping详解
- win10下面部署Mysql数据库
- Java 多线程:生产者消费者问题
- JAVA设计模式---适配器模式
- Python中的lambda和Map混合运用
- 将JNI模块打包为AAR模块
- <JAVA与模式>之组合模式
- php 连接 sql server 各种版本
- 修改WebStorm默认保存的文件编码格式
- lamp配置
- thymeleaf模板使用笔记(与Spring整合)
- Flip Game
- [libevent]evsignal_handler()
- SpringMVC拦截器教程(亲测有用)
- spring笔记——bean自动装配的5种模式(autowrite属性)