Skip to content

Venkat-2341/Ad_click_prediction

Repository files navigation

Ad click prediction using behavioral data

This project focusses on predicting whether a user will click on Ad or not based on certain inputs such as:

  • Daily Time Spent on Site
  • Age
  • Area Income
  • Daily Internet Usage
  • Ad Topic Line
  • City
  • Male
  • Country

To install all the dependancies, run the following command

pip install -r requirements.txt

To run the model

  • In bash: python main.py
  • Then in the browser: http://your-ip-address:8080/docs
  • Use the predict endpoint to predict whether the gievn user will click the ad or not

Project WorkFlow

  1. Created a pipeline which involves the preprocessing steps such as encoding the categorical columns to numerical and scaling the values using MinMaxScaler.

  2. Used various Machine Learning Algorithms such as Random Forest, Gradient Boosting, Support Vector Classifier and used GridSearchCV to get the optimal hyperparameters for the model.

  3. Used accuracy metrics such as precision, recall, confusion matrix, roc-auc curves to determine which model to use. Additionally calculated and plotted the feature importances.

  4. Saved the model using pickle and stored it in /models/final.pkl

  5. With the help of Pydantic, FastAPI and Uvicorn, built the app which when give the various input features gives us a binary output(0/1).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published