吴裕雄 python深度学习与实践(6)
from pylab import *
import pandas as pd
import matplotlib.pyplot as plot
import numpy as np filePath = ("G:\\MyLearning\\TensorFlow_deep_learn\\data\\dataTest.csv")
dataFile = pd.read_csv(filePath,header=None, prefix="V")
summary = dataFile.describe()
dataFileNormalized = dataFile.iloc[:,1:6]
for i in range(1,6):
mean = summary.iloc[1, i]
sd = summary.iloc[2, i]
dataFileNormalized.iloc[:,(i-1)] = (dataFileNormalized.iloc[:,(i-1)] - mean) / sd
array = dataFileNormalized.values
print(np.shape(array))
boxplot(array)
plot.xlabel("Attribute")
plot.ylabel("Score")
show()
from pylab import *
import pandas as pd
import matplotlib.pyplot as plot
filePath = ("c://dataTest.csv")
dataFile = pd.read_csv(filePath,header=None, prefix="V") summary = dataFile.describe()
minRings = -1
maxRings = 99
nrows = 10
for i in range(nrows):
dataRow = dataFile.iloc[i,1:10]
labelColor = (dataFile.iloc[i,10] - minRings) / (maxRings - minRings)
dataRow.plot(color=plot.cm.RdYlBu(labelColor), alpha=0.5)
plot.xlabel("Attribute")
plot.ylabel("Score")
show()
import numpy as np
from pylab import *
import pandas as pd
import matplotlib.pyplot as plot filePath = ("G:\\MyLearning\\TensorFlow_deep_learn\\data\\dataTest.csv")
dataFile = pd.read_csv(filePath,header=None, prefix="V") corMat = pd.DataFrame(dataFile.iloc[1:20,1:20].corr())
plot.pcolor(corMat)
plot.show()
print(np.shape(corMat))
print(corMat)
from pylab import *
import pandas as pd
import matplotlib.pyplot as plot filePath = ("G:\\MyLearning\\TensorFlow_deep_learn\\data\\rain.csv")
dataFile = pd.read_csv(filePath)
summary = dataFile.describe()
print(summary) array = dataFile.iloc[:,1:13].values
boxplot(array)
plot.xlabel("month")
plot.ylabel("rain")
show()
from pylab import *
import pandas as pd
import matplotlib.pyplot as plot filePath = ("G:\\MyLearning\\TensorFlow_deep_learn\\data\\rain.csv")
dataFile = pd.read_csv(filePath) minRings = -1
maxRings = 99
nrows = 12
for i in range(nrows):
dataRow = dataFile.iloc[i,1:13]
labelColor = (dataFile.iloc[i,12] - minRings) / (maxRings - minRings)
dataRow.plot(color=plot.cm.RdYlBu(labelColor), alpha=0.5)
plot.xlabel("Attribute")
plot.ylabel("Score")
show()
from pylab import *
import pandas as pd
import matplotlib.pyplot as plot filePath = ("G:\\MyLearning\\TensorFlow_deep_learn\\data\\rain.csv")
dataFile = pd.read_csv(filePath) corMat = pd.DataFrame(dataFile.iloc[1:20,1:20].corr()) plot.pcolor(corMat)
plot.show()
吴裕雄 python深度学习与实践(6)的更多相关文章
- 吴裕雄 python深度学习与实践(18)
# coding: utf-8 import time import numpy as np import tensorflow as tf import _pickle as pickle impo ...
- 吴裕雄 python深度学习与实践(17)
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import time # 声明输 ...
- 吴裕雄 python深度学习与实践(16)
import struct import numpy as np import matplotlib.pyplot as plt dateMat = np.ones((7,7)) kernel = n ...
- 吴裕雄 python深度学习与实践(15)
import tensorflow as tf import tensorflow.examples.tutorials.mnist.input_data as input_data mnist = ...
- 吴裕雄 python深度学习与实践(14)
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt threshold = 1.0e-2 x1_dat ...
- 吴裕雄 python深度学习与实践(13)
import numpy as np import matplotlib.pyplot as plt x_data = np.random.randn(10) print(x_data) y_data ...
- 吴裕雄 python深度学习与实践(12)
import tensorflow as tf q = tf.FIFOQueue(,"float32") counter = tf.Variable(0.0) add_op = t ...
- 吴裕雄 python深度学习与实践(11)
import numpy as np from matplotlib import pyplot as plt A = np.array([[5],[4]]) C = np.array([[4],[6 ...
- 吴裕雄 python深度学习与实践(10)
import tensorflow as tf input1 = tf.constant(1) print(input1) input2 = tf.Variable(2,tf.int32) print ...
- 吴裕雄 python深度学习与实践(9)
import numpy as np import tensorflow as tf inputX = np.random.rand(100) inputY = np.multiply(3,input ...
随机推荐
- socketsever
socketsever 一个集成了TCP.UDP多线程多进程高并发的socket框架,可以用来快速搭建socket应用,并且拥有较好的并发性能. import socketserver class M ...
- Java - 32 Java 多线程编程
Java 多线程编程 Java给多线程编程提供了内置的支持.一个多线程程序包含两个或多个能并发运行的部分.程序的每一部分都称作一个线程,并且每个线程定义了一个独立的执行路径. 多线程是多任务的一种特别 ...
- oracle SQL语句取本周本月本年的数据
--国内从周一到周日 国外是周日到周六 select to_char(sysdate-1,'D') from dual;--取国内的星期几 去掉减一取国外的星期 --取本周时间内的数据 ,)+) an ...
- springboot通过poi导出excel
Maven引入依赖 <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi< ...
- SpringBoot关于系统之间的远程互相调用
1.SpringBoot关于系统之间的远程互相调用 可以采用RestTemplate方式发起Rest Http调用,提供有get.post等方式. 1.1远程工具类 此处使用Post方式,参考下面封装 ...
- JQ 文本超出
原链接:https://blog.csdn.net/sinat_32546159/article/details/56340528 <script type="text/javascr ...
- 零基础学习python_模块(50-52课)
今天学了下模块,那什么是模块呢?其实我们写的以py结尾的一个文件就是一个模块,模块也就是程序 还记得我们之前学过容器.函数.类吧 容器 -> 数据的封装 函数 -> ...
- win7 数据源只有 SQL SERVER, WIN7 64bit 环境使用 access 作为 CIS的数据源
最近换了个工作电脑,安装的是 WIN7 64BIT,结果配置CIS数据源的时候出现问题了,默认的数据源只有 SQL SERVER,没有ACCESS的数据源.后来在网上寻找了一圈后,找到了解决方法: C ...
- HTTP Status 400 - description The request sent by the client was syntactically incorrect.
HTTP Status 400 - type Status report message description The request sent by the client was syntacti ...
- HTML5 图片宽高自适应,居中裁剪不失真
一,使用 JS,先上效果图,右图为定死宽高的效果,左图为处理之后的 1, 主要思路是,在图片 onload 后,将图片的宽高比和 div 容器的宽高比进行比较, 2, 从而确定拉伸或者压缩之后是宽还是 ...