My solution to the Genius League Data Scientist Internship Takehome Challenge.
Goal is to predict a player’s rank using the information provided in the dataset like Age, HoursPerWeek, ActionLatency, etc.
- Imbalanced-Learn for SMOTE and skewness handling
- Scipy for Outlier Detection and handling
- PyCaret, Scikit-Learn, PyTorch for training models
- Seaborn and Matplotlib for plots and visualizations
These instructions assume a working installation of Anaconda.
git clone git@github.com:shreayan98c/EG-GeniusLeague.git
cd EG-GeniusLeague
pip install -r requirements.txtDepending on your desired configuration, you may need to install the PyTorch package separately. This can be done following the instructions on the PyTorch website, in an empty conda environment.
jupyter notebook
starcraft.ipynbRun all cells.
Approach to solve the problem: Predicting a player’s rank using the information provided in the dataset:
-
Exploratory Data Analysis (EDA):
Perform an initial exploration of the dataset to understand its structure, features, and relationships. Helps in gaining insights and identifying any data quality issues or missing values. Tasks to perform during EDA:
a. Identify missing values.
b. Generate descriptive statistics of the data.
c. Visualize the distribution of target variable and features using plots (histograms, box plots, etc.) from libraries like matplotlib and seaborn. -
Data Preprocessing:
a. Handle missing values: Depending on the extent of missing data, we can choose to drop rows or columns with missing values or impute them using techniques like mean, median, or mode.
b. Encode categorical variables: If there are categorical variables in the dataset, encode them using techniques like one-hot encoding or label encoding, depending on the nature of the variables.
c. Detect and handle outliers.
d. Split the data: Divide the dataset into training and testing sets. -
Feature Selection or Engineering:
Based on the insights gained during EDA, we might need to perform feature selection or engineering to improve the model's performance. This can involve removing irrelevant or highly correlated features, creating new features, or transforming existing ones. -
Model Training and Evaluation:
a. Experiment with different machine learning algorithms for classification like logistic regression, decision trees, random forest, or support vector machines, since predicting rank is a classification problem.
b. Train the model using the training data.
c. Evaluate the model's performance using appropriate evaluation metrics such as accuracy, precision, recall, and F1 score. Use the testing data for evaluation. -
Model Improvement and Tuning:
If the model's performance is not satisfactory, try different algorithms or tune hyperparameters to improve it using techniques like grid search or random search. -
Model Deployment and Communication:
Once we have a satisfactory model, we can deploy it to make predictions on new data. Document our findings, methodology, and evaluation results in a clear and concise manner, suitable for non-technical stakeholders. Communicate the findings to stakeholders using visualizations and data story based explanations that are easily understandable.