Predicting whether a new customer will purchase a car based on a social network ad dataset using K Nearest Neighbour.
- Aditya Dwivedi - CDEA
- Swaraj Pal - DPE
- Vikas Shahu - DSE
- Sahil Mankar - DPE
The goal of this project is to build a model that can predict whether a new customer will purchase a car based on the social network ad dataset using the K Nearest Neighbors (KNN) algorithm. The dataset consists of information such as age, estimated salary, and whether the customer made a purchase or not. Our objective is to create a classifier that can accurately determine whether a customer will make a purchase based on their age and salary.
- Swaraj Pal (DPE):
- Make a Frontend and Backend of application.
- User Authentication and Authorization: Allow users to login and signup as either regular users or admin.
- Admin Functionality: Grant administrators the ability to manage user accounts.
- Integrate Flask Api and backend to frontend.
To set up the project, follow these steps:
-
Install the required Python libraries:
flask,sklearn,requests. You can install them using pip:pip install flask sklearn requests -
Run the
csv_to_db.pyscript to create a SQLite database namedcar_prediction.db. This script will create the necessary database using the provided CSV file. -
Create a
webhook_url.txtfile in the same directory asauthenticator.pyand add the webhook URL of your Discord channel as text. This webhook URL will be used to send verification codes during the login process.
To use the project, follow these steps:
-
Ensure that the
car_prediction.dbdatabase has been created by running thecsv_to_db.pyscript andwebhook_url.txtfile contains your discord webhook link. -
Run the
lecun_api.pyscript. This will start the Flask API and make the website accessible. -
Open your web browser and navigate to
127.0.0.1:5001to access the website. From there, you can input the age and salary of a new customer and obtain the predicted probability of the customer buying a car.
Please note that this Above porject task is my individual contributions made for self-learning purposes. The main branch contains the final version of the project, which is the result of collaboration among our team members.