Algorithm for 'main.py' file
1)Download the necessary libraries 2)Dowload the dataset using pandas
DATA PROCESS
-
Keep the necessary columns (eg:'match_id','venue','innings','ball','batting_team','bowling_team','striker','bowler','runs_off_bat','extras','wides', 'noballs','byes','legbyes','penalty') and remove other columns.
-
Calculate the total runs(total run=runs of bat+extras)
-
Add a column named "total_runs" and drop the columns named-"runs_off_bat" and "extras"
-
Next select rows only belonging to first 6 overs and innings less than 3
-
Preprocess the data so that we get a tuple of following kind in each row: ('match_id','venue','innings','batting_team','bowling_team','total_runs')
-
Convert back to dataframe
-
Drop the column-'match_id'
-
Keep only current teams
-
Remove other teams that is not playing in this IPL(2021)
-
Perform 'label encoding' (replace the 'string' variable into 'integers') over 'venue','batting_team','bowling_team'
MODEL BUILDING
-
Convert pandas data_frame into numpy array
-
Separate input and output variables
-
Split the data into training set and testing set
-
Convert it into tensor object and normalize the input data
-
Built a neural network with one output layer
-
Train it with 'train dataset' 17 )Evaluate the model with test dataset
MODEL SAVING
18)Save the trained model 20)Save the label encoders