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()