This project focuses on the development and evaluation of machine learning models to predict credit card application and crime rate. The primary tools used in this project include PyCaret, LightGBM, and various Python libraries.
This repository contains two analysis cases:
-
Credit Card Application:
- Objective: Build a classification model with a binary target that predicts whether a credit card application should be approved or not.
- Notebook:
credito_model.ipynb
-
Crime Rate:
- Objective: Build a regression model to predict the crime rate.
- Notebook:
crimen_model.ipynb
To set up the environment for this project, follow the steps below:
-
Open your terminal (outside of your development environment) and run the following command to install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Add Homebrew to your PATH:
nano ~/.zshrc export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"
-
Reload your shell configuration:
source ~/.bash_profile # or source ~/.zshrc, depending on your shell
-
Activate your virtual environment within your development tool
conda activate myenv
-
Install the required libraries using 'brew' and 'pip':
brew install libomp
-
After installing libomp, export the necessary environment variables for LightGBM:
nano ~/.zshrc export CMAKE_ARGS="-DOpenMP_C_FLAGS=-Xpreprocessor\ -fopenmp\ -I$(brew --prefix libomp)/include -DOpenMP_C_LIB_NAMES=omp -DOpenMP_CXX_FLAGS=-Xpreprocessor\ -fopenmp\ -I$(brew --prefix libomp)/include -DOpenMP_CXX_LIB_NAMES=omp -DOpenMP_omp_LIBRARY=$(brew --prefix libomp)/lib/libomp.dylib"
-
Install the LightGBM library:
pip install lightgbm
To install the required dependencies, run:
pip install -r requirements.txt
To run the models and analyses, use the provided Jupyter notebooks:
credito_model.ipynb
: Credit model analysis and trainingcrimen_model.ipynb
: Crime model analysis and training
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
Feel free to further customize this README.md
file to fit your specific needs.