├── 503indig2.py ├── 503input.csv ├── 503inwash2.py ├── LPSOSVR.py └── README.md /503indig2.py: -------------------------------------------------------------------------------- 1 | #['BOD5_ET', 'COD_ET', 'TN_ET', 'TP_ET', 'PH_ET', 'NH4_N_ET'] 2 | from sklearn import linear_model 3 | import numpy as np 4 | import pandas as pd 5 | import matplotlib.pylab as plt 6 | import matplotlib.dates as mdates 7 | from sklearn.decomposition import PCA 8 | from sklearn.model_selection import train_test_split 9 | from sklearn import svm 10 | from sklearn.model_selection import ShuffleSplit 11 | from sklearn.model_selection import cross_val_score 12 | from sklearn.model_selection import cross_val_predict 13 | from sklearn.metrics import r2_score,mean_squared_error 14 | from sklearn.cluster import KMeans 15 | from sklearn import metrics 16 | from sklearn.model_selection import KFold 17 | from sklearn.tree import DecisionTreeRegressor 18 | 19 | data = pd.read_csv('503afterwash2.csv',encoding='utf-8',index_col='YMD')#变成了dataframehahaxixi 20 | data.index = pd.to_datetime(data.index)#这一列作为时间序列 21 | #NH$从367开始有值 22 | datanp = np.array(data)[367:587] 23 | # print(datanp) 24 | # datain,dataout = np.split(datanp,(6,), axis=1)#分割输入输出 25 | # print(datain) 26 | # print(dataout) 27 | #ndarray变成list 28 | # datainlist = datain.tolist() 29 | # dataoutlist = dataout.tolist() 30 | # print(datainlist) 31 | # print(dataoutlist) 32 | #将有值的部分重新组成datafram 33 | data2 = pd.DataFrame(datanp,columns=['BOD5_ET', 'COD_ET', 'TN_ET', 'TP_ET', 'PH_ET', 'NH4_N_ET']) 34 | print(data2.tail()) 35 | 36 | #***********************维数选择**************************** 填补NH4的结果不错 37 | #相关性检验 结合相关性检验选择 DLQLTY BOD5_ET TN_ET TP_ET 作为输入 38 | print(data2.corr(method='pearson')['NH4_N_ET']) 39 | #pca检验需要的维数 效果不明显 40 | # pca = PCA(copy=True, iterated_power='auto', n_components=6, random_state=None, 41 | # svd_solver='randomized', tol=0.0, whiten=False) 42 | # a,b = np.split(datanp,(6,), axis=1) 43 | # print(a.tolist()) 把输入独立出来 44 | # pca.fit(a) 45 | # print(pca.explained_variance_ratio_) #输出主成分比例,也就是一维的时候,二维的时候,三维的时候 46 | def har(): 47 | index = ['NH4_N_ET','TN_ET','TP_ET','COD_ET','BOD5_ET',''] 48 | data = np.array(data2.corr(method='pearson')['NH4_N_ET']).tolist() 49 | # print(sorted(data)) 50 | plt.barh(bottom=(0,1,2,3,4,5),height=0.35,width=sorted(data)[::-1],align="center") 51 | plt.yticks((0,1,2,3,4,5),index) 52 | ax = plt.gca() 53 | ax.spines['right'].set_color('none')#ax的spines指的就是图形的四个边框,脊梁 54 | ax.spines['top'].set_color('none') 55 | ax.yaxis.set_ticks_position('left')#将左边的边框作为y轴 56 | ax.spines['left'].set_position(('data',0))#挪动边框 在哪个点落位,y轴在x等于-1落位 57 | plt.text(0.08, 4.85, 'PH_ET', ha='center', va= 'bottom',fontsize=10) 58 | plt.plot([0.3,0.3,0.3,0.3,0.3,0.3,0.3],[-1,0,1,2,3,4,5],color='red', linewidth=1.0, linestyle='--') 59 | plt.text(0.32, 4.5, 'corr=0.3', ha='left', va= 'bottom',fontsize=10,color='red') 60 | plt.show() 61 | har() 62 | datanp2 = np.array(data2.as_matrix(columns = ['BOD5_ET','COD_ET','TN_ET', 'TP_ET','NH4_N_ET'])) 63 | 64 | datain,dataout = np.split(datanp2,(4,), axis=1)#分割输入输出 65 | #输入输出的list 66 | k=220 #选择220条数据效果最好 67 | datain1 = datain[:k] 68 | dataout1 = dataout[:k] 69 | 70 | 71 | clf = linear_model.BayesianRidge(alpha_1=1000, alpha_2=1000, compute_score=False, 72 | copy_X=True, fit_intercept=True, lambda_1=1000, lambda_2=1000, 73 | n_iter=3000, normalize=False, tol=1000, verbose=False) 74 | clf1 = svm.SVR(kernel='linear', C=1,epsilon=5)#0.1 0.1 0.1就超越了贝叶斯 C影响较大,C越大运行越慢,epsilon越大运行越快 通过pso去优化C和epsilon的值 C和epsilon取在(0,5]优化 75 | clf2 = DecisionTreeRegressor(max_depth=4) 76 | def MAPE(true, pred): 77 | diff = np.abs(np.array(true) - np.array(pred)) 78 | return np.mean(diff / true) 79 | def testclf(clf): 80 | cv = ShuffleSplit(n_splits=5, train_size=0.8, random_state=0)#train_size表示的是整个数据数据集选多少train来训练 81 | scores = cross_val_score(clf, datain1, dataout1, cv=cv) 82 | print(scores) 83 | clf.fit(datain1,dataout1) 84 | predicted = clf.predict(datain[:k]) 85 | #print(r2_score(predicted,dataout[:k])) 86 | #检查预测结果和实际结果的相关性 87 | b = [] 88 | for n in dataout[:k]: 89 | b.append(n[0]) 90 | d = { 91 | 'predict':predicted.tolist(), 92 | 'true':b 93 | } 94 | datacor = pd.DataFrame(d) 95 | print(datacor.corr(method='pearson')) 96 | #print(MAPE(b,predicted.tolist())) 97 | # print('beiyesi:','*****************') 98 | # testclf(clf) 99 | # print('jueceshu:','*****************') 100 | # testclf(clf2) 101 | clf2 = DecisionTreeRegressor(max_depth=3) 102 | # print('svr:','*****************') 103 | # testclf(clf1) 104 | def kfoldtest(clf): 105 | score = [] 106 | r2s = [] 107 | corrs = [] 108 | kf=KFold(5,shuffle=False,random_state=0) 109 | x = datain[:k] 110 | y = dataout[:k] 111 | for train_index, test_index in kf.split(x,y): 112 | X_train, X_test, y_train, y_test = x[train_index], x[test_index], y[train_index], y[test_index] 113 | clf.fit(X_train,y_train) 114 | predicted = clf.predict(X_test) 115 | r2 = round(r2_score(predicted,y_test),3) 116 | r2s.append(r2) 117 | # print('r2_score2:',round(r2_score(predicted,y_test),3)) 118 | b = [] 119 | for i in y_test.tolist(): 120 | b.append(i[0]) 121 | d = { 122 | 'predict':predicted.tolist(), 123 | 'true':b 124 | } 125 | datacor = pd.DataFrame(d) 126 | corr = round(datacor.corr(method='pearson')['predict'][1],5) 127 | corrs.append(corr) 128 | score.append(r2s) 129 | score.append(corrs) 130 | return score 131 | # print('coor:',round(datacor.corr(method='pearson')['predict'][1],3)) 132 | print('svrkfold:','*****************') 133 | print(np.array(kfoldtest(clf1)[0]),np.array(kfoldtest(clf1)[1])) 134 | 135 | print('beiyesi:','*****************') 136 | print(np.array(kfoldtest(clf)[0]).mean(),np.array(kfoldtest(clf)[1]).mean()) 137 | print('jueceshu:','*****************') 138 | print(np.array(kfoldtest(clf2)[0]).mean(),np.array(kfoldtest(clf2)[1]).mean()) 139 | 140 | 141 | 142 | # print('svr',20*'*') 143 | # clf = svm.SVR(kernel='rbf', C=1000) 144 | # cv = ShuffleSplit(n_splits=5, test_size=0.2, random_state=0) 145 | # scores = cross_val_score(clf, datain1, dataout1, cv=cv) 146 | # print(scores) 147 | # clf.fit(datain1,dataout1) 148 | # predicted = clf.predict(datain[k:]) 149 | # # print(predicted) 150 | # print(r2_score(predicted,dataout[k:])) 151 | 152 | #**********************聚类分析******************* 153 | # datanp3 = np.array(data2.as_matrix(columns = ['BOD5_ET', 'COD_ET', 'TN_ET', 'TP_ET', 'PH_ET'])) 154 | # # print(datanp3.tolist()) 155 | # #Kmeans 156 | # clf = KMeans(n_clusters=8,algorithm='full',max_iter=1000) 157 | # km = clf.fit(datanp3.tolist()) 158 | # print(km.labels_) 159 | # #评价聚类模型 分成四维 160 | # a,b= np.split(datanp3,(258,), axis=0)#分割输入输出 161 | # def findharabaz_score(): 162 | # harabaz_score = [] 163 | # k = [x for x in range(4,121)] 164 | # for x in k: 165 | # clf = KMeans(n_clusters=x,algorithm='full',max_iter=1000) 166 | # km = clf.fit(a) 167 | # harabaz_score.append(metrics.calinski_harabaz_score(a,km.labels_)) 168 | # plt.figure() 169 | # plt.plot(k,harabaz_score)#往figure里面装数据 170 | # plt.show() 171 | # # findharabaz_score() #分成8维 172 | 173 | 174 | 175 | 176 | -------------------------------------------------------------------------------- /503input.csv: -------------------------------------------------------------------------------- 1 | YMD,BOD5_ET,COD_ET,TN_ET,TP_ET,PH_ET,NH4_N_ET 2 | 2008-01-01,218,478,61.6,5.09,7.87, 3 | 2008-01-02,159,344,65.7,4.99,7.75, 4 | 2008-01-03,149,324,65.5,4.78,7.88, 5 | 2008-01-04,147,313,64.2,4.99,8.06, 6 | 2008-01-05,122,264,50.9,3.86,7.82, 7 | 2008-01-06,151,325,63,5.4,7.79, 8 | 2008-01-07,183,351,62.8,5.25,7.89, 9 | 2008-01-08,175,340,65.2,5.97,7.8, 10 | 2008-01-09,217,453,72.5,6.18,7.92, 11 | 2008-01-10,130,282,70.5,4.94,7.75, 12 | 2008-01-11,169,353,60.6,5.71,7.82, 13 | 2008-01-12,225,446,65.5,5.92,7.63, 14 | 2008-01-13,162,352,55.3,5.3,7.79, 15 | 2008-01-14,175,375,66.2,6.18,7.71, 16 | 2008-01-15,165,338,69.3,6.02,7.83, 17 | 2008-01-16,155,338,63.5,6.33,7.81, 18 | 2008-01-17,158,343,64.7,6.12,7.95, 19 | 2008-01-18,187,407,57.7,5.71,7.88, 20 | 2008-01-19,198,432,61,5.92,7.82, 21 | 2008-01-20,204,420,58.2,5.35,7.8, 22 | 2008-01-21,190,397,56.3,5.71,7.83, 23 | 2008-01-22,192,381,62.2,5.92,7.84, 24 | 2008-01-23,194,419,58.7,5.97,7.95, 25 | 2008-01-24,251,492,61.2,4.63,8.07, 26 | 2008-01-25,197,432,62.2,5.9,8.01, 27 | 2008-01-26,191,417,60.3,5.29,7.75, 28 | 2008-01-27,184,375,58.2,5.55,7.92, 29 | 2008-01-28,162,350,72.3,5.9,7.99, 30 | 2008-01-29,165,332,65,4.88,7.95, 31 | 2008-01-30,158,328,65,5.75,7.98, 32 | 2008-01-31,179,379,66,5.39,7.95, 33 | 2008-03-01,205,394,59.5,5.57,7.81, 34 | 2008-03-02,170,364,52.4,4.86,7.66, 35 | 2008-03-03,167,338,61.6,6.55,7.92, 36 | 2008-03-04,134,263,52,4.51,7.92, 37 | 2008-03-05,162,310,51.5,4.91,7.9, 38 | 2008-03-06,132,264,54.2,4.66,7.91, 39 | 2008-03-07,197,393,58.8,5.67,7.95, 40 | 2008-03-08,218,459,62.5,5.37,7.86, 41 | 2008-03-09,185,345,56.8,5.37,7.96, 42 | 2008-03-10,134,268,59.5,5.37,7.92, 43 | 2008-03-11,119,253,50.4,4.51,7.88, 44 | 2008-03-12,190,366,62.2,5.92,7.91, 45 | 2008-03-13,174,340,66.6,5.32,7.86, 46 | 2008-03-14,158,340,60.9,5.37,7.94, 47 | 2008-03-15,147,292,63.4,4.76,7.92, 48 | 2008-03-16,141,287,53.6,4.36,8.06, 49 | 2008-03-17,138,278,58.1,4.81,7.94, 50 | 2008-03-18,209,409,58.1,5.92,7.88, 51 | 2008-03-19,204,390,57,5.37,7.86, 52 | 2008-03-20,157,335,56.5,5.62,7.98, 53 | 2008-03-21,135,296,59,4.91,7.92, 54 | 2008-03-22,157,343,54,4.76,7.96, 55 | 2008-03-23,147,304,55.6,4.66,7.76, 56 | 2008-03-24,189,379,55.6,5.77,7.86, 57 | 2008-03-25,178,358,57.2,6.1,7.91, 58 | 2008-03-26,161,309,62.5,5.65,7.91, 59 | 2008-03-27,235,437,57.7,5.85,7.84, 60 | 2008-03-28,208,449,56.5,6.3,7.8, 61 | 2008-03-29,187,408,55.8,5.7,7.84, 62 | 2008-03-30,139,268,57.4,4.84,7.9, 63 | 2008-03-31,206,417,54.3,5.7,7.89, 64 | 2008-04-01,128,249,53.2,4.84,7.84, 65 | 2008-04-02,174,379,57.4,6.45,7.81, 66 | 2008-04-03,207,404,61.4,6.4,7.87, 67 | 2008-04-04,161,349,58.3,5.6,7.67, 68 | 2008-04-05,151,328,52.3,4.79,8.06, 69 | 2008-04-06,201,438,57.4,6.1,7.84, 70 | 2008-04-07,218,454,61.6,7.01,7.95, 71 | 2008-04-08,227,436,57.6,8.27,7.82, 72 | 2008-04-09,169,373,54.5,6.51,7.94, 73 | 2008-04-10,207,407,61.2,6.66,7.87, 74 | 2008-04-11,158,341,55.8,5.85,7.83, 75 | 2008-04-12,121,261,55.6,4.69,7.94, 76 | 2008-04-13,131,291,50.3,5.14,7.63, 77 | 2008-04-14,241,445,55.8,6.45,7.86, 78 | 2008-04-15,235,455,55.2,6.66,7.84, 79 | 2008-04-16,227,442,57.6,6.2,7.86, 80 | 2008-04-17,185,408,58.1,6.81,7.84, 81 | 2008-04-18,184,402,59.4,6.2,7.87, 82 | 2008-04-19,141,306,57.9,5.09,7.84, 83 | 2008-04-20,150,327,58.1,5.6,7.88, 84 | 2008-04-21,286,576,35.9,6.75,7.7, 85 | 2008-04-22,145,309,39.4,4.99,7.74, 86 | 2008-04-23,163,361,49.2,5.8,7.89, 87 | 2008-04-24,177,357,57.8,5.6,7.87, 88 | 2008-04-25,162,355,53.3,5.7,7.82, 89 | 2008-04-26,185,403,48.1,4.48,7.85, 90 | 2008-04-27,146,308,57.2,4.33,7.92, 91 | 2008-04-28,168,357,59.1,6.71,7.79, 92 | 2008-04-29,186,376,58.5,6.39,7.87, 93 | 2008-05-01,214,469,53.5,6.97,7.85, 94 | 2008-05-02,164,315,59.3,6.02,7.83, 95 | 2008-05-03,141,303,55.7,4.92,7.86, 96 | 2008-05-04,196,429,40.1,5.81,7.86, 97 | 2008-05-05,194,375,56.5,5.71,7.88, 98 | 2008-05-06,141,273,53.7,5.71,7.81, 99 | 2008-05-07,117,260,53.9,5.28,7.77, 100 | 2008-05-08,152,331,56.3,6.49,7.83, 101 | 2008-05-09,181,394,58.2,6.23,7.8, 102 | 2008-05-10,156,346,56.5,6.23,7.89, 103 | 2008-05-11,149,323,56.3,5.39,7.73, 104 | 2008-05-12,156,338,50.7,5.81,7.76, 105 | 2008-05-13,159,317,56.3,5.55,7.88, 106 | 2008-05-14,150,326,55.9,5.6,7.82, 107 | 2008-05-15,198,400,53.1,5.92,7.74, 108 | 2008-05-16,158,341,52.8,4.97,7.95, 109 | 2008-05-17,111,238,44.2,4.13,7.89, 110 | 2008-05-18,178,347,51.1,5.44,7.82, 111 | 2008-05-19,165,330,56.1,4.76,7.91, 112 | 2008-05-20,212,411,53.9,5.55,7.91, 113 | 2008-05-21,135,256,55.4,4.55,7.96, 114 | 2008-05-22,187,361,57.6,5.65,7.83, 115 | 2008-05-23,171,375,55.7,5.92,7.81, 116 | 2008-05-24,238,458,55.2,6.23,7.79, 117 | 2008-05-25,183,399,56.5,5.39,7.74, 118 | 2008-05-26,192,384,55.9,5.97,7.81, 119 | 2008-05-27,211,449,53.3,5.39,7.82, 120 | 2008-05-28,176,382,71.7,5.55,7.82, 121 | 2008-05-29,206,427,54.8,5.81,7.93, 122 | 2008-05-30,191,418,59.3,5.86,7.92, 123 | 2008-05-31,193,385,57.2,6.28,7.92, 124 | 2008-06-01,162,362,55.4,5.81,7.97, 125 | 2008-06-02,186,380,53.1,6.07,7.92, 126 | 2008-06-03,175,355,59.3,6.12,7.87, 127 | 2008-06-04,185,394,56.5,5.81,7.9, 128 | 2008-06-05,217,429,53.1,5.6,7.89, 129 | 2008-06-06,184,360,58.2,6.59,7.88, 130 | 2008-06-07,179,398,49.2,6.59,7.88, 131 | 2008-06-08,225,437,57.2,6.38,7.88, 132 | 2008-06-09,183,355,50.9,5.86,7.86, 133 | 2008-06-10,185,376,55.7,6.17,7.94, 134 | 2008-06-11,194,384,56.7,6.28,7.85, 135 | 2008-06-12,156,344,48.7,5.23,7.82, 136 | 2008-06-13,208,398,53.1,5.55,7.91, 137 | 2008-06-14,242,542,40.3,6.12,7.98, 138 | 2008-06-15,224,502,44.6,4.97,7.92, 139 | 2008-06-16,142,287,58,4.92,7.91, 140 | 2008-06-17,164,348,38.6,4.3,7.98, 141 | 2008-06-18,116,254,50,5.34,7.96, 142 | 2008-06-19,157,350,50.5,5.44,7.93, 143 | 2008-06-20,168,373,39.1,5.91,7.8, 144 | 2008-06-21,131,254,46.2,4.4,7.87, 145 | 2008-06-22,149,330,50,4.82,7.77, 146 | 2008-06-23,198,440,43.3,5.34,7.84, 147 | 2008-06-24,125,251,47.8,4.19,7.8, 148 | 2008-06-25,192,396,52.4,5.04,7.8, 149 | 2008-06-26,212,426,59.1,7.74,7.82, 150 | 2008-06-27,163,358,58.4,4.99,7.91, 151 | 2008-06-28,145,318,51.1,5.14,7.85, 152 | 2008-06-29,199,428,57.4,5.4,7.85, 153 | 2008-06-30,195,391,61.3,5.3,7.86, 154 | 2008-07-01,206,461,55.5,5.35,7.84, 155 | 2008-07-02,156,342,51.9,5.45,7.83, 156 | 2008-07-03,158,347,58.3,5.45,7.8, 157 | 2008-07-04,175,384,56.7,5.24,7.78, 158 | 2008-07-05,217,466,45.7,4.84,7.86, 159 | 2008-07-06,153,335,41.1,4.48,7.93, 160 | 2008-07-07,218,470,56.5,5.14,7.96, 161 | 2008-07-08,194,374,53.5,4.99,7.93, 162 | 2008-07-09,179,394,62.2,4.58,7.96, 163 | 2008-07-10,173,380,52.3,4.89,8.02, 164 | 2008-07-11,163,357,67.3,5.3,7.98, 165 | 2008-07-12,159,393,60.2,5.7,7.99, 166 | 2008-07-13,262,578,63.2,5.24,7.99, 167 | 2008-07-14,193,391,75.7,4.99,8.1, 168 | 2008-07-15,185,367,80,5.35,7.84, 169 | 2008-07-16,117,256,56.2,3.66,7.86, 170 | 2008-07-17,161,353,51.5,4.73,7.93, 171 | 2008-07-18,119,259,56.3,4.43,7.86, 172 | 2008-07-19,163,359,43,4.22,7.91, 173 | 2008-07-20,167,367,64.5,5.86,7.89, 174 | 2008-07-21,172,368,55.1,4.48,7.84, 175 | 2008-07-22,180,360,65.6,5.24,7.84, 176 | 2008-07-23,160,352,53.5,5.4,7.89, 177 | 2008-07-24,153,335,63.1,5.4,7.8, 178 | 2008-07-25,175,385,65.6,4.68,7.72, 179 | 2008-07-26,167,368,52.6,4.99,7.85, 180 | 2008-07-27,177,388,57.2,4.58,7.99, 181 | 2008-07-28,148,315,63.3,4.17,7.98, 182 | 2008-07-29,146,295,59.7,3.95,8.1, 183 | 2008-07-30,141,308,50.5,4.8,7.82, 184 | 2008-07-31,167,367,56.2,4.25,7.74, 185 | 2008-08-01,141,286,37.5,3.35,7.73, 186 | 2008-08-02,161,352,47.3,4.4,7.98, 187 | 2008-08-03,159,323,47.3,4.4,7.86, 188 | 2008-08-04,149,324,54.8,3.95,7.81, 189 | 2008-08-05,165,350,58,4.6,7.82, 190 | 2008-08-06,167,362,53.7,4.3,7.78, 191 | 2008-08-07,158,346,54.1,4.45,7.77, 192 | 2008-08-08,148,324,52.3,3.65,7.82, 193 | 2008-08-09,152,330,57.3,4,7.78, 194 | 2008-08-10,147,317,50,4.5,7.79, 195 | 2008-08-11,153,311,50.5,3.6,7.7, 196 | 2008-08-12,111,247,40.4,3,7.93, 197 | 2008-08-13,118,256,42.9,3.4,7.95, 198 | 2008-08-14,130,282,50.3,3.15,7.93, 199 | 2008-08-15,118,256,39.9,3.05,7.91, 200 | 2008-08-16,129,280,44.8,3.4,7.99, 201 | 2008-08-17,102,217,42,3.15,7.63, 202 | 2008-08-18,117,259,46.7,3.55,7.78, 203 | 2008-08-19,156,326,42.3,4.65,7.66, 204 | 2008-08-20,159,344,52.8,4.35,7.8, 205 | 2008-08-21,143,311,51.2,3.85,7.84, 206 | 2008-08-22,134,294,43.2,3.6,7.77, 207 | 2008-08-23,151,335,54.3,4.3,7.9, 208 | 2008-08-24,119,263,47.2,3.55,8.13, 209 | 2008-08-25,127,243,47.7,3.71,7.66, 210 | 2008-08-26,138,276,47,3.35,7.72, 211 | 2008-08-27,139,308,39.9,3.61,7.92, 212 | 2008-08-28,128,278,61.8,3.61,7.94, 213 | 2008-08-29,119,257,46.5,3.81,7.96, 214 | 2008-08-30,196,427,54,4.53,7.56, 215 | 2008-08-31,160,346,46,3.61,7.98, 216 | 2008-09-01,150,337,54.5,4.37,7.87, 217 | 2008-09-02,143,313,54.7,4.73,7.88, 218 | 2008-09-03,158,321,53.6,4.32,7.92, 219 | 2008-09-04,172,338,54,4.51,7.84, 220 | 2008-09-05,150,326,56.4,4.12,7.8, 221 | 2008-09-06,167,366,50.7,4.42,7.96, 222 | 2008-09-07,158,337,53.3,4.27,7.9, 223 | 2008-09-08,137,296,44.2,4.88,7.87, 224 | 2008-09-09,142,282,51.7,3.86,7.89, 225 | 2008-09-10,120,240,42.2,2.99,7.91, 226 | 2008-09-11,120,262,49.3,3.2,7.88, 227 | 2008-09-12,138,303,51.4,4.12,7.88, 228 | 2008-09-13,129,283,55.8,5.14,7.89, 229 | 2008-09-14,141,309,53.1,4.42,7.74, 230 | 2008-09-15,168,374,54.6,4.27,7.92, 231 | 2008-09-16,157,361,53.4,4.53,7.83, 232 | 2008-09-17,145,318,52.2,4.17,7.81, 233 | 2008-09-18,149,324,55.6,4.02,7.88, 234 | 2008-09-19,148,322,54.8,4.32,7.82, 235 | 2008-09-20,134,335,55.8,4.78,7.95, 236 | 2008-09-21,139,302,61.9,5.19,7.78, 237 | 2008-09-22,140,307,40.8,4.12,7.76, 238 | 2008-09-23,145,286,47.8,3.81,7.7, 239 | 2008-09-24,144,312,59.7,4.42,7.76, 240 | 2008-09-25,128,279,54.4,4.61,7.74, 241 | 2008-09-26,109,240,56.3,4.71,7.85, 242 | 2008-09-27,191,408,59.2,4.76,7.84, 243 | 2008-09-28,142,278,53.4,4.41,7.87, 244 | 2008-09-29,114,261,51.7,3.86,7.77, 245 | 2008-09-30,111,237,44.7,3.96,7.83, 246 | 2008-10-01,110,244,53.6,3.51,7.73, 247 | 2008-10-02,173,386,57.5,4.51,7.78, 248 | 2008-10-03,154,336,60.4,4.96,7.8, 249 | 2008-10-04,137,331,61.6,4.71,7.78, 250 | 2008-10-05,146,318,53.9,4.71,7.83, 251 | 2008-10-06,138,300,49.7,4.06,7.83, 252 | 2008-10-07,147,320,55.6,5.01,7.87, 253 | 2008-10-08,119,259,48.3,3.91,7.62, 254 | 2008-10-09,102,220,47.3,3.11,7.8, 255 | 2008-10-10,152,333,55.8,4.71,7.85, 256 | 2008-10-11,129,278,57,6.36,7.91, 257 | 2008-10-12,171,343,54.3,4.01,7.97, 258 | 2008-10-13,164,328,61.1,5.96,7.99, 259 | 2008-10-14,134,298,53.4,4.31,7.82, 260 | 2008-10-15,162,354,60.7,5.96,7.76, 261 | 2008-10-16,119,265,49,3.66,7.76, 262 | 2008-10-17,163,357,64,5.76,7.77, 263 | 2008-10-18,171,373,60.7,5.16,7.78, 264 | 2008-10-19,166,363,59.7,4.71,7.84, 265 | 2008-10-20,174,376,61.1,5.06,7.78, 266 | 2008-10-21,154,345,60.6,4.91,7.82, 267 | 2008-10-22,124,269,46.4,4.82,7.82, 268 | 2008-10-23,227,501,49.5,5.08,7.81, 269 | 2008-10-24,149,324,48,4.02,7.88, 270 | 2008-10-25,119,260,54.4,6.24,7.84, 271 | 2008-10-26,167,367,49.3,5.13,7.97, 272 | 2008-10-27,194,433,57.1,5.83,7.89, 273 | 2008-10-28,154,343,49.8,5.18,7.88, 274 | 2008-10-29,143,314,52.4,5.53,7.88, 275 | 2008-10-30,156,340,52.4,5.33,7.91, 276 | 2008-10-31,114,258,48.9,4.47,7.87, 277 | 2008-11-01,150,328,46.2,4.87,7.9, 278 | 2008-11-02,131,271,49.5,3.76,7.81, 279 | 2008-11-03,144,275,37.5,4.67,7.88, 280 | 2008-11-04,128,280,51.8,4.57,7.64, 281 | 2008-11-05,156,341,54,6.44,8.04, 282 | 2008-11-06,128,277,47.5,4.72,7.96, 283 | 2008-11-07,115,250,45.1,4.32,7.44, 284 | 2008-11-08,129,280,40.9,3.61,7.98, 285 | 2008-11-09,136,291,45.8,3.96,7.99, 286 | 2008-11-10,137,299,48.4,3.56,7.8, 287 | 2008-11-11,124,262,48.9,5.23,7.97, 288 | 2008-11-12,172,374,56.3,5.28,7.67, 289 | 2008-11-13,185,409,55.4,5.73,7.71, 290 | 2008-11-14,168,369,48.3,4.97,7.76, 291 | 2008-11-15,203,441,56.3,5.63,7.86, 292 | 2008-11-16,144,312,50.8,4.42,7.93, 293 | 2008-11-17,114,249,48.3,3.81,7.78, 294 | 2008-11-18,197,394,58.6,5.28,7.66, 295 | 2008-11-19,121,262,45.4,5.48,7.86, 296 | 2008-11-20,145,320,54.9,5.03,7.87, 297 | 2008-11-21,172,376,57,5.08,7.79, 298 | 2008-11-22,171,374,53.8,4.72,7.74, 299 | 2008-11-23,164,360,50.4,4.72,7.73, 300 | 2008-11-24,145,332,55.2,4.77,7.87, 301 | 2008-11-25,144,311,49,5.22,8.29, 302 | 2008-11-26,200,427,53.3,5.32,7.9, 303 | 2008-11-27,177,386,53.6,5.27,7.84, 304 | 2008-11-28,167,361,53.8,5.37,7.92, 305 | 2008-11-29,167,363,54.5,4.86,7.87, 306 | 2008-11-30,152,328,58.4,5.32,7.93, 307 | 2008-12-01,171,366,53.3,5.52,7.88, 308 | 2008-12-02,153,336,56.8,5.57,7.56, 309 | 2008-12-03,173,378,54.5,5.67,7.88, 310 | 2008-12-04,157,351,56.5,5.32,7.87, 311 | 2008-12-05,220,483,52.9,5.77,7.92, 312 | 2008-12-06,181,399,55.4,5.82,7.87, 313 | 2008-12-07,153,334,55.2,4.96,7.84, 314 | 2008-12-08,177,397,49.9,5.42,7.88, 315 | 2008-12-09,162,349,52.6,5.12,7.73, 316 | 2008-12-10,168,354,53.1,4.76,7.89, 317 | 2008-12-11,136,295,51.7,4.71,7.88, 318 | 2008-12-12,173,378,53.2,5.17,7.89, 319 | 2008-12-13,175,380,50.4,4.76,7.95, 320 | 2008-12-14,157,342,55.8,4.86,7.9, 321 | 2008-12-15,157,336,56.5,4.96,7.91, 322 | 2008-12-16,170,369,59.7,4.91,7.75, 323 | 2008-12-17,175,372,55.6,5.22,7.86, 324 | 2008-12-18,151,331,54.5,4.71,7.74, 325 | 2008-12-19,191,428,53.1,5.22,7.78, 326 | 2008-12-20,131,283,53.6,4.36,7.77, 327 | 2008-12-21,176,392,55.9,5.37,7.82, 328 | 2008-12-22,164,357,56.5,5.47,7.78, 329 | 2008-12-23,144,296,51.1,4.36,7.75, 330 | 2008-12-24,157,338,51.5,5.37,7.64, 331 | 2008-12-25,176,396,51.1,5.57,7.77, 332 | 2008-12-26,192,419,53.3,5.22,7.78, 333 | 2008-12-27,162,366,57.7,4.61,7.74, 334 | 2008-12-28,179,393,53.1,5.47,7.75, 335 | 2008-12-29,138,304,54.8,4.41,7.76, 336 | 2008-12-30,162,353,65,4.76,7.71, 337 | 2008-12-31,169,364,53.6,4.96,7.74, 338 | 2009-01-01,205,450,53.6,5.15,7.74, 339 | 2009-01-02,131,286,52.2,5.35,7.73, 340 | 2009-01-03,131,290,48.3,4.56,7.68, 341 | 2009-01-04,138,304,51.1,5.5,7.71, 342 | 2009-01-05,161,342,43,3.77,7.61, 343 | 2009-01-06,167,358,50.4,5,7.44, 344 | 2009-01-07,176,386,55.9,4.96,7.67, 345 | 2009-01-08,178,391,52.7,5.35,7.71, 346 | 2009-01-09,175,390,43.3,5.25,7.66, 347 | 2009-01-10,153,338,51.1,5.2,7.28, 348 | 2009-01-11,167,365,43.3,5.45,7.86, 349 | 2009-01-12,156,340,52.4,4.96,7.62, 350 | 2009-01-13,165,344,52.9,4.91,7.62, 351 | 2009-01-14,170,374,53.3,5,7.74, 352 | 2009-01-15,326,651,57.2,5.4,7.78, 353 | 2009-01-16,201,400,49,5.2,7.67, 354 | 2009-01-17,165,361,53.9,4.71,7.65, 355 | 2009-01-18,164,353,49.2,5.75,7.8, 356 | 2009-01-19,166,360,52.7,5.45,7.62, 357 | 2009-01-20,218,473,52.2,5.7,7.67, 358 | 2009-01-21,183,381,46,5.2,7.74, 359 | 2009-01-22,170,365,42.7,5.4,7.78, 360 | 2009-01-23,146,285,42.9,4.71,7.78, 361 | 2009-01-24,125,269,41.6,4.31,7.88, 362 | 2009-01-25,176,385,47.5,4.36,7.72, 363 | 2009-01-26,165,372,45.2,4.76,7.65, 364 | 2009-01-27,124,270,51.6,4.21,7.67, 365 | 2009-01-28,136,301,47.1,4.91,7.78, 366 | 2009-01-29,134,292,52.5,4.11,7.75, 367 | 2009-01-30,151,332,51.9,4.91,7.87, 368 | 2009-01-31,150,325,53.5,4.71,7.76, 369 | 2009-02-01,167,367,45.9,4.92,7.79,35.7 370 | 2009-02-02,201.0,410,51.1,5.26,7.66,40.2 371 | 2009-02-03,192,373,53.2,5.21,7.67,40.5 372 | 2009-02-04,156,338,53.9,4.82,7.76,41.3 373 | 2009-02-05,162,354,54.9,4.57,7.92,42.2 374 | 2009-02-06,206,444,47.9,5.12,7.82,37.6 375 | 2009-02-07,127,272,46.1,4.06,7.64,35 376 | 2009-02-08,168,366,24.1,4.67,7.72,11 377 | 2009-02-09,188,408.0,48.4,5.21,7.24,35.8 378 | 2009-02-10,185,403,49.1,4.96,7.69,36.5 379 | 2009-02-11,199,422,51.8,6.26,7.55,39.3 380 | 2009-02-12,169,366,48.4,5.26,7.71,35.9 381 | 2009-02-13,230,483,45.9,7.96,7.78,33.3 382 | 2009-02-14,230,491,52,6.01,7.75,37.3 383 | 2009-02-15,133,296,47.2,4.12,7.81,34.2 384 | 2009-02-16,125,270,44,4.02,7.88,31.6 385 | 2009-02-17,135,296,52.7,5.46,7.62,40.2 386 | 2009-02-18,181,398,52.5,5.56,7.65,39.9 387 | 2009-02-19,156,335,55,4.96,7.87,42.5 388 | 2009-02-20,150,327,55.5,5.06,7.88,43 389 | 2009-02-21,182,392,55,4.72,7.85,43 390 | 2009-02-22,197,431,53.1,5.62,7.93,40.2 391 | 2009-02-23,155,328,55.5,6.36,7.65,43 392 | 2009-02-24,166,362,60.9,8.42,7.68,48.5 393 | 2009-02-25,172,376,55.5,5.06,7.65,43 394 | 2009-02-26,169,362,56.8,5.06,7.87,44.5 395 | 2009-02-27,171,375,52.3,4.66,7.73,39.9 396 | 2009-02-28,180,393,52,5.33,7.7,39 397 | 2009-03-01,181,394,56.8,5.06,7.86,41 398 | 2009-03-02,202,424,56.6,5.26,7.24,44.2 399 | 2009-03-03,168,361,54.8,5.76,7.79,43.3 400 | 2009-03-04,178,388,59.3,5.44,7.75,47 401 | 2009-03-05,189,402,61.8,4.45,7.78,50 402 | 2009-03-06,189,404,60,4.64,7.48,48.2 403 | 2009-03-07,162,349,62.5,4.79,7.65,50 404 | 2009-03-08,162,352,56.3,4.69,7.8,44.4 405 | 2009-03-09,211,412,60.3,5.19,7.68,48.5 406 | 2009-03-10,175,382,51.5,4.59,7.78,39.7 407 | 2009-03-11,167,360,61.5,5.04,7.78,49.7 408 | 2009-03-12,247,525,58.5,4.84,7.76,46.6 409 | 2009-03-13,149,320,60,4.89,7.78,48.2 410 | 2009-03-14,146,314,55,4.84,7.69,44.7 411 | 2009-03-15,128,282,60,5.19,7.8,48.5 412 | 2009-03-16,179,388,55.3,5.24,7.84,42.5 413 | 2009-03-17,224,469,64,5.78,7.76,50.3 414 | 2009-03-18,245,523,61.8,5.53,7.85,47.5 415 | 2009-03-19,215,450,59.8,5.34,7.88,47.8 416 | 2009-03-20,172,375,65.3,5.09,7.91,53.5 417 | 2009-03-21,169,362,70.8,5.24,7.82,55.7 418 | 2009-03-22,170,367,58.8,4.89,7.95,48.5 419 | 2009-03-23,182,392,60,5.19,7.45,48.2 420 | 2009-03-24,171,370,61.3,4.94,7.52,49.4 421 | 2009-03-25,160,347,63.5,4.54,7.75,51.6 422 | 2009-03-26,169,370,61.5,4.84,7.64,49.7 423 | 2009-03-27,158,364,62.8,4.99,7.68,51 424 | 2009-03-28,171,372,67.5,5.14,7.54,55.7 425 | 2009-03-29,180,391,56.8,6.23,7.76,43.8 426 | 2009-03-30,183,403,62,4.95,7.65,50 427 | 2009-03-31,170,402,71.3,4.8,7.36,58.2 428 | 2009-04-01,205,449,63.3,4.65,7.79,51.3 429 | 2009-04-02,186,372,68.5,5.25,7.81,56.6 430 | 2009-04-03,198,427,69,6.35,7.88,57.2 431 | 2009-04-04,178,386,72.5,5.44,7.85,62.8 432 | 2009-04-05,172,376,81.8,5.2,7.81,67.8 433 | 2009-04-06,199,415,58.5,5.6,7.8,45.7 434 | 2009-04-07,207,432,60.5,5.35,7.84,47.8 435 | 2009-04-08,242,501,63.5,5.35,7.88,51.6 436 | 2009-04-09,279,568,62.5,5.4,7.89,52.2 437 | 2009-04-10,225,462,70.8,5.4,7.84,59.7 438 | 2009-04-11,197,429,64,4.9,7.79,50.7 439 | 2009-04-12,159,325,72,6.05,7.77,56.3 440 | 2009-04-13,230,491,62.3,6.25,7.76,52.2 441 | 2009-04-14,197,431,58.3,4.7,7.57,46.3 442 | 2009-04-15,245,506,70,5.65,7.68,59.1 443 | 2009-04-16,195,398,66.3,5.35,7.63,54.4 444 | 2009-04-17,211,455,65.3,5.65,7.68,53.5 445 | 2009-04-18,171,376,56,5.1,7.64,43.8 446 | 2009-04-19,220,474,72.5,7.45,7.71,60.7 447 | 2009-04-20,184,413,62.4,5,7.45,50.5 448 | 2009-04-21,214,431,59.4,5.35,7.71,47.4 449 | 2009-04-22,219,445,67.4,5.35,7.69,55.4 450 | 2009-04-23,254,521,63,5.45,7.87,51.1 451 | 2009-04-24,308,646,49.1,6.6,7.89,37.9 452 | 2009-04-25,212,466,50.7,4.9,7.74,37.7 453 | 2009-04-26,154,317,56.4,5.2,7.67,44.5 454 | 2009-04-27,148,313,47.7,4.25,7.78,35.4 455 | 2009-04-28,223,465,90.5,5.85,7.89,78.7 456 | 2009-04-29,161,352,43.4,5.05,7.68,31.1 457 | 2009-04-30,210,449,65.1,5.22,7.78,54.9 458 | 2009-05-01,218,473,62.5,5.38,7.67,51.4 459 | 2009-05-02,242,502,56.4,3.92,7.75,44.3 460 | 2009-05-03,154,337,52.6,4.78,7.67,41.4 461 | 2009-05-04,181,394,51.2,4.28,7.78,40.5 462 | 2009-05-05,204,417,49.8,4.48,7.47,39 463 | 2009-05-06,169,364,57.1,4.22,7.68,45.2 464 | 2009-05-07,137,298,38.3,3.92,7.48,25.8 465 | 2009-05-08,381,756,45.8,5.98,7.55,34.6 466 | 2009-05-09,132,282,42,3.78,7.44,29 467 | 2009-05-10,148,317,55.2,3.68,7.83,45.2 468 | 2009-05-11,152,301,51.4,4.22,7.59,39.6 469 | 2009-05-12,132,282,58.5,4.58,7.69,46.4 470 | 2009-05-13,176,380,52.1,4.68,7.78,40.2 471 | 2009-05-14,158,337,42.5,4.12,7.79,30.5 472 | 2009-05-15,181,390,59.2,5.52,7.79,47.2 473 | 2009-05-16,174,386,63.2,5.18,7.69,49 474 | 2009-05-17,190,407,46.7,4.82,7.78,36.1 475 | 2009-05-18,191,422,59.2,5.02,7.62,47.2 476 | 2009-05-19,185,410,55.7,4.62,7.71,43.7 477 | 2009-05-20,208,425,72.4,5.02,7.79,63.1 478 | 2009-05-21,218,441,57.3,5.12,7.69,45.5 479 | 2009-05-22,217,442,54.5,4.72,7.76,42.5 480 | 2009-05-23,178,352,62.3,4.82,7.49,46.1 481 | 2009-05-24,188,387,56.4,6.42,7.85,43.1 482 | 2009-05-25,172,432,54.7,5.32,7.68,44.9 483 | 2009-05-26,203,444,61.6,6.38,7.58,49.6 484 | 2009-05-27,207,480,59.2,4.94,7.68,47.2 485 | 2009-05-28,142,345,55,4.49,7.73,41.9 486 | 2009-05-29,172,385,50.7,6.24,7.63,38.4 487 | 2009-05-30,197,446,56.8,6.08,7.65,45.8 488 | 2009-05-31,137,317,52.4,5.58,7.67,40.5 489 | 2009-06-01,198,400,56.1,5.68,7.74,44.3 490 | 2009-06-02,184,431,59,5.04,7.84,46.6 491 | 2009-06-03,195,481,53.6,4.94,7.88,41.6 492 | 2009-06-04,278,664,55.7,5.68,7.85,43.4 493 | 2009-06-05,207,515,55,5.94,7.85,43.1 494 | 2009-06-06,166,315,49.1,4.94,7.56,36.9 495 | 2009-06-07,180,445,53.6,4.98,7.71,40.8 496 | 2009-06-08,174,381,58.3,5.98,7.68,46.4 497 | 2009-06-09,313,710,39.2,6.18,7.54,23.7 498 | 2009-06-10,157,433,50.7,4.88,7.65,38.4 499 | 2009-06-11,185,369,50.5,5.34,7.56,38.7 500 | 2009-06-12,148,386,53.2,5.04,7.64,38.5 501 | 2009-06-13,153,359,52.3,5.38,7.62,40.4 502 | 2009-06-14,153,354,49.4,5.28,7.74,37.9 503 | 2009-06-15,168,365,45.7,4.68,7.62,33.8 504 | 2009-06-16,167,380,49,4.94,7.69,36.5 505 | 2009-06-17,196,453,42.9,4.64,7.58,30.5 506 | 2009-06-18,161,384,51.8,4.58,7.68,41.9 507 | 2009-06-19,157,415,48.9,4.74,7.53,36.5 508 | 2009-06-20,143,314,52.3,3.84,7.65,40.5 509 | 2009-06-21,164,325,48.3,4.58,7.87,34.6 510 | 2009-06-22,193,381,46.4,5.38,7.86,33.9 511 | 2009-06-23,146,346,53.2,4.64,7.87,41.4 512 | 2009-06-24,166,429,50.7,4.78,7.88,38.8 513 | 2009-06-25,158,357,48.6,4.58,7.89,37.9 514 | 2009-06-26,148,376,47.5,4.68,7.34,37.1 515 | 2009-06-27,175,407,54.4,5.14,7.69,41.4 516 | 2009-06-28,140,312,53.2,4.84,7.7,38.2 517 | 2009-06-29,134,293,38.6,3.54,7.68,26.8 518 | 2009-06-30,194,386,53,4.98,7.74,40.5 519 | 2009-07-01,182,360,50,5.05,7.59,38.5 520 | 2009-07-02,174,343,55,4.09,7.74,43.1 521 | 2009-07-03,176,350,55.7,4.6,7.79,43.9 522 | 2009-07-04,178,333,53.3,4.04,7.73,40.5 523 | 2009-07-05,142,327,50.2,4.6,7.67,39.9 524 | 2009-07-06,256,505,50.2,5.35,7.25,38.2 525 | 2009-07-07,142,332,49.8,4.39,7.31,37.7 526 | 2009-07-08,160,378,55.5,3.99,7.36,43.7 527 | 2009-07-09,115,268,64,4.55,7.69,52.5 528 | 2009-07-10,175,364,50.5,4.55,7.71,38.8 529 | 2009-07-11,103,241,56.9,4.7,7.73,41.4 530 | 2009-07-12,198,381,55,6.77,7.63,42.2 531 | 2009-07-13,205,386,47.5,4.75,7.65,35.7 532 | 2009-07-14,106,216,54.8,2.78,7.74,31.9 533 | 2009-07-15,159,330,46.6,4.7,7.88,34.8 534 | 2009-07-16,156,367,48.6,4.34,7.67,36.8 535 | 2009-07-17,156,351,54.6,4.6,7.65,42.8 536 | 2009-07-18,169,324,39.7,2.98,7.79,26.5 537 | 2009-07-19,120,284,47.3,4.8,7.85,35.9 538 | 2009-07-20,169,382,26.5,2.58,7.56,13.7 539 | 2009-07-21,129,292,39.5,3.59,7.66,27.7 540 | 2009-07-22,98.6,231,49.8,3.33,7.68,37.9 541 | 2009-07-23,181,302,41.3,3.18,7.67,29.4 542 | 2009-07-24,116,214,41.8,2.58,7.75,29.9 543 | 2009-07-26,164,360,51,4.65,7.75,36.8 544 | 2009-07-27,236,508,51.2,3.84,7.75,39.7 545 | 2009-07-28,165,354,48.9,5.05,7.68,37.4 546 | 2009-07-29,155,335,55.3,4.79,7.75,44.8 547 | 2009-07-30,152,326,49.1,4.89,7.82,36.8 548 | 2009-07-31,158,391,44.1,4.18,7.83,31.4 549 | 2009-08-01,112,248,40,3.63,7.91,27.3 550 | 2009-08-02,98.7,214,36.2,4.38,7.94,24.1 551 | 2009-08-04,134,292,42.1,4.18,7.9,30.2 552 | 2009-08-06,115,282,44.2,4.64,7.82,32.3 553 | 2009-08-10,91.8,182,40.9,3.22,7.65,32.9 554 | 2009-08-11,132,295,51.2,3.93,7.92,39.4 555 | 2009-08-13,158,381,42.1,4.48,7.88,33.5 556 | 2009-08-15,131,295,51.2,4.08,7.82,34.6 557 | 2009-08-16,123,265,48.2,3.32,7.62,34.6 558 | 2009-08-17,124,269,42.5,3.93,7.8,32.6 559 | 2009-08-18,154,317,46.8,4.74,7.95,37 560 | 2009-08-20,160,301,38.8,3.73,7.93,28.8 561 | 2009-08-21,206,353,46.3,3.98,7.98,36.4 562 | 2009-08-22,156,334,46.3,4.89,7.87,36.4 563 | 2009-08-23,159,350,47,4.48,7.92,35.2 564 | 2009-08-24,140,308,54.1,4.64,8.29,44.1 565 | 2009-08-25,159,345,48.2,4.38,8.17,38.2 566 | 2009-08-27,230,420,44,4.69,7.88,34.1 567 | 2009-08-28,169,393,52.4,4.38,7.96,42.3 568 | 2009-08-29,107,230,52.6,4.18,7.92,42 569 | 2009-08-30,149,307,54.2,5.04,7.89,44 570 | 2009-08-31,202,443,47.1,4.89,7.92,39.1 571 | 2009-09-01,170,363,51.9,4.22,7.8,42 572 | 2009-09-03,201,433,48.9,4.52,7.94,36 573 | 2009-09-04,216,457,49.1,5.12,7.92,37.2 574 | 2009-09-05,258,520,46,4.87,7.86,36 575 | 2009-09-06,217,457,42.5,4.47,7.85,31.7 576 | 2009-09-07,235,497,50.3,4.47,8.05,39.5 577 | 2009-09-08,202,443,47.6,4.57,7.88,37.5 578 | 2009-09-10,271,560,58.2,4.92,7.89,44 579 | 2009-09-11,242,443,52.8,4.62,7.93,38.9 580 | 2009-09-12,187,377,51.4,5.22,7.87,41.9 581 | 2009-09-13,192,410,50.2,4.97,7.91,40 582 | 2009-09-14,193,420,52.3,5.47,7.99,43.3 583 | 2009-09-15,119,260,41.5,3.67,7.98,29.2 584 | 2009-09-17,177,383,50.2,5.07,7.98,36.6 585 | 2009-09-18,179,400,49.2,4.87,7.88,31.6 586 | 2009-09-19,130,273,60.1,4.72,7.87,44.8 587 | 2009-09-20,130,287,53.7,4.82,7.81,43.9 588 | 2009-09-21,198,433,47.8,4.62,7.88,34.8 589 | 2009-09-22,196,430,49.7,4.72,7.89, 590 | 2009-09-24,221,477,50.4,5.62,7.91, 591 | 2009-09-25,220,473,46.4,4.37,7.88, 592 | 2009-09-26,121,267,45.2,3.17,7.81, 593 | 2009-09-27,174,377,43.4,3.82,7.88, 594 | 2009-09-28,138,293,42.9,4.48,7.98, 595 | 2009-09-29,122,267,41.7,2.94,7.94, 596 | 2009-11-01,137,303,47.8,3.72,7.86, 597 | 2009-11-02,202,427,50.4,4.58,8.04, 598 | 2009-11-03,207,417,52,4.58,7.98, 599 | 2009-11-04,210,450,47.5,5.28,7.8, 600 | 2009-11-05,219,467,45.2,5.43,7.98, 601 | 2009-11-06,211,453,47.1,4.52,7.85, 602 | 2009-11-07,168,367,59.3,4.62,7.96, 603 | 2009-11-08,186,387,51.5,4.78,7.98, 604 | 2009-11-09,190,393,51.8,5.18,8.04, 605 | 2009-11-10,168,357,48,4.98,8.01, 606 | 2009-11-12,170,373,41.9,4.32,7.96, 607 | 2009-11-15,178,387,51.4,4.93,7.91, 608 | 2009-11-16,184,373,47.4,4.42,7.89, 609 | 2009-11-17,180,393,55.2,5.43,7.85, 610 | 2009-11-24,182,403,47.4,4.88,7.88, 611 | 2009-11-27,188,430,65.5,4.98,7.89, 612 | 2009-11-29,158,360,57.3,4.31,7.88, 613 | 2009-11-30,184,420,51.2,5.17,7.78, 614 | 2009-12-01,172,387,54.7,6.29,7.79, 615 | 2009-12-02,180,390,51.9,5.07,7.81, 616 | 2009-12-03,192,463,53.3,5.17,7.81, 617 | 2009-12-04,174,427,54,4.91,7.79, 618 | 2009-12-05,183,420,53.3,4.76,7.69, 619 | 2009-12-06,190,413,52.4,5.12,7.83, 620 | 2009-12-07,196,423,50,4.66,7.76, 621 | 2009-12-08,192,433,52.1,4.91,7.98, 622 | 2009-12-09,218,457,42.2,5.47,7.96, 623 | 2009-12-10,212,447,50.7,5.07,7.82, 624 | 2009-12-11,252,527,49.3,5.37,7.96, 625 | 2009-12-12,193,403,57.3,5.17,7.59, 626 | 2009-12-13,175,357,51.6,5.63,7.64, 627 | 2009-12-14,199,437,51.2,5.27,7.72, 628 | 2009-12-15,206,463,55.2,5.73,7.75, 629 | 2009-12-16,318,683,126,5.74,8.25, 630 | 2009-12-17,215,450,62.9,5.58,8.3, 631 | 2009-12-18,214,463,58.5,5.53,7.98, 632 | 2009-12-19,185,377,54,5.42,7.87, 633 | 2009-12-20,172,360,49.8,5.12,7.85, 634 | 2009-12-21,180,413,56.1,5.02,7.86, 635 | 2009-12-22,214,457,55.9,4.71,7.68, 636 | 2009-12-23,298,637,55.6,5.22,7.85, 637 | 2009-12-24,206,450,54.7,4.71,7.88, 638 | 2009-12-25,201,450,53.3,5.12,7.65, 639 | 2009-12-26,202,393,70,5.02,7.96, 640 | 2009-12-27,215,447,44.8,5.58,7.95, 641 | 2009-12-28,216,443,53.5,4.94,7.88, 642 | 2009-12-29,200,427,54.7,4.68,7.85, 643 | 2009-12-30,184,410,53.7,5.04,7.89, 644 | 2009-12-31,182,420,43.6,5.3,7.85, 645 | 2010-01-01,196,423,57,4.33,7.81, 646 | 2010-01-02,185,403,50.2,4.73,7.88, 647 | 2010-01-03,167,370,57,4.48,7.9, 648 | 2010-01-04,144,317,54,4.84,7.92, 649 | 2010-01-05,194,427,55.9,5.35,7.68, 650 | 2010-01-06,188,437,55.4,4.79,7.97, 651 | 2010-01-07,180,423,55.4,4.38,7.95, 652 | 2010-01-08,192,413,56.8,4.12,7.95, 653 | 2010-01-09,162,397,47.4,4.63,7.62, 654 | 2010-01-10,176,373,54.2,4.43,7.92, 655 | 2010-01-11,212,463,54.9,4.68,7.92, 656 | 2010-01-12,184,407,54.2,5.19,7.89, 657 | 2010-01-13,204,420,54,4.68,7.81, 658 | 2010-01-14,178,417,55.9,4.63,7.85, 659 | 2010-01-15,180,420,49.7,4.63,7.82, 660 | 2010-01-16,187,413,54.2,5.09,7.78, 661 | 2010-01-17,184,393,53.5,5.19,7.74, 662 | 2010-01-18,206,440,52.3,4.48,7.72, 663 | 2010-01-19,246,497,58.9,5.3,7.74, 664 | 2010-01-20,234,507,54,5.3,7.76, 665 | 2010-01-21,205,450,51.9,5.09,7.68, 666 | 2010-01-22,201,477,52.6,5.19,7.78, 667 | 2010-01-23,191,440,53.3,5.09,7.78, 668 | 2010-01-24,210,447,54,5.14,7.81, 669 | 2010-01-25,206,453,45,4.94,7.86, 670 | 2010-01-26,252,463,48.4,5.3,7.55, 671 | 2010-01-27,209,513,58.1,5.7,7.62, 672 | 2010-01-28,178,433,52,5.19,7.78, 673 | 2010-01-29,174,420,52.7,5.35,7.85, 674 | 2010-01-30,222,483,53.2,5.14,7.7, 675 | 2010-01-31,196,443,50.8,5.5,7.22, 676 | 2010-03-01,234,612,39.2,51.6,7.87, 677 | 2010-03-02,212,364,40.1,52.5,7.89, 678 | 2010-03-03,199,428,41.6,55.1,7.88, 679 | 2010-03-04,180,366,39.2,52.3,7.87, 680 | 2010-03-05,185,260,42.7,55.1,7.9, 681 | 2010-03-06,196,272,43.3,55.8,7.87, 682 | 2010-03-07,166,202,40.7,53,7.68, 683 | 2010-03-08,198,284,39.2,51.6,7.81, 684 | 2010-03-09,204,292,39.5,51.8,7.83, 685 | 2010-03-10,186,202,45.1,57.5,7.82, 686 | 2010-03-11,172,240,39.5,51.8,7.86, 687 | 2010-03-12,179,224,42.4,54.7,7.82, 688 | 2010-03-13,196,250,43,56.3,7.79, 689 | 2010-03-14,175,276,40.7,56.3,7.68, 690 | 2010-03-15,210,344,36.9,49,7.73, 691 | 2010-03-16,197,256,39.5,50.9,7.75, 692 | 2010-03-17,180,380,46,56.5,7.78, 693 | 2010-03-18,183,336,40.7,53,7.76, 694 | 2010-03-19,190,254,41.6,54,7.75, 695 | 2010-03-20,207,270,43.9,58.9,7.79, 696 | 2010-03-21,274,290,45.1,57.7,7.83, 697 | 2010-03-22,292,785,43.9,56.3,7.72, 698 | 2010-03-23,209,334,37.1,50.2,7.74, 699 | 2010-03-24,238,346,43.3,54.9,7.68, 700 | 2010-03-25,226,400,42.3,55.4,7.67, 701 | 2010-03-26,158,278,32.1,44.6,7.74, 702 | 2010-03-27,220,226,36.3,47.6,7.79, 703 | 2010-03-28,252,286,44.6,59.9,7.76, 704 | 2010-03-29,214,480,42.1,54.4,7.69, 705 | 2010-03-30,220,596,42.3,54.9,7.7, 706 | 2010-03-31,149,252,34.1,46.7,7.78, -------------------------------------------------------------------------------- /503inwash2.py: -------------------------------------------------------------------------------- 1 | #['BOD5_ET', 'COD_ET', 'TN_ET', 'TP_ET', 'PH_ET', 'NH4_N_ET'] 2 | import numpy as np 3 | import pandas as pd 4 | import matplotlib.pylab as plt 5 | import matplotlib.dates as mdates 6 | #z分数的计算 7 | def zscore(std,mean,data): 8 | zscore = abs(data - mean)/std 9 | return np.float64(zscore).item() 10 | #时间序列 11 | def drawtime(data,name): 12 | list = [] 13 | for i in range(len(data)): 14 | list.append(3) 15 | ax = plt.gca() 16 | xfmt = mdates.DateFormatter('%y-%m-%d') 17 | ax.xaxis.set_major_formatter(xfmt) 18 | plt.plot(data.index,data[name]) 19 | plt.plot(data.index,list,color='red', linewidth=1.0, linestyle='--') 20 | plt.xlim(('2008-3-1','2010-4-1')) 21 | plt.ylabel(name,fontproperties='SimHei') 22 | plt.show() 23 | 24 | data = pd.read_csv('../503input.csv',encoding='utf-8',index_col='YMD')#变成了dataframehahaxixi 25 | data.index = pd.to_datetime(data.index)#这一列作为时间序列 26 | dataout = data.copy() 27 | 28 | #计算每个元素的z分数 29 | def calculatezscore(dataout,data): 30 | k=0 31 | for i in dataout.columns: 32 | std = dataout[i].std() 33 | mean = dataout[i].mean() 34 | for j in range(len(dataout)): 35 | if np.isnan(dataout[i][j]): 36 | data[i][j] = -1 37 | else: 38 | data[i][j] = round(zscore(std,mean,dataout[i][j]),3) 39 | k = k+1 40 | #检查z分数 41 | def checkzscore(data): 42 | list = [] 43 | for i in data.columns: 44 | print(data[i][data[i]>3]) 45 | list.append(len(data[i][data[i]>3])) 46 | plt.bar(data.columns, list) 47 | plt.xlabel(u"The water quality parameters") 48 | plt.ylabel(u"Z-score abnormal statistics") 49 | for a,b in zip(data.columns,list): 50 | plt.text(a, b+0.01, '%.0f' % b, ha='center', va= 'bottom',fontsize=12) 51 | plt.show() 52 | calculatezscore(dataout,data) 53 | # print(data.head()) 54 | # print(data.tail()) 55 | #查看z分数超标的数据 56 | print(20*'*','chakanzfenshuchaobiaodeshuju1') 57 | checkzscore(data) 58 | drawtime(data,'TP_ET') 59 | #查看这个时间段的tp的数据 60 | # print(data.loc['2010-03-01':'2010-03-31','TP_ET']) 61 | #经过分析将这个时间段的数据全部除以10 62 | dataout.loc['2010-03-01':'2010-03-31','TP_ET'] = dataout.loc['2010-03-01':'2010-03-31','TP_ET']/10 63 | #print(dataout.loc['2010-03-01':'2010-03-31','TP_ET']) 64 | 65 | #清洗后再次求z分数 66 | calculatezscore(dataout,data) 67 | #查看z分数超标的数据 68 | print(20*'*','chakanzfenshuchaobiaodeshuju2') 69 | checkzscore(data) 70 | #拿到z分数的list 71 | #print(data['DLQLTY']) 72 | #print(datanp) 73 | #前后三天的统计学均值填补 74 | def changedata(dataout,data): 75 | datanp = pd.DataFrame(np.array(data)) 76 | k = 0 77 | for i in dataout.columns: 78 | list = [] 79 | scoreindex = datanp[k][datanp[k]>3].index.tolist() 80 | #print(scoreindex) 81 | for j in scoreindex: 82 | for n in range(1,4): 83 | if j+n>704: 84 | break 85 | if data[i][j+n]!=-1: 86 | list.append(dataout[i][j+n]) 87 | for n in range(1,4): 88 | if j-n<0: 89 | break 90 | if data[i][j-n]!=-1: 91 | list.append(dataout[i][j-n]) 92 | dataout[i][j] = round(np.mean(np.array(list)),4) 93 | k = k+1 94 | #***************第一次优化z分数********************** 95 | print(20*'*','changedata1') 96 | changedata(dataout,data) 97 | calculatezscore(dataout,data) 98 | checkzscore(data) 99 | print(20*'*','changedata2') 100 | changedata(dataout,data) 101 | calculatezscore(dataout,data) 102 | checkzscore(data) 103 | #时间序列散点图 104 | dataout.to_csv('503afterwash2.csv') 105 | def drawtime1(data,name): 106 | list = [] 107 | for i in range(len(data)): 108 | list.append(3) 109 | ax = plt.gca() 110 | xfmt = mdates.DateFormatter('%y-%m-%d') 111 | ax.xaxis.set_major_formatter(xfmt) 112 | plt.scatter(data.index,data[name]) 113 | # plt.plot(data.index,list,color='red', linewidth=1.0, linestyle='--') 114 | plt.xlim(('2008-3-1','2010-4-1')) 115 | plt.ylabel(name,fontproperties='SimHei') 116 | plt.show() 117 | drawtime1(dataout,'NH4_N_ET') 118 | #柱状图 119 | def drawbar(data): 120 | list = [] 121 | for i in data.columns: 122 | list.append(len(data[i][data[i]>0])) 123 | plt.bar(data.columns, list) 124 | plt.xlabel(u"The water quality parameters") 125 | plt.ylabel(u"The amount of data") 126 | for a,b in zip(data.columns,list): 127 | plt.text(a, b+0.01, '%.0f' % b, ha='center', va= 'bottom',fontsize=12) 128 | plt.show() 129 | drawbar(data) 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /LPSOSVR.py: -------------------------------------------------------------------------------- 1 | from sklearn import linear_model 2 | import numpy as np 3 | import pandas as pd 4 | from sklearn import svm 5 | from sklearn.metrics import r2_score 6 | from sklearn.model_selection import KFold 7 | import random 8 | import copy 9 | 10 | data = pd.read_csv('503afterwash2.csv',encoding='utf-8',index_col='YMD') 11 | data.index = pd.to_datetime(data.index) 12 | datanp = np.array(data.as_matrix(columns = ['BOD5_ET','COD_ET','TN_ET', 'TP_ET','NH4_N_ET']))[367:587] 13 | 14 | datain,dataout = np.split(datanp,(4,), axis=1)#分割输入输出 15 | clf = svm.SVR(kernel='linear', C=0.1,epsilon=0.01)#0.1 0.1 0.1就超越了贝叶斯 C影响较大,C越大运行越慢,epsilon越大运行越快 都在(0,0.3]之间取值 16 | #返回五次迭代的平均分 通过决定系数的平均分来评定模型的好坏 17 | def kfoldtest(clf): 18 | r2s = [] 19 | corrs = [] 20 | kf=KFold(5,shuffle=False,random_state=0) 21 | x = datain 22 | y = dataout 23 | for train_index, test_index in kf.split(x,y): 24 | X_train, X_test, y_train, y_test = x[train_index], x[test_index], y[train_index], y[test_index] 25 | clf.fit(X_train,y_train) 26 | predicted = clf.predict(X_test) 27 | r2 = round(r2_score(predicted,y_test),3) 28 | r2s.append(r2) 29 | # print('r2_score2:',round(r2_score(predicted,y_test),3)) 30 | b = [] 31 | for i in y_test.tolist(): 32 | b.append(i[0]) 33 | d = { 34 | 'predict':predicted.tolist(), 35 | 'true':b 36 | } 37 | datacor = pd.DataFrame(d) 38 | corr = round(datacor.corr(method='pearson')['predict'][1],5) 39 | corrs.append(corr) 40 | # print('r2_array: ',r2s) 41 | # print('corrs_array: ',corrs) 42 | return np.array(r2s),np.array(corrs) 43 | def getsvr(list): 44 | return svm.SVR(kernel='linear', C=list[0],epsilon=list[1]) 45 | print(kfoldtest(getsvr([0.025413940665258837,0.10838556640556057]))) 46 | 47 | #***************************LPSO************************************* 48 | birds=8#10只鸟 49 | xcount=2#2个维度 50 | pos=[]#坐标[[],[],[],[],[]...........] 每只鸟的位置 51 | speed=[]#速度[[],[],[],[],[]..........] 每只鸟的速度 52 | bestpos=[]#这只鸟最好的坐标。[[],[],[],[]......]每一个元素装着对应鸟自己的最好的位置 53 | birdsbestpos=[]#所有鸟目前最好的坐标。[]这个list装着所有鸟最好的位置 54 | w=0.8#权重 55 | c1=2 #学习因子,通常为2 56 | c2=2#学习因子 57 | r1=0.6#通常为0到1的随机数 58 | r2=0.3 59 | for i in range(birds): 60 | pos.append([]) 61 | speed.append([]) 62 | bestpos.append([]) 63 | 64 | def GenerateRandVec(list): 65 | for i in range(xcount): 66 | list.append(random.uniform(0,5)) 67 | 68 | for i in range(birds): #initial all birds' pos,speed 69 | GenerateRandVec(pos[i]) 70 | GenerateRandVec(speed[i]) 71 | bestpos[i]=copy.deepcopy(pos[i]) 72 | 73 | def FindBirdsMostPos(): #找所有鸟的最佳位置,这是下一次迭代的标准 74 | best=kfoldtest(getsvr((bestpos[0]))) 75 | index=0 76 | for i in range(birds): 77 | temp=kfoldtest(getsvr((bestpos[i]))) 78 | if temp>best: 79 | best=temp 80 | index=i 81 | return bestpos[index] 82 | 83 | birdsbestpos=FindBirdsMostPos() #initial birdsbestpos 84 | 85 | def NumMulVec(num,list): # 常数乘以向量 86 | for i in range(len(list)): 87 | list[i]*=num #(vi1,vi2,vi1,vi2,vi1)→w*(vi1,vi2,vi1,vi2,vi1) 88 | 89 | return list 90 | 91 | def VecSubVec(list1,list2): #向量减去向量 92 | for i in range(len(list1)): 93 | list1[i]-=list2[i] 94 | return list1 95 | 96 | def VecAddVec(list1,list2): #向量加上向量 97 | for i in range(len(list1)): 98 | list1[i]+=list2[i] 99 | return list1 100 | 101 | def VecAddVec1(list1,list2): #向量加上向量 更新位置专用 102 | list3 = list1.copy() 103 | for i in range(len(list1)): 104 | list1[i]+=list2[i] 105 | if list1[0]>0 and list1[1]>0: #and list1[0]<0.4 and list1[1]<0.4: 106 | return list1 107 | list1 = list3.copy() 108 | return list1 109 | 110 | def UpdateSpeed(): 111 | #global speed 112 | for i in range(birds): 113 | temp1=NumMulVec(w,speed[i][:]) 114 | temp2=VecSubVec(bestpos[i][:],pos[i]) 115 | temp2=NumMulVec(c1*r1,temp2[:]) 116 | temp1=VecAddVec(temp1[:],temp2) 117 | temp2=VecSubVec(birdsbestpos[:],pos[i]) 118 | temp2=NumMulVec(c2*r2,temp2[:]) 119 | speed[i]=VecAddVec(temp1,temp2) 120 | 121 | def UpdatePos(n): 122 | global bestpos,birdsbestpos 123 | for i in range(birds): 124 | pos[i] = VecAddVec1(pos[i],speed[i]) 125 | # print(pos[i]) 126 | #如果更新的位置比原来的好,就替换,更新局部最优 127 | if kfoldtest(getsvr((pos[i])))>kfoldtest(getsvr((bestpos[i]))): 128 | bestpos[i]=copy.deepcopy(pos[i]) 129 | #及时跟新全局最优 130 | birdsbestpos=FindBirdsMostPos() 131 | w = 0.8+0.5*((1-(n/100)**2)**5) 132 | 133 | # for i in range(50): 134 | # #print birdsbestpos 135 | # print(i,birdsbestpos,kfoldtest(getsvr(birdsbestpos))) 136 | # UpdateSpeed() 137 | # UpdatePos(i) 138 | 139 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #基于pso算法和sklearn的算法包实现了pso-svr算法,优化svr预测模型的参数选择 2 | --------------------------------------------------------------------------------