吴裕雄 python深度学习与实践

Posted 天生自然

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了吴裕雄 python深度学习与实践相关的知识,希望对你有一定的参考价值。

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深度学习与实践的主要内容,如果未能解决你的问题,请参考以下文章

吴裕雄 python深度学习与实践

吴裕雄 python深度学习与实践

吴裕雄 python深度学习与实践

吴裕雄 python深度学习与实践

吴裕雄 python深度学习与实践(17)

吴裕雄 python深度学习与实践(15)