[SPARK-16831][PYTHON] Fixed bug in CrossValidator.avgMetrics
[SPARK-16831][PYTHON] Fixed bug in CrossValidator.avgMetrics

## What changes were proposed in this pull request?

avgMetrics was summed, not averaged, across folds

Author: =^_^= <maxmoroz@gmail.com>

Closes #14456 from pkch/pkch-patch-1.

huang1900/spark,BryanCutler/spark,liyichao/spark,shaneknapp/spark,Aegeaner/spark,bdrillard/spark,adrian-ionescu/apache-spark,dbtsai/spark,hvanhovell/spark,nilsgrabbert/spark,actuaryzhang/spark,apache-spark-on-k8s/spark,aokolnychyi/spark,vinodkc/spark,SnappyDataInc/spark,milliman/spark,cloud-fan/spark,mzl9039/spark,hhbyyh/spark,MLnick/spark,byakuinss/spark,joseph-torres/spark,JoshRosen/spark,chuckchen/spark,hvanhovell/spark,setjet/spark,kimoonkim/spark,ptkool/spark,yanboliang/spark,ioana-delaney/spark,stanzhai/spark,jrshust/spark,akopich/spark,metamx/spark,dongjoon-hyun/spark,kissmetrics/spark,patrick-nicholson/spark,mahak/spark,hvanhovell/spark,dbtsai/spark,taroplus/spark,ibm-research-ireland/sparkoscope,andrewor14/spark,kiszk/spark,patrick-nicholson/spark,HyukjinKwon/spark,wangmiao1981/spark,taroplus/spark,chuckchen/spark,cin/spark,jrshust/spark,mike0sv/spark,maropu/spark,ibm-research-ireland/sparkoscope,big-pegasus/spark,nlalevee/spark,huang1900/spark,shaneknapp/spark,xflin/spark,michalsenkyr/spark,WindCanDie/spark,MLnick/spark,shuangshuangwang/spark,milliman/spark,brad-kaiser/spark,andrewor14/spark,someorz/spark,sureshthalamati/spark,darionyaphet/spark,hvanhovell/spark,szhem/spark,liutang123/spark,Aegeaner/spark,guoxiaolongzte/spark,kissmetrics/spark,sahilTakiar/spark,bravo-zhang/spark,holdenk/spark,guoxiaolongzte/spark,michalsenkyr/spark,JerryLead/spark,sahilTakiar/spark,kevinyu98/spark,adrian-ionescu/apache-spark,rekhajoshm/spark,big-pegasus/spark,gengliangwang/spark,jlopezmalla/spark,kiszk/spark,hhbyyh/spark,saltstar/spark,kevinyu98/spark,zhouyejoe/spark,map222/spark,skonto/spark,tengpeng/spark,esi-mineset/spark,mdespriee/spark,yanboliang/spark,rednaxelafx/apache-spark,shubhamchopra/spark,caneGuy/spark,dongjoon-hyun/spark,chuckchen/spark,UndeadBaneGitHub/spark,darionyaphet/spark,UndeadBaneGitHub/spark,icexelloss/spark,jiangxb1987/spark,caneGuy/spark,map222/spark,highfei2011/spark,metamx/spark,panfengfeng/spark,actuaryzhang/spark,eyalfa/spark,panfengfeng/spark,mzl9039/spark,saturday-shi/spark,UndeadBaneGitHub/spark,loneknightpy/spark,spark-test/spark,ioana-delaney/spark,sahilTakiar/spark,icexelloss/spark,kevinyu98/spark,joseph-torres/spark,dbtsai/spark,actuaryzhang/spark,saltstar/spark,brad-kaiser/spark,mahak/spark,spark-test/spark,shubhamchopra/spark,UndeadBaneGitHub/spark,facaiy/spark,cin/spark,1haodian/spark,aosagie/spark,metamx/spark,publicRoman/spark,kimoonkim/spark,caneGuy/spark,ueshin/apache-spark,JerryLead/spark,holdenk/spark,ericvandenbergfb/spark,kimoonkim/spark,wangmiao1981/spark,kiszk/spark,andrewor14/spark,jkbradley/spark,ioana-delaney/spark,lxsmnv/spark,dhruve/spark,milliman/spark,JerryLead/spark,ueshin/apache-spark,taroplus/spark,wangyum/spark,jrshust/spark,1haodian/spark,stanzhai/spark,vinodkc/spark,ibm-research-ireland/sparkoscope,jkbradley/spark,guoxiaolongzte/spark,cloud-fan/spark,pgandhi999/spark,facaiy/spark,techaddict/spark,liutang123/spark,dhruve/spark,zuotingbing/spark,SHASHANKB/spark,tengpeng/spark,pgandhi999/spark,apache-spark-on-k8s/spark,ConeyLiu/spark,Panos-Bletsos/spark-cost-model-optimizer,alunarbeach/spark,adrian-ionescu/apache-spark,jrshust/spark,minixalpha/spark,wangyum/spark,holdenk/spark,ibm-research-ireland/sparkoscope,dhruve/spark,tejasapatil/spark,publicRoman/spark,mzl9039/spark,xflin/spark,lxsmnv/spark,pgandhi999/spark,apache-spark-on-k8s/spark,goldmedal/spark,skonto/spark,wangmiao1981/spark,eyalfa/spark,yanboliang/spark,WeichenXu123/spark,liutang123/spark,ptkool/spark,actuaryzhang/spark,debugger87/spark,xuanyuanking/spark,gengliangwang/spark,markhamstra/spark,apache/spark,nchammas/spark,aray/spark,mzl9039/spark,ddna1021/spark,1haodian/spark,stanzhai/spark,jkbradley/spark,cin/spark,zero323/spark,ericvandenbergfb/spark,xflin/spark,BryanCutler/spark,nchammas/spark,shuangshuangwang/spark,markhamstra/spark,srowen/spark,esi-mineset/spark,publicRoman/spark,michalsenkyr/spark,shuangshuangwang/spark,cloud-fan/spark,zhouyejoe/spark,gengliangwang/spark,saltstar/spark,shaneknapp/spark,sachintyagi22/spark,kissmetrics/spark,shubhamchopra/spark,sachintyagi22/spark,SnappyDataInc/spark,aosagie/spark,kevinyu98/spark,LantaoJin/spark,ajaysaini725/spark,gengliangwang/spark,patrick-nicholson/spark,goldmedal/spark,kevinyu98/spark,dongjoon-hyun/spark,rednaxelafx/apache-spark,minixalpha/spark,tengpeng/spark,aray/spark,zzcclp/spark,ahnqirage/spark,xflin/spark,ajaysaini725/spark,highfei2011/spark,mike0sv/spark,vinodkc/spark,alunarbeach/spark,poffuomo/spark,tejasapatil/spark,liutang123/spark,saturday-shi/spark,skonto/spark,publicRoman/spark,jiangxb1987/spark,bravo-zhang/spark,kimoonkim/spark,aokolnychyi/spark,actuaryzhang/spark,nlalevee/spark,lvdongr/spark,ibm-research-ireland/sparkoscope,SnappyDataInc/spark,goldmedal/spark,sureshthalamati/spark,dbtsai/spark,dongjoon-hyun/spark,alunarbeach/spark,MLnick/spark,joseph-torres/spark,xuanyuanking/spark,loneknightpy/spark,holdenk/spark,xflin/spark,spark-test/spark,srowen/spark,big-pegasus/spark,setjet/spark,bravo-zhang/spark,darionyaphet/spark,hhbyyh/spark,mahak/spark,actuaryzhang/spark,aray/spark,byakuinss/spark,mdespriee/spark,eyalfa/spark,SnappyDataInc/spark,nlalevee/spark,shaneknapp/spark,jrshust/spark,minixalpha/spark,icexelloss/spark,taroplus/spark,rezasafi/spark,narahari92/spark,actuaryzhang/spark,ericvandenbergfb/spark,ConeyLiu/spark,icexelloss/spark,map222/spark,shubhamchopra/spark,zuotingbing/spark,bdrillard/spark,HyukjinKwon/spark,hhbyyh/spark,skonto/spark,someorz/spark,yanboliang/spark,setjet/spark,jiangxb1987/spark,markhamstra/spark,facaiy/spark,publicRoman/spark,caneGuy/spark,loneknightpy/spark,jkbradley/spark,poffuomo/spark,JerryLead/spark,zuotingbing/spark,ron8hu/spark,setjet/spark,aokolnychyi/spark,akopich/spark,srowen/spark,mike0sv/spark,joseph-torres/spark,goldmedal/spark,Panos-Bletsos/spark-cost-model-optimizer,lxsmnv/spark,brad-kaiser/spark,markhamstra/spark,wzhfy/spark,goldmedal/spark,sureshthalamati/spark,WeichenXu123/spark,akopich/spark,rednaxelafx/apache-spark,janewangfb/spark,rednaxelafx/apache-spark,saturday-shi/spark,ron8hu/spark,spark-test/spark,dhruve/spark,WindCanDie/spark,rekhajoshm/spark,facaiy/spark,WeichenXu123/spark,wangyum/spark,JoshRosen/spark,JoshRosen/spark,map222/spark,jlopezmalla/spark,jianran/spark,kimoonkim/spark,szhem/spark,srowen/spark,wangmiao1981/spark,zero323/spark,srowen/spark,wzhfy/spark,shaneknapp/spark,rikima/spark,rekhajoshm/spark,cloud-fan/spark,debugger87/spark,MLnick/spark,andrewor14/spark,nlalevee/spark,maropu/spark,joseph-torres/spark,rekhajoshm/spark,highfei2011/spark,ConeyLiu/spark,markhamstra/spark,spark-test/spark,ericvandenbergfb/spark,kiszk/spark,byakuinss/spark,milliman/spark,kiszk/spark,chuckchen/spark,sachintyagi22/spark,zhouyejoe/spark,ddna1021/spark,cloud-fan/spark,eyalfa/spark,nchammas/spark,esi-mineset/spark,patrick-nicholson/spark,nilsgrabbert/spark,aray/spark,wangyum/spark,jlopezmalla/spark,jiangxb1987/spark,ddna1021/spark,map222/spark,panfengfeng/spark,tejasapatil/spark,milliman/spark,ericvandenbergfb/spark,ahnqirage/spark,shaneknapp/spark,witgo/spark,BryanCutler/spark,WindCanDie/spark,someorz/spark,shuangshuangwang/spark,jianran/spark,vinodkc/spark,BryanCutler/spark,alunarbeach/spark,szhem/spark,bravo-zhang/spark,ConeyLiu/spark,joseph-torres/spark,panfengfeng/spark,bdrillard/spark,ptkool/spark,stanzhai/spark,facaiy/spark,byakuinss/spark,ahnqirage/spark,LantaoJin/spark,bOOm-X/spark,nchammas/spark,ajaysaini725/spark,rezasafi/spark,narahari92/spark,ueshin/apache-spark,jianran/spark,stanzhai/spark,nlalevee/spark,matthewfranglen/spark,mike0sv/spark,gengliangwang/spark,kissmetrics/spark,techaddict/spark,WeichenXu123/spark,hvanhovell/spark,someorz/spark,jlopezmalla/spark,byakuinss/spark,ron8hu/spark,narahari92/spark,cloud-fan/spark,ioana-delaney/spark,shuangshuangwang/spark,Panos-Bletsos/spark-cost-model-optimizer,liutang123/spark,poffuomo/spark,eyalfa/spark,WindCanDie/spark,nilsgrabbert/spark,aokolnychyi/spark,xflin/spark,nilsgrabbert/spark,janewangfb/spark,ConeyLiu/spark,kiszk/spark,tengpeng/spark,aosagie/spark,mike0sv/spark,andrewor14/spark,SnappyDataInc/spark,minixalpha/spark,aokolnychyi/spark,janewangfb/spark,lxsmnv/spark,SHASHANKB/spark,jlopezmalla/spark,1haodian/spark,poffuomo/spark,xuanyuanking/spark,facaiy/spark,huang1900/spark,gengliangwang/spark,sachintyagi22/spark,LantaoJin/spark,michalsenkyr/spark,apache-spark-on-k8s/spark,dhruve/spark,eyalfa/spark,panfengfeng/spark,publicRoman/spark,huang1900/spark,patrick-nicholson/spark,LantaoJin/spark,kissmetrics/spark,hvanhovell/spark,LantaoJin/spark,tengpeng/spark,narahari92/spark,setjet/spark,MLnick/spark,techaddict/spark,UndeadBaneGitHub/spark,andrewor14/spark,debugger87/spark,yanboliang/spark,aray/spark,dongjoon-hyun/spark,lxsmnv/spark,shuangshuangwang/spark,narahari92/spark,ibm-research-ireland/sparkoscope,minixalpha/spark,tejasapatil/spark,alunarbeach/spark,bravo-zhang/spark,jianran/spark,spark-test/spark,dbtsai/spark,techaddict/spark,kevinyu98/spark,JoshRosen/spark,someorz/spark,LantaoJin/spark,saltstar/spark,cin/spark,janewangfb/spark,lvdongr/spark,ajaysaini725/spark,cin/spark,ConeyLiu/spark,loneknightpy/spark,poffuomo/spark,kiszk/spark,markhamstra/spark,apache/spark,taroplus/spark,someorz/spark,wangmiao1981/spark,janewangfb/spark,apache-spark-on-k8s/spark,wangmiao1981/spark,mahak/spark,ron8hu/spark,goldmedal/spark,brad-kaiser/spark,akopich/spark,debugger87/spark,wzhfy/spark,BryanCutler/spark,highfei2011/spark,dbtsai/spark,rezasafi/spark,BryanCutler/spark,icexelloss/spark,zero323/spark,UndeadBaneGitHub/spark,HyukjinKwon/spark,zuotingbing/spark,maropu/spark,pgandhi999/spark,jlopezmalla/spark,zhouyejoe/spark,jlopezmalla/spark,1haodian/spark,Aegeaner/spark,mahak/spark,zzcclp/spark,maropu/spark,debugger87/spark,map222/spark,sachintyagi22/spark,esi-mineset/spark,kimoonkim/spark,apache-spark-on-k8s/spark,rikima/spark,ueshin/apache-spark,JerryLead/spark,guoxiaolongzte/spark,mike0sv/spark,bOOm-X/spark,wzhfy/spark,rikima/spark,adrian-ionescu/apache-spark,xuanyuanking/spark,nlalevee/spark,sureshthalamati/spark,zuotingbing/spark,1haodian/spark,byakuinss/spark,JoshRosen/spark,lxsmnv/spark,michalsenkyr/spark,rekhajoshm/spark,eyalfa/spark,poffuomo/spark,sureshthalamati/spark,alunarbeach/spark,wangyum/spark,MLnick/spark,rikima/spark,bravo-zhang/spark,UndeadBaneGitHub/spark,stanzhai/spark,SHASHANKB/spark,lvdongr/spark,apache/spark,michalsenkyr/spark,rednaxelafx/apache-spark,ptkool/spark,apache/spark,HyukjinKwon/spark,ajaysaini725/spark,panfengfeng/spark,rikima/spark,jiangxb1987/spark,cin/spark,ueshin/apache-spark,joseph-torres/spark,setjet/spark,icexelloss/spark,zzcclp/spark,ajaysaini725/spark,srowen/spark,hvanhovell/spark,shubhamchopra/spark,shuangshuangwang/spark,Panos-Bletsos/spark-cost-model-optimizer,JerryLead/spark,srowen/spark,adrian-ionescu/apache-spark,rezasafi/spark,ajaysaini725/spark,dhruve/spark,jrshust/spark,WeichenXu123/spark,darionyaphet/spark,tejasapatil/spark,JoshRosen/spark,guoxiaolongzte/spark,apache-spark-on-k8s/spark,publicRoman/spark,huang1900/spark,andrewor14/spark,Aegeaner/spark,loneknightpy/spark,mdespriee/spark,vinodkc/spark,nchammas/spark,zzcclp/spark,witgo/spark,map222/spark,aokolnychyi/spark,saltstar/spark,ConeyLiu/spark,ioana-delaney/spark,ericvandenbergfb/spark,caneGuy/spark,metamx/spark,kevinyu98/spark,nlalevee/spark,metamx/spark,zero323/spark,wzhfy/spark,apache/spark,brad-kaiser/spark,aokolnychyi/spark,witgo/spark,spark-test/spark,vinodkc/spark,lvdongr/spark,WeichenXu123/spark,ahnqirage/spark,HyukjinKwon/spark,witgo/spark,esi-mineset/spark,ahnqirage/spark,xuanyuanking/spark,zhouyejoe/spark,ddna1021/spark,sureshthalamati/spark,wzhfy/spark,liyichao/spark,markhamstra/spark,big-pegasus/spark,szhem/spark,szhem/spark,1haodian/spark,bOOm-X/spark,tengpeng/spark,rekhajoshm/spark,brad-kaiser/spark,esi-mineset/spark,akopich/spark,witgo/spark,esi-mineset/spark,dbtsai/spark,bravo-zhang/spark,aray/spark,ueshin/apache-spark,brad-kaiser/spark,liyichao/spark,pgandhi999/spark,jkbradley/spark,skonto/spark,Panos-Bletsos/spark-cost-model-optimizer,yanboliang/spark,szhem/spark,adrian-ionescu/apache-spark,metamx/spark,michalsenkyr/spark,wangmiao1981/spark,ericvandenbergfb/spark,techaddict/spark,mzl9039/spark,jianran/spark,ron8hu/spark,tejasapatil/spark,chuckchen/spark,ddna1021/spark,techaddict/spark,wzhfy/spark,loneknightpy/spark,loneknightpy/spark,Panos-Bletsos/spark-cost-model-optimizer,ibm-research-ireland/sparkoscope,big-pegasus/spark,sahilTakiar/spark,poffuomo/spark,big-pegasus/spark,JoshRosen/spark,Aegeaner/spark,darionyaphet/spark,maropu/spark,someorz/spark,zuotingbing/spark,saturday-shi/spark,huang1900/spark,szhem/spark,kimoonkim/spark,lvdongr/spark,jkbradley/spark,shubhamchopra/spark,nchammas/spark,JerryLead/spark,ptkool/spark,Aegeaner/spark,sahilTakiar/spark,zzcclp/spark,HyukjinKwon/spark,hhbyyh/spark,mdespriee/spark,zero323/spark,rezasafi/spark,Aegeaner/spark,sachintyagi22/spark,WindCanDie/spark,ueshin/apache-spark,setjet/spark,milliman/spark,bdrillard/spark,patrick-nicholson/spark,huang1900/spark,SnappyDataInc/spark,hhbyyh/spark,skonto/spark,taroplus/spark,holdenk/spark,nchammas/spark,cloud-fan/spark,HyukjinKwon/spark,ioana-delaney/spark,facaiy/spark,taroplus/spark,SHASHANKB/spark,mdespriee/spark,sureshthalamati/spark,MLnick/spark,metamx/spark,vinodkc/spark,ddna1021/spark,jiangxb1987/spark,highfei2011/spark,byakuinss/spark,bOOm-X/spark,zzcclp/spark,mdespriee/spark,BryanCutler/spark,ptkool/spark,liyichao/spark,rekhajoshm/spark,goldmedal/spark,nilsgrabbert/spark,chuckchen/spark,lvdongr/spark,mahak/spark,stanzhai/spark,dhruve/spark,SnappyDataInc/spark,LantaoJin/spark,debugger87/spark,wangyum/spark,rednaxelafx/apache-spark,SHASHANKB/spark,highfei2011/spark,bOOm-X/spark,rikima/spark,SHASHANKB/spark,icexelloss/spark,liyichao/spark,zhouyejoe/spark,pgandhi999/spark,saturday-shi/spark,ptkool/spark,Panos-Bletsos/spark-cost-model-optimizer,rezasafi/spark,zuotingbing/spark,bdrillard/spark,xuanyuanking/spark,ahnqirage/spark,ddna1021/spark,apache/spark,ron8hu/spark,zhouyejoe/spark,darionyaphet/spark,holdenk/spark,big-pegasus/spark,saturday-shi/spark,nilsgrabbert/spark,ron8hu/spark,jiangxb1987/spark,narahari92/spark,zero323/spark,alunarbeach/spark,zzcclp/spark,adrian-ionescu/apache-spark,mzl9039/spark,WindCanDie/spark,janewangfb/spark,kissmetrics/spark,minixalpha/spark,cin/spark,debugger87/spark,bdrillard/spark,liutang123/spark,techaddict/spark,caneGuy/spark,gengliangwang/spark,jianran/spark,sahilTakiar/spark,saltstar/spark,liyichao/spark,mike0sv/spark,wangyum/spark,mzl9039/spark,bOOm-X/spark,aosagie/spark,guoxiaolongzte/spark,chuckchen/spark,rikima/spark,lvdongr/spark,xflin/spark,hhbyyh/spark,sahilTakiar/spark,zero323/spark,ioana-delaney/spark,janewangfb/spark,skonto/spark,shaneknapp/spark,dongjoon-hyun/spark,tejasapatil/spark,aray/spark,narahari92/spark,sachintyagi22/spark,jkbradley/spark,maropu/spark,liutang123/spark,WeichenXu123/spark,lxsmnv/spark,pgandhi999/spark,witgo/spark,kissmetrics/spark,apache/spark,jrshust/spark,rezasafi/spark,holdenk/spark,akopich/spark,caneGuy/spark,mdespriee/spark,nilsgrabbert/spark,xuanyuanking/spark,tengpeng/spark,akopich/spark,yanboliang/spark,panfengfeng/spark,ahnqirage/spark,guoxiaolongzte/spark,WindCanDie/spark,milliman/spark,shubhamchopra/spark,darionyaphet/spark,highfei2011/spark,bOOm-X/spark,saltstar/spark,liyichao/spark,SHASHANKB/spark,aosagie/spark,aosagie/spark,mahak/spark,jianran/spark,maropu/spark,dongjoon-hyun/spark,aosagie/spark,bdrillard/spark,witgo/spark,minixalpha/spark,saturday-shi/spark,patrick-nicholson/spark,rednaxelafx/apache-spark