Cricket Team Ranking Using Unified Team Rank Undertaken By



Yüklə 0,75 Mb.
səhifə21/22
tarix02.01.2022
ölçüsü0,75 Mb.
#15574
1   ...   14   15   16   17   18   19   20   21   22
4.2.2 Team Index Code

void calteamindex()

{

float teamrnk[size];



for(int i=0;i

{

int sumr=0;



int sumw=0;

for(int j=0;j

{

sumr+=odir[j][i];



sumw+=odiw[j][i];

}

float sr=sqrt(sumr);



sumr=sr/2;

float sw=sqrt(sumw);

sumw=sw/2;

sr=sumr+sumw;

sw=sqrt(sr);

teami[i]=sw/2;

}

ofstream myfile;



myfile.open ("teamindex.txt");

cout<

cout<<"************team index with respect to odis***********";

for(int k=0;k

{

cout<

cout<

cout<<" "<

myfile << teami[k]<<" ";

}

myfile.close();



}

void main()

{

int data,i=0,j=0;



string fikk = "odiruns.txt";

ifstream ff(fikk.c_str());

if(!ff)

{

cout<<" File not found "<

}

while(ff>>data)

{

odir[i][j++] = data;



}

i=0,j=0;


string ffff = "odiwick.txt";

ifstream fi(ffff.c_str());

if(!fi)

{

cout<<" File not found "<

}

while(fi>>data)

{

odiw[i][j++] = data;



}

for(i=0;i

{

for(j=0;j

{

cout<

}

cout<

}

cout<

for(i=0;i

{

for(j=0;j

{

cout<

}

cout<

}

calteamindex();

}

4.2.3 Weighted Team Rank

void calweightoutlink()

{

ofstream myfile;



myfile.open ("weighttable.txt");

for(int i=0;i

{

for(int j=0;j

{

if (i==j)

{

wghtedrnk[i][j]=0;



myfile <

}

else



{

float tt=(60*net[i][j])+(20*odir[i][j])+(20*odiw[i][j]);

float tf=net[i][j]+odir[i][j]+odiw[i][j];

if(tf==0)

{

wghtedrnk[i][j]=0;



myfile <

}

else



{

wghtedrnk[i][j]=1/(tt/tf);

myfile <

}

}



}

myfile <<"\n";

}

myfile.close();



cout<<"\n\n weighted outlinks with respect to odis\n\n";

for(int k=0;k

{

for(int j=0;j

{

cout<

}

cout<

}

}

void calweightedtmrnk()



{

float * pr;

pr= new float[3];

pr[0]=1;


pr[1]=1;

pr[2]=1;


pr[3]=1;

pr[4]=1;


pr[5]=1;

pr[6]=1;


pr[7]=1;

pr[8]=1;


pr[9]=1;

float * tt;

tt= new float[10];

tt[0]=0;


tt[1]=0;

tt[2]=0;


tt[3]=0;

tt[4]=0;


tt[5]=0;

tt[6]=0;


tt[7]=0;

tt[8]=0;


tt[9]=0;

for(int k=1;k<=30;k++)

{

for(int i=0;i

{

tt[i]=0;


for(int j=0;j{

if(wghtedrnk[j][i] > 0)



{

int count=0;

for(int k=0;k

{

if(wghtedrnk[j][k] > 0)



count++;

}

float aa =pr[j]/count;



aa*=wghtedrnk[j][i];

tt[i]+=aa;

}

}

float temp=0.0;



float temp1=0.0;

temp1=alpha*tt[i];

temp=(1-alpha)/size;

pr[i]=temp+temp1;

}

//cout<<"\t"<

}

ofstream myfile;

myfile.open ("weightedrnk.txt");

cout<<"\n\n****************TEAM RANKING WITH RESPECT TO ODIS***************";

cout<

for(int t=0;t<10;t++)

{

cout<

myfile << pr[t]<<" ";

}

float high=pr[0];



int no=0;

for(int i=1;i

{

if(high


{

high=pr[i];

no=i;

}

}



myfile.close();

cout<

}

void main()



{

int data,i=0,j=0;

string fikk = "odiruns.txt";

ifstream ff(fikk.c_str());

if(!ff)

{

cout<<" File not found "<

}

while(ff>>data)

{

odir[i][j++] = data;



}

i=0,j=0;


string ffff = "odiwick.txt";

ifstream fi(ffff.c_str());

if(!fi)

{

cout<<" File not found "<

}

while(fi>>data)

{

odiw[i][j++] = data;



}

cout<<"runs in odi matches\n";

for(i=0;i

{

for(j=0;j

{

cout<

}

cout<

}

cout<

cout<<"wickets in odi matches\n";

for(i=0;i

{

for(j=0;j

{

cout<

}

cout<

}

i=0,j=0;


string fik = "file.txt";

ifstream hf(fik.c_str());

if(!hf)

{

cout<<" File not found "<

}

while(hf>>data)

{

net[i][j++] = data;



}

calweightoutlink();

calweightedtmrnk();

}

4.2.4 Unified Weighted Team Rank

void calunifiedrnk()

{

float count=0;



ofstream myfile;

myfile.open ("unifiedwtmrnk.txt");

cout<<"******************************************************";

cout<<"\nunified weighted team rank with respect to odis\n\n";

cout<<"******************************************************\n";

float * pr;

pr= new float[3];

pr[0]=1;


pr[1]=1;

pr[2]=1;


pr[3]=1;

pr[4]=1;


pr[5]=1;

pr[6]=1;


pr[7]=1;

pr[8]=1;


pr[9]=1;

float * tt;

tt= new float[10];

tt[0]=0;


tt[1]=0;

tt[2]=0;


tt[3]=0;

tt[4]=0;


tt[5]=0;

tt[6]=0;


tt[7]=0;

tt[8]=0;


tt[9]=0;

for(int j=0;j

{

count+=temindx[j];



}

for(int k=1;k<=30;k++)

{

for(int i=0;i

{

tt[i]=0;


for(int j=0;j{

if(wghtedrnk[j][i] > 0)



{

int count=0;

for(int k=0;k

{

if(wghtedrnk[j][k] > 0)



count++;

}

float aa =pr[j]/count;



aa*=wghtedrnk[j][i];

tt[i]+=aa;

}

}

float temp=0.0;



float temp1=0.0;

temp1=alpha*tt[i];

temp=(1-alpha)/size;

temp=temp*(temindx[i]/count);

pr[i]=temp+temp1;

}

}



cout<<"\n\n****************UNIFIED TEAM RANKING WITH RESPECT TO ODIS***************";

cout<

for(int t=0;t<10;t++)

{

cout<

//myfile << pr[t]<<" ";

}

}



void main()

{

float data;



int i=0;

string fikk = "teamindex.txt";

ifstream ff(fikk.c_str());

if(!ff)


{

cout<<" File not found "<

}

while(ff>>data)



{

temindx[i]= data;

i++;

//cout<

}

i=0;


int k=0;

string ffff = "weighttable.txt";

ifstream fi(ffff.c_str());

if(!fi)


{

cout<<" File not found "<

}

while(fi>>data)



{

wghtedrnk[i][k++] = data;

}

cout<<"\n*******TEAM INDEX WITH RESPECT TO ODIS***********\n";



for(int j=0;j

{

cout<

}

cout<

cout<

calunifiedrnk();

}

CHAPTER 5

RESULTS AND DISCUSSIONS

5.1 Experiments

Our each method’s output depend on following reasons



5.1.1 Data

Data which we use in our method’s implementation is from 2000 to March 2012 but ICC ranking is from start to June 2012[6].


5.1.2 Baseline Method (Point system)

According to ICC ranking one point is given to the team that wins a match and half-point to both the teams if the match is draw. If the team wins a series that team gets a bonus point and if the series is draw each team gets half-point [5]. According to our ranking we give points to the team on the basis of three things wickets and runs from which a team wins and also how many matches a team wins .The team that wins from more runs or wickets and that team also has win more matches is given high rank.



5.2 Results and Discussions

5.2.1 Team rank (ODI’s)

According to ICC ranking Australia is on first position South Africa on second and India on third but according to our ODI team ranking Australia is on first position, India on second and Pakistan on third position. India and Pakistan are on second and third position because they have played many matches with other good teams so their link weightage increases. When we are calculating team rank of ODI’s we require runs and wickets.



Table 7: Team Rank of All Teams

TEAMS

INDIA

PAK

SRI

S.AFR

N.LAND

ENG

W.IES

BANG

ZIMB

AUS

INDIA

0

22

26

20

13

14

17

2

5

32

PAK

20

0

22

23

17

14

10

0

0

22

SRI

34

26

0

16

11

12

4

2

2

22

S. AFR

15

11

18

0

11

13

5

1

1

22

N.LAND

15

22

21

20

0

6

5

5

5

23

ENG

26

11

16

11

15

0

10

2

3

31

W.IES

25

20

10

26

16

14

0

4

9

25

BANG

14

21

22

13

14

13

11

0

22

16

ZIMB

18

24

24

22

11

19

24

30

0

12

AUS

15

23

11

17

13

11

5

1

0

0


Table 8: Team Rank W.R.T ODIS



TEAM RANKING WITH RESPECT TO ODIS

India

0.121694

Pakistan

0.119422

Sri Lanka

0.11424

South Africa

0.110733

New Zealand

0.0981

England

0.0946053

West Indies

0.081723

Bangladesh

0.0619443

Zimbabwe

0.0636812

Australia

0.133857



Yüklə 0,75 Mb.

Dostları ilə paylaş:
1   ...   14   15   16   17   18   19   20   21   22




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©muhaz.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin