AI-Vs / README.md
afshin-dini's picture
Update readme
39a1cd5

A newer version of the Gradio SDK is available: 6.13.0

Upgrade
metadata
title: AI Vs
emoji: 💻
colorFrom: purple
colorTo: pink
sdk: gradio
sdk_version: 5.49.0
app_file: app.py
pinned: false
license: mit
short_description: This is a demo for AI-Vs challenge

AI-Vs

This is a solution for AI-Vs challenge "Predicting Vs from CPTu for OWTs" using deep learning models.

Overview of the project

Methods

For this challenge, we have used few methods including:

  • Using LightGBM model with the features extracted and feature engineered from the data for the augmented dataset.
  • Using deep learning models, MLP, on the augmented dataset using the selected eight features.
  • Using multiple RF models on the augmented dataset using the selected eight features.
  • Using TabNet model for tabular data.
  • Using ensemble of the models with AutoGluon.
  • Using TabPFN model for tabular data.

Prepare the Environment

To run the code locally, install the following dependencies:

  • Python 3.10 is needed at least.
  • Install poetry if you do not have it in your system from here.
  • Create a virtual env preferably with virtualenv wrapper and mkvirtualenv -p $(which python3.10) ENVNAME.
  • Then run poetry install to install the dependencies. Now the environment is ready to run the code.

How to Use Locally

This repo can be used for training and testing the models for predicting Vs from CPTu data.

  • To do the data augmentation, you can use the following command:
ai_vs -vv --output_path=data/augmented_train.csv --train_path=data/Train.csv augment
  • To run the analysis part, you can use the following command:
ai_vs -vv --output_path=data/clusters.png --train_path=data/augmented_train.csv analysis
  • To run the LightGBM model, you can use the following command:
ai_vs -vv --test_path=data/Test.csv --train_path=data/augmented_train.csv --output_path=data/LightGBM.csv lightgbm
  • To run the deep learning model, you can use the following command:
ai_vs -vv --train_path=data/augmented_train.csv --test_path=data/Test.csv --output_path=data/MLP.csv mlp
  • To run the multiple deep learning models, you can use the following command:
ai_vs -vv --train_path=data/augmented_train.csv --test_path=data/Test.csv --output_path=data/Multiple_MLP.csv multi-mlp
  • To run the multiple RF models, you can use the following command:
ai_vs -vv --train_path=data/augmented_train.csv --test_path=data/Test.csv --output_path=data/Multiple_RF.csv multi-rf
  • To run the TabNet model, you can use the following command:
ai_vs -vv --train_path=data/augmented_train.csv --test_path=data/Test.csv --output_path=data/TabNet.csv tabnet
  • To run the ensemble of the models, you can use the following command:
ai_vs -vv --train_path=data/augmented_train.csv --test_path=data/Test.csv --output_path=data/Autogluon.csv autogluon
  • To run the TabPFN model, you can use the following command:
ai_vs -vv --train_path=data/augmented_train.csv --test_path=data/Test.csv --output_path=data/TabPFN.csv tabpfn

How to Develop

Do the following only once after creating your project:

  • Init the git repo with git init.
  • Add files with git add ..
  • Then git commit -m 'initialize the project'.
  • Add remote url with git remote add origin REPO_URL.
  • Then git branch -M master.
  • git push origin main. Then create a branch with git checkout -b BRANCH_NAME for further developments.
  • Install poetry if you do not have it in your system from here.
  • Create a virtual env preferably with virtualenv wrapper and mkvirtualenv -p $(which python3.10) ENVNAME.
  • Then git add poetry.lock.
  • Then pre-commit install.
  • For applying changes use pre-commit run --all-files.