Learn practical skills, build real-world projects, and advance your career

Jovian M.L Project (PUBG Finish Placement Prediction)

alt

You are given over 65,000 games' worth of anonymized player data, split into training and testing sets, and asked to predict final placement from final in-game stats and initial player ratings.

What's the best strategy to win in PUBG? Should you sit in one spot and hide your way into victory, or do you need to be the top shot? Let's let the data do the talking!

Link to dataset: HERE

Data Description

Features
  • DBNOs - Number of enemy players knocked.

  • assists - Number of enemy players this player damaged that were killed by teammates.

  • boosts - Number of boost items used.

  • damageDealt - Total damage dealt. Note: Self inflicted damage is subtracted.

  • headshotKills - Number of enemy players killed with headshots.

  • heals - Number of healing items used.

  • Id - Player’s Id

  • killPlace - Ranking in match of number of enemy players killed.

  • killPoints - Kills-based external ranking of player. (Think of this as an Elo ranking where only kills matter.) If there is a value other than -1 in rankPoints, then any 0 in killPoints should be treated as a “None”.

  • killStreaks - Max number of enemy players killed in a short amount of time.

  • kills - Number of enemy players killed.

  • longestKill - Longest distance between player and player killed at time of death. This may be misleading, as downing a player and driving away may lead to a large longestKill stat.

  • matchDuration - Duration of match in seconds.

  • matchId - ID to identify match. There are no matches that are in both the training and testing set.

  • matchType - String identifying the game mode that the data comes from. The standard modes are “solo”, “duo”, “squad”, “solo-fpp”, “duo-fpp”, and “squad-fpp”; other modes are from events or custom matches.

  • rankPoints - Elo-like ranking of player. This ranking is inconsistent and is being deprecated in the API’s next version, so use with caution. Value of -1 takes place of “None”.

  • revives - Number of times this player revived teammates.

  • rideDistance - Total distance traveled in vehicles measured in meters.

  • roadKills - Number of kills while in a vehicle.

  • swimDistance - Total distance traveled by swimming measured in meters.

  • teamKills - Number of times this player killed a teammate.

  • vehicleDestroys - Number of vehicles destroyed.

  • walkDistance - Total distance traveled on foot measured in meters.

  • weaponsAcquired - Number of weapons picked up.

  • winPoints - Win-based external ranking of player. (Think of this as an Elo ranking where only winning matters.) If there is a value other than -1 in rankPoints, then any 0 in winPoints should be treated as a “None”.

  • groupId - ID to identify a group within a match. If the same group of players plays in different matches, they will have a different groupId each time.

  • numGroups - Number of groups we have data for in the match.

  • maxPlace - Worst placement we have data for in the match. This may not match with numGroups, as sometimes the data skips over placements.

Target
  • winPlacePerc - The target of prediction. This is a percentile winning placement, where 1 corresponds to 1st place, and 0 corresponds to last place in the match. It is calculated off of maxPlace, not numGroups, so it is possible to have missing chunks in a match.

Since the target column is a continous value we can use Regression technique. But first we need to take a look at the data and perform EDA and other techniques as and when required.

# Required Imports
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
%matplotlib inline

warnings.filterwarnings("ignore")
pd.set_option('display.max_columns', 200)
sns.set_style('darkgrid')
matplotlib.rcParams['font.size'] = 14
matplotlib.rcParams['figure.figsize'] = (10, 6)
matplotlib.rcParams['figure.facecolor'] = '#00000000'
# Loading the datasets
train_df = pd.read_csv("train_V2.csv")
test_df = pd.read_csv("test_V2.csv")

print(f"Training data Shape: {train_df.shape}\nTest data shape: {test_df.shape}")
Training data Shape: (4446966, 29) Test data shape: (1934174, 28)