Capstone project that I created as part of CareerERA's Post Graduate Program
NOTE: This project was generated with Cookiecutter along with @clamytoe's toepack project template.
Author: Martin Uribe
This project is part of my first capstone project for the Post Graduate Program in Data Science for CareerERA.
I was given a random dataset with no description of what each feature meant or what to do with it. I cleaned it up, performed some EDA, ran some extensive parameter tuning on different classifiers, and created a model that was able to generate the probability of a startup being acquired.
This was a challenge because the target classes were highly imbalanced.
In the end, my model achieved an 86% accuracy.
Further details can be found in the Jupyter notebook. I've included the html export of the notebook so that the interactive plots would be available offline without having to recreate my environment and running the notebook.
Project structure:
.
├── LICENSE
├── MartinUribe_InvestmentsVC_Capstone.html
├── MartinUribe_InvestmentsVC_Capstone.ipynb
├── README.md
├── cleanup_data.py
├── create_model.py
├── data
│ ├── cleaned_data.csv
│ └── investments_VC.csv
├── requirements.txt
└── rf-up-86.pkl
cd Projects
git clone https://github.com/clamytoe/investments-vc.git
cd investments-vc
If you are an Anaconda user, this command will get you up to speed with the base installation.
conda create --name vc --file requirements.txt
conda activate vc
If you are just using normal Python, this will get you ready, but I highly recommend that you do this in a virtual environment. There are many ways to do this, the simplest using venv.
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
The initial dataset required a lot of tweaking in order to get it ready. The cleaned dataset exceeds the maximum size requirements for GitHub, so it was not provided. Not to worry though, I have provided a script to generate it.
Simply run the follwing command:
python cleanup_data.py
Created data/cleaned_data.csv
To generate the model, simply run the following command:
python create_model.py
Importing dataset: data/cleaned_data.csv
Processing data...
Resampling imbalanced classes...
Splitting the data into train, validation, and test sets...
Scaling numeric features...
One Hot Encoding categorical features...
Creating model...
Fitting the model...
Testing the model...
Classification Report
precision recall f1-score support
0 0.89 0.81 0.85 988
1 0.83 0.90 0.87 1012
accuracy 0.86 2000
macro avg 0.86 0.86 0.86 2000
weighted avg 0.86 0.86 0.86 2000
Confusion Matrix
[[805 183]
[ 98 914]]
Saving the model...
[DONE] Model saved to rf-up-86.pkl
- Cleaned up the data
- Analyzed the data
- Extracted some meaningful insights from the data
- Feature engineered 988 new features
- Successfully handled the imbalance of the target classes
- Performed some extensive model tuning to find optimal parameters
- Selected the best model
- Saved the model for deployment
- Create python script to prepare the data
- Create python script to create and save the model
- Deploy the model with FastAPI and gunicorn or Flask and nginx
- Containerize the model with Docker
- Deploy the model on the cloud
Distributed under the terms of the MIT license, "investments-vc" is free and open source software.
If you encounter any problems, please file an issue along with a detailed description.