媒介
比来翻开各大支流APP呈现得最多的无非就是世界杯了,四年一度的世界杯可谓是国际上最有目共睹的角逐之一了。
那么那两天趁着空闲时间,通过机器进修的办法来预测一下2022卡塔尔世界杯小组赛的成果 ,先上预测成果:
p1 预测成果(1)p2 预测成果(2)世界杯小组赛中允许平手,但是因为模子的原因,那里仅展现了胜负两种情况,下面会说到(模子训练部门)。
当然,预测成果也仅仅是预测成果罢了。本文权当成是笔者兴趣摸索的思绪,接纳的数据集及数据特征比力简单,所用的机器进修算法也是简单的算法,有其他大佬会用到更多的特征更优的算法停止预测(以至于,农户关于各收球队的赔率也用上了),训练出来的模子更贴合现实。笔者的思绪如下:
一、数据筹办、数据预处置及特征工程1-数据筹办
本文用到的数据集是来自kaggle的一份公开数据集(数据链接),数据集描述的是记录了1870年-2022年期间所有国际性足球角逐成果(但我看了仿佛奥运会没有)。
那么起头筹办数据。
先导入需要的包pandas并读取数据集。pandas可谓是python中停止数据处置最牛逼的存在了。
import pandas as pd df = pd.read_csv(results.csv)查看数据特征及前5条信息:
print(df.info()) print(df.head())一共有9列,4.4w行数据:
p3 数据集概略数据集记录着角逐时间、主客队名称、主客队进球数、赛事名称、角逐城市及国度、能否中立,此中tournament为赛事名称,我看了一下里面的角逐,什么角逐都有记录(奥运会除外),以至友谊赛也有。为了数据具有代表性,笔者那里考虑只拔取大型角逐的数据,做为一个非足球喜好者,网上冲浪了很长时间,末于在百度百科找到了比力大型的国际足球赛事名称,同时为了样本量多一些,那里将上述赛事的资格赛也算上了。
p4 国际性足球角逐target_tournament = [ UEFA Nations League, UEFA Euro qualification, UEFA Euro, Oceania Nations Cup qualification, Oceania Nations Cup, Gold Cup qualification, Gold Cup, FIFA World Cup qualification, FIFA World Cup, Copa América, CONIFA European Football Cup, CONIFA Africa Football Cup, Confederations Cup, CONCACAF Nations League qualification, CONCACAF Nations League, African Cup of Nations qualification, African Cup of Nations, AFC Asian Cup qualification, AFC Asian Cup ] df_target = df.loc[df.tournament.isin(target_tournament)]之前的思绪是先取2018年俄罗斯世界杯(2018-6-14)之前的数据训练模子,对俄罗斯世界杯小组赛的参赛步队停止预测,然后预测成果与现实的成果停止比照,验证模子的准确性,故那里先挑选了2018-6-14之前的数据,并将无关特征去掉,仅留下主客队名称、主客队进球数及日期(日期留下的原因是后面想预测2022年卡特尔世界杯小组赛时把2018年之后的数据导入进来,但因为懒,后面间接用2018-6-14之前的数据了。)
df_target = df_target.loc[df_target.date < 2018-6-14] df_target = df_target.drop([tournament, city, country, neutral], axis=1)好了,数据选好了,共有17749条数据,均无缺失值,主客队进球数均为浮点型,没有其他问题。
2-特征构造
操纵现有的四个特征构造更多的特征:每场角逐的成果(result)、主队参赛次数(home_times)、客队参赛次数(away_times)、主队成功次数(home_win)、客队成功次数(away_win)、主队胜率(home_rate_of_win)、客队胜率(away_rate_of_win)、主队总进球数(home_goal)、客队总进球数(away_goal)、主队场均进球(home_avg_goal)、客队场均进球(away_avg_goal)。同时约定每场角逐的成果(result),主队胜置为1,客队胜置为2,平手置为0。特征构造代码如下:
# 每场角逐的成果(result) df_target[result] = df_target.apply(lambda x: 1 if x[home_score] > x[away_score] else 2 if x[home_score] < x[away_score] else 0,axis=1) # 主队参赛次数(home_times)、客队参赛次数(away_times):将主客队累计参赛数传入字典,并通过apply()获取字典key值对应的value home_times_dict = df_target[home_team].value_counts().to_dict() away_times_dict = df_target[away_team].value_counts().to_dict() sum_times_dict = sum_dict(home_times_dict,away_times_dict) df_target[home_times] = df_target[home_team].apply(lambda x: sum_times_dict[x]) df_target[away_times] = df_target[away_team].apply(lambda x: sum_times_dict[x]) # 主队成功次数(home_win)、客队成功次数(away_win)同上 home_win_dict = df_target.loc[df_target.result == 1,home_team].value_counts().to_dict() away_win_dict = df_target.loc[df_target.result == 2,away_team].value_counts().to_dict() sum_win_dict = sum_dict(home_win_dict,away_win_dict) df_target[home_win] = df_target.apply(lambda x: sum_win_dict[x[home_team]] if x[home_team] in sum_win_dict.keys() else 0,axis=1) df_target[away_win] = df_target.apply(lambda x: sum_win_dict[x[away_team]] if x[away_team] in sum_win_dict.keys() else 0,axis=1) # 主队胜率(home_rate_of_win)、客队胜率(away_rate_of_win)间接计算 df_target[home_rate_of_win] = df_target.apply(lambda x: x[home_win] / x[home_times],axis=1) df_target[away_rate_of_win] = df_target.apply(lambda x: x[away_win] / x[away_times],axis=1) # 主队总进球数(home_goal)、客队总进球数(away_goal)、主队场均进球(home_avg_goal)、客队场均进球(away_avg_goal):先算总进球数,再间接计算算场均进球数 home_goal_dict = df_target[[home_team,home_score]].groupby(home_team).sum().to_dict()[home_score] away_goal_dict = df_target[[away_team, away_score]].groupby(away_team).sum().to_dict()[away_score] sum_goal_dict = sum_dict(home_goal_dict,away_goal_dict) df_target[home_goal] = df_target[home_team].apply(lambda x: sum_goal_dict[x]) df_target[away_goal] = df_target[away_team].apply(lambda x: sum_goal_dict[x]) df_target[home_avg_goal] = df_target.apply(lambda x: x[home_goal] / x[home_times],axis=1) df_target[away_avg_goal] = df_target.apply(lambda x: x[away_goal] / x[away_times], axis=1)趁便提一下,特征构造的时候,有屡次用到字典数据计算的处所,所以定义了一个计算字典的函数:
def sum_dict(dict1, dict2): temp = dict() for key in dict1.keys() | dict2.keys(): temp[key] = sum([d.get(key, 0) for d in (dict1, dict2)]) return temp至此,特征构造完毕,共有包罗日期在内的16个特征,所有数据都存放在名为df_target的DateFrame中。
p5 名为df_target的DateFrame3-数据预处置
除日期、主客队名称、及角逐成果外,其余特征均尺度化,此处用的尺度分数的办法,也能够利用其他无量纲化的办法。
尺度分数(z-score)是一个分数与均匀数的差再除以尺度差的过程,用公式暗示为:z=(x-μ)/σ。此中x为某一详细分数,μ为均匀数,σ为尺度差。
df_feature = df_target.drop([date,home_team,away_team,result],axis=1) df_normalizing = (df_feature - df_feature.mean()) / (df_feature.std())尺度化后的数据与主客队名称及成果(result)毗连起来,做为机器进修的数据集。
data_set = pd.concat([df_target[[home_team, away_team]],df_normalizing,df_target[result]],axis=1) data_set = data_set.reset_index(drop=True)那里没有定性或者离散型的数据,所以不消停止哑编码或者独热编码。
至此,数据清洗及特征工程根本完成,那里我先保留到csv文件中,同时笔者还保留了一份没有带主客队名称的数据集
data_set.to_csv(data_set_with_team_name.csv,encoding=utf-8,index=False) 二、模子训练1-划分训练集、测试集
导入机器进修涉及到的包,及上一步保留的数据集:
from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn.metrics import mean_absolute_error, accuracy_score, f1_score, precision_score, recall_score from sklearn import svm from sklearn.ensemble import RandomForestClassifier from sklearn.neural_network import MLPClassifier from sklearn.tree import DecisionTreeClassifier data_set = pd.read_csv(data_set.csv)挪用train_test_split()办法,划分训练集和测试集,此中home_score、away_score为成果导向的特征,不做为机器进修的特征训练。
X = data_set.drop([result,home_score,away_score],axis=1) # 模子改良3中,削减特征home_goal及away_goal准确率会略微高一点 y = data_set[result] X_train,X_test,y_train,y_test = train_test_split(X,y,test_size=0.3,random_state=7)此中X_train为训练特征,y_train为训练目的,X_test为测试特征,y_test为测试目的,test_size为测试集的占比,此处取30%;random_state为随机数种子,只要不为0或者空即可。
2-模子训练
起头模子训练,此处利用逻辑回归算法、撑持向量机算法、随机丛林算法、神经收集算法、决策树算法停止模子训练,代码如下:
# 挪用逻辑回归算法 print("=====逻辑回归算法=====") logreg = LogisticRegression(C=1,solver=liblinear,multi_class =auto) logreg.fit(X_train, y_train) score_log = logreg.score(X_train, y_train) score2_log = logreg.score(X_test, y_test) y_log_pred = logreg.predict(X_test) print("训练集精度: ", %.3f % score_log) print("测试集精度: ", %.3f % score2_log) print("均匀绝对误差: ",mean_absolute_error(y_test,y_log_pred)) # print(Precision: %.3f % precision_score(y_test, y_log_pred)) # print(Recall: %.3f % recall_score(y_test, y_log_pred)) # print(Accuracy: %.3f % accuracy_score(y_test, y_log_pred)) # print(F1 Score: %.3f % f1_score(y_test, y_log_pred)) # 挪用SVM撑持向量机算法 print("=====SVM撑持向量机=====") clf = svm.SVC(C=0.1, kernel=linear, decision_function_shape=ovr) clf.fit(X_train, y_train) score_svm = clf.score(X_train, y_train) score2_svm = clf.score(X_test, y_test) y_svm_pred = clf.predict(X_test) print("训练集精度: ", %.3f % score_svm) print("测试集精度: ", %.3f % score2_svm) print("均匀绝对误差: ",mean_absolute_error(y_test,y_svm_pred)) # print(Precision: %.3f % precision_score(y_test, y_svm_pred)) # print(Recall: %.3f % recall_score(y_test, y_svm_pred)) # print(Accuracy: %.3f % accuracy_score(y_test, y_svm_pred)) # print(F1 Score: %.3f % f1_score(y_test, y_svm_pred)) # 挪用随机丛林算法 print("=====随机丛林算法=====") rf = RandomForestClassifier(max_depth=20,n_estimators=1000,random_state=0) rf.fit(X_train, y_train) score_rf = rf.score(X_train, y_train) score2_rf = rf.score(X_test, y_test) y_rf_pred = rf.predict(X_test) print("训练集精度: ", %.3f % score_rf) print("测试集精度: ", %.3f % score2_rf) print("均匀绝对误差: ",mean_absolute_error(y_test,y_rf_pred)) # print(Precision: %.3f % precision_score(y_test, y_rf_pred)) # print(Recall: %.3f % recall_score(y_test, y_rf_pred)) # print(Accuracy: %.3f % accuracy_score(y_test, y_rf_pred)) # print(F1 Score: %.3f % f1_score(y_test, y_rf_pred)) # 挪用神经收集算法 print("=====神经收集算法=====") mlp = MLPClassifier(hidden_layer_sizes=10,max_iter=1000) mlp.fit(X_train, y_train) score_mlp = mlp.score(X_train, y_train) score2_mlp = mlp.score(X_test, y_test) y_mlp_pred = mlp.predict(X_test) print("训练集精度: ", %.3f % score_mlp) print("测试集精度: ", %.3f % score2_mlp) print("均匀绝对误差: ",mean_absolute_error(y_test,y_mlp_pred)) # print(Precision: %.3f % precision_score(y_test, y_mlp_pred)) # print(Recall: %.3f % recall_score(y_test, y_mlp_pred)) # print(Accuracy: %.3f % accuracy_score(y_test, y_mlp_pred)) # print(F1 Score: %.3f % f1_score(y_test, y_mlp_pred)) # 挪用决策树算法 print("=====决策树算法=====") tree=DecisionTreeClassifier(max_depth=50,random_state=0) tree.fit(X_train, y_train) score_tree = tree.score(X_train, y_train) score2_tree = tree.score(X_test, y_test) y_tree_pred = tree.predict(X_test) print("训练集精度: ", %.3f % score_tree) print("测试集精度: ", %.3f % score2_tree) print("均匀绝对误差: ",mean_absolute_error(y_test,y_tree_pred)) # print(Precision: %.3f % precision_score(y_test, y_tree_pred)) # print(Recall: %.3f % recall_score(y_test, y_tree_pred)) # print(Accuracy: %.3f % accuracy_score(y_test, y_tree_pred)) # print(F1 Score: %.3f % f1_score(y_test, y_tree_pred))模子训练成果如下:
"D:\00python logLLL\python.exe" D:/案例/FIFA/机器进修.py =====逻辑回归算法===== 训练集精度: 0.619 测试集精度: 0.614 均匀绝对误差: 0.45746774546249724 =====SVM撑持向量机===== 训练集精度: 0.617 测试集精度: 0.614 均匀绝对误差: 0.45724907063197023 =====随机丛林算法===== 训练集精度: 0.785 测试集精度: 0.550 均匀绝对误差: 0.5650557620817844 =====神经收集算法===== 训练集精度: 0.619 测试集精度: 0.614 均匀绝对误差: 0.4614038924119834 =====决策树算法===== 训练集精度: 0.785 测试集精度: 0.506 均匀绝对误差: 0.6260660397988191 历程已完毕,退出代码0四种算法精度仅为六成摆布,均匀绝对误差都五成摆布,申明模子是欠好的,只因于那里所用到逻辑回归算法、撑持向量机算法、随机丛林算法、神经收集算法、决策树算法均为典型的二分类算法,笔者此前在构造特征的时候,角逐成果为三种情况——胜、平、负,有三个分类。
df_target[result] = df_target.apply(lambda x: 1 if x[home_score] > x[away_score] else 2 if x[home_score] < x[away_score] else 0,axis=1)从头查抄数据源,发现平手的数据有3265条,占比21%:
p6 机器进修数据集平手的数据占比挺多的,间接去掉必定会影响模子,但是因为时间关系,同时考虑到世界杯仅在小组赛中允许平手,进入裁减赛后只要胜负两种成果,所以那里笔者不能不先将平手的情况去掉。
data_set = data_set.loc[data_set.result != 0]从头跑下模子,此时模子的成果为:
"D:\00python logLLL\python.exe" D:/案例/FIFA/机器进修.py =====逻辑回归算法===== 训练集精度: 0.782 测试集精度: 0.794 均匀绝对误差: 0.20623434455886447 Precision: 0.809 Recall: 0.896 Accuracy: 0.794 F1 Score: 0.850 =====SVM撑持向量机===== 训练集精度: 0.783 测试集精度: 0.790 均匀绝对误差: 0.209852490954634 Precision: 0.803 Recall: 0.899 Accuracy: 0.790 F1 Score: 0.848 =====随机丛林算法===== 训练集精度: 0.893 测试集精度: 0.768 均匀绝对误差: 0.23211800723629278 Precision: 0.800 Recall: 0.859 Accuracy: 0.768 F1 Score: 0.828 =====神经收集算法===== 训练集精度: 0.784 测试集精度: 0.793 均匀绝对误差: 0.20706930141942667 Precision: 0.806 Recall: 0.900 Accuracy: 0.793 F1 Score: 0.850 =====决策树算法===== 训练集精度: 0.893 测试集精度: 0.739 均匀绝对误差: 0.2607848594489285 Precision: 0.772 Recall: 0.852 Accuracy: 0.739 F1 Score: 0.810 历程已完毕,退出代码0算法的精度有所进步,均匀绝对误差有所下降,但是在现实工做中,那种精度大多是不被承受的,但是鉴于本文的摸索性量,此处将不再停止模子改进,间接在那几种算法中选择一种停止预测。此中Precision、Recall、Accuracy、F1 Score别离代表切确度、召回率、准确性、F1分数,甭管,数值越大越牛逼。
3-2022年卡塔尔世界杯小组赛预测
综合比照了各项性能目标,笔者决定选用逻辑回归算法停止预测。
p7 世界杯小组赛分组起首读取2022年卡塔尔世界杯小组赛的对阵情况及之前保留的数据集:
df_group_match_2022 = pd.read_csv(2022_World_Cup.csv) df_info = pd.read_csv(data_set_with_team_name.csv)在数据集data_set_with_team_name.csv中婚配32收小组赛步队的特征信息:
home_info_dict = df_info[[home_team,home_times,home_win,home_rate_of_win,home_goal,home_avg_goal]].groupby(home_team).mean().to_dict() away_info_dict = df_info[[away_team,away_times,away_win,away_rate_of_win,away_goal,away_avg_goal]].groupby(away_team).mean().to_dict() df_group_match_2022[home_times] = df_group_match_2022.apply(lambda x: home_info_dict[home_times][x[home_team]],axis=1) df_group_match_2022[away_times] = df_group_match_2022.apply(lambda x: away_info_dict[away_times][x[away_team]],axis=1) df_group_match_2022[home_win] = df_group_match_2022.apply(lambda x: home_info_dict[home_win][x[home_team]],axis=1) df_group_match_2022[away_win] = df_group_match_2022.apply(lambda x: away_info_dict[away_win][x[away_team]],axis=1) df_group_match_2022[home_rate_of_win] = df_group_match_2022.apply(lambda x: home_info_dict[home_rate_of_win][x[home_team]],axis=1) df_group_match_2022[away_rate_of_win] = df_group_match_2022.apply(lambda x: away_info_dict[away_rate_of_win][x[away_team]],axis=1) # df_group_match_2022[home_goal] = df_group_match_2022.apply(lambda x: home_info_dict[home_goal][x[home_team]],axis=1) # df_group_match_2022[away_goal] = df_group_match_2022.apply(lambda x: away_info_dict[away_goal][x[away_team]],axis=1) df_group_match_2022[home_avg_goal] = df_group_match_2022.apply(lambda x: home_info_dict[home_avg_goal][x[home_team]],axis=1) df_group_match_2022[away_avg_goal] = df_group_match_2022.apply(lambda x: away_info_dict[away_avg_goal][x[away_team]],axis=1) df_group_match_2022[result] = None挪用训练好的模子停止预测:
output_info = df_group_match_2022 pred_set = df_group_match_2022.drop([match_index,主队,客队,home_team,away_team,result],axis=1) predictions = logreg.predict(pred_set) for i in range(48): print(====*==== + output_info.iloc[i, 0] + ====*====) print(output_info.iloc[i, 1] + Vs. + output_info.iloc[i, 2]) if predictions[i] == 1: print(Winner: + output_info.iloc[i, 1]) else: print(Winner: + output_info.iloc[i, 2]) print(output_info.iloc[i, 1] + --胜出的可能性为: + %.3f % (logreg.predict_proba(pred_set)[i][0])) print(output_info.iloc[i, 2] + --胜出的可能性为: + %.3f % (logreg.predict_proba(pred_set)[i][1])) print(===========*============) print()输出成果即是本文一开头展现的预测成果啦。
4-用模子去“预测”2018年俄罗斯世界杯小组赛
前文笔者说到,思绪是先取2018年俄罗斯世界杯(2018-6-14)之前的数据训练模子,对俄罗斯世界杯小组赛的参赛步队停止"预测",然后"预测"成果与现实的成果停止比照,验证模子的准确性,再去预测2022年卡塔尔世界杯小组赛的成果。但鉴于模子的局限性,数据的不完整性,特征拔取等各方面的原因,2018年俄罗斯世界杯小组赛“预测成果”与现实成果的准确率不是很高,所以本文仅为机器进修摸索的思绪,没有严谨性及科学性所言。那里能够放下跑出来的成果(如下):
大要统计了一下,48场角逐,模子跑出来的成果胜利了26场,胜利率54%;但模子中是不考虑平手的,若将现实成果中的9场平手舍去,胜利率66.7%
"D:\00python logLLL\python.exe" D:/案例/FIFA/改良3-削减特征.py =====逻辑回归算法===== 训练集精度: 0.782 测试集精度: 0.794 均匀绝对误差: 0.20623434455886447 Precision: 0.809 Recall: 0.896 Accuracy: 0.794 F1 Score: 0.850 Saudi Arabia Vs. Russia Winner:Saudi Arabia Saudi Arabia--胜出的可能性为:0.591 Russia--胜出的可能性为:0.409 ============= Uruguay Vs. Egypt Winner:Uruguay Uruguay--胜出的可能性为:0.694 Egypt--胜出的可能性为:0.306 ============= Iran Vs. Morocco Winner:Iran Iran--胜出的可能性为:0.837 Morocco--胜出的可能性为:0.163 ============= Portugal Vs. Spain Winner:Portugal Portugal--胜出的可能性为:0.574 Spain--胜出的可能性为:0.426 ============= France Vs. Australia Winner:France France--胜出的可能性为:0.711 Australia--胜出的可能性为:0.289 ============= Argentina Vs. Iceland Winner:Argentina Argentina--胜出的可能性为:0.968 Iceland--胜出的可能性为:0.032 ============= Peru Vs. Denmark Winner:Peru Peru--胜出的可能性为:0.521 Denmark--胜出的可能性为:0.479 ============= Croatia Vs. Nigeria Winner:Croatia Croatia--胜出的可能性为:0.763 Nigeria--胜出的可能性为:0.237 ============= Costa Rica Vs. Serbia Winner:Costa Rica Costa Rica--胜出的可能性为:0.675 Serbia--胜出的可能性为:0.325 ============= Germany Vs. Mexico Winner:Germany Germany--胜出的可能性为:0.803 Mexico--胜出的可能性为:0.197 ============= Brazil Vs. Switzerland Winner:Brazil Brazil--胜出的可能性为:0.887 Switzerland--胜出的可能性为:0.113 ============= Sweden Vs. South Korea Winner:Sweden Sweden--胜出的可能性为:0.680 South Korea--胜出的可能性为:0.320 ============= Belgium Vs. Panama Winner:Belgium Belgium--胜出的可能性为:0.935 Panama--胜出的可能性为:0.065 ============= England Vs. Tunisia Winner:England England--胜出的可能性为:0.841 Tunisia--胜出的可能性为:0.159 ============= Colombia Vs. Japan Winner:Colombia Colombia--胜出的可能性为:0.529 Japan--胜出的可能性为:0.471 ============= Poland Vs. Senegal Winner:Poland Poland--胜出的可能性为:0.725 Senegal--胜出的可能性为:0.275 ============= Egypt Vs. Russia Winner:Egypt Egypt--胜出的可能性为:0.642 Russia--胜出的可能性为:0.358 ============= Portugal Vs. Morocco Winner:Portugal Portugal--胜出的可能性为:0.824 Morocco--胜出的可能性为:0.176 ============= Uruguay Vs. Saudi Arabia Winner:Uruguay Uruguay--胜出的可能性为:0.708 Saudi Arabia--胜出的可能性为:0.292 ============= Spain Vs. Iran Winner:Spain Spain--胜出的可能性为:0.733 Iran--胜出的可能性为:0.267 ============= Denmark Vs. Australia Winner:Denmark Denmark--胜出的可能性为:0.534 Australia--胜出的可能性为:0.466 ============= France Vs. Peru Winner:France France--胜出的可能性为:0.904 Peru--胜出的可能性为:0.096 ============= Argentina Vs. Croatia Winner:Argentina Argentina--胜出的可能性为:0.754 Croatia--胜出的可能性为:0.246 ============= Brazil Vs. Costa Rica Winner:Brazil Brazil--胜出的可能性为:0.884 Costa Rica--胜出的可能性为:0.116 ============= Iceland Vs. Nigeria Winner:Nigeria Iceland--胜出的可能性为:0.248 Nigeria--胜出的可能性为:0.752 ============= Switzerland Vs. Serbia Winner:Switzerland Switzerland--胜出的可能性为:0.673 Serbia--胜出的可能性为:0.327 ============= Belgium Vs. Tunisia Winner:Belgium Belgium--胜出的可能性为:0.759 Tunisia--胜出的可能性为:0.241 ============= Mexico Vs. South Korea Winner:Mexico Mexico--胜出的可能性为:0.709 South Korea--胜出的可能性为:0.291 ============= Germany Vs. Sweden Winner:Germany Germany--胜出的可能性为:0.836 Sweden--胜出的可能性为:0.164 ============= England Vs. Panama Winner:England England--胜出的可能性为:0.961 Panama--胜出的可能性为:0.039 ============= Senegal Vs. Japan Winner:Senegal Senegal--胜出的可能性为:0.564 Japan--胜出的可能性为:0.436 ============= Poland Vs. Colombia Winner:Poland Poland--胜出的可能性为:0.764 Colombia--胜出的可能性为:0.236 ============= Uruguay Vs. Russia Winner:Uruguay Uruguay--胜出的可能性为:0.637 Russia--胜出的可能性为:0.363 ============= Egypt Vs. Saudi Arabia Winner:Egypt Egypt--胜出的可能性为:0.713 Saudi Arabia--胜出的可能性为:0.287 ============= Spain Vs. Morocco Winner:Spain Spain--胜出的可能性为:0.879 Morocco--胜出的可能性为:0.121 ============= Portugal Vs. Iran Winner:Portugal Portugal--胜出的可能性为:0.638 Iran--胜出的可能性为:0.362 ============= Peru Vs. Australia Winner:Australia Peru--胜出的可能性为:0.366 Australia--胜出的可能性为:0.634 ============= France Vs. Denmark Winner:France France--胜出的可能性为:0.823 Denmark--胜出的可能性为:0.177 ============= Argentina Vs. Nigeria Winner:Argentina Argentina--胜出的可能性为:0.801 Nigeria--胜出的可能性为:0.199 ============= Croatia Vs. Iceland Winner:Croatia Croatia--胜出的可能性为:0.960 Iceland--胜出的可能性为:0.040 ============= Germany Vs. South Korea Winner:Germany Germany--胜出的可能性为:0.834 South Korea--胜出的可能性为:0.166 ============= Mexico Vs. Sweden Winner:Mexico Mexico--胜出的可能性为:0.712 Sweden--胜出的可能性为:0.288 ============= Brazil Vs. Serbia Winner:Brazil Brazil--胜出的可能性为:0.879 Serbia--胜出的可能性为:0.121 ============= Switzerland Vs. Costa Rica Winner:Switzerland Switzerland--胜出的可能性为:0.683 Costa Rica--胜出的可能性为:0.317 ============= Poland Vs. Japan Winner:Poland Poland--胜出的可能性为:0.581 Japan--胜出的可能性为:0.419 ============= Colombia Vs. Senegal Winner:Colombia Colombia--胜出的可能性为:0.682 Senegal--胜出的可能性为:0.318 ============= Tunisia Vs. Panama Winner:Tunisia Tunisia--胜出的可能性为:0.916 Panama--胜出的可能性为:0.084 ============= Belgium Vs. England Winner:Belgium Belgium--胜出的可能性为:0.550 England--胜出的可能性为:0.450 ============= 历程已完毕,退出代码0