{"id":20430667,"url":"https://github.com/ashishsingh789/customer_purchase_prediction_using_decision-tree-_classifier","last_synced_at":"2026-04-11T09:02:10.012Z","repository":{"id":258524816,"uuid":"866118276","full_name":"AshishSingh789/Customer_Purchase_Prediction_Using_Decision-Tree-_Classifier","owner":"AshishSingh789","description":"Decision Tree Classifier to predict customer purchases using demographic and behavioral data. Key steps: data preprocessing, EDA, model training, evaluation, and feature importance analysis.","archived":false,"fork":false,"pushed_at":"2024-10-01T17:28:02.000Z","size":133,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T22:08:00.947Z","etag":null,"topics":["data","datascience","desiciontree","eda","machine-learning-algorithms","matplotlib","numpy","pandas-dataframe","python","seaborn"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AshishSingh789.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-01T17:18:45.000Z","updated_at":"2024-10-02T08:13:43.000Z","dependencies_parsed_at":"2024-10-19T12:04:34.394Z","dependency_job_id":null,"html_url":"https://github.com/AshishSingh789/Customer_Purchase_Prediction_Using_Decision-Tree-_Classifier","commit_stats":null,"previous_names":["rohit-kumar873/customer_purchase_prediction_using_decision-tree-_classifier"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AshishSingh789/Customer_Purchase_Prediction_Using_Decision-Tree-_Classifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshishSingh789%2FCustomer_Purchase_Prediction_Using_Decision-Tree-_Classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshishSingh789%2FCustomer_Purchase_Prediction_Using_Decision-Tree-_Classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshishSingh789%2FCustomer_Purchase_Prediction_Using_Decision-Tree-_Classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshishSingh789%2FCustomer_Purchase_Prediction_Using_Decision-Tree-_Classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AshishSingh789","download_url":"https://codeload.github.com/AshishSingh789/Customer_Purchase_Prediction_Using_Decision-Tree-_Classifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshishSingh789%2FCustomer_Purchase_Prediction_Using_Decision-Tree-_Classifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31674624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T08:18:19.405Z","status":"ssl_error","status_checked_at":"2026-04-11T08:17:08.892Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","datascience","desiciontree","eda","machine-learning-algorithms","matplotlib","numpy","pandas-dataframe","python","seaborn"],"created_at":"2024-11-15T08:08:24.269Z","updated_at":"2026-04-11T09:02:09.994Z","avatar_url":"https://github.com/AshishSingh789.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Customer Purchase Prediction Using Decision Tree Classifier\n\n# Project Overview\n\nThis project involves building a decision tree classifier to predict whether a customer will purchase a product or service. The prediction is based on demographic and behavioral data. The dataset used is similar to the Bank Marketing dataset from the UCI Machine Learning Repository.\n\n# Task Description\n\nThe task was part of my virtual internship at Prodigy Infotech. The main objective was to build a machine learning model (Decision Tree) that can classify customers based on whether they are likely to purchase a product or service. This model helps in understanding which customer segments are most likely to convert, aiding marketing and sales efforts.\n\n# Key Steps Performed\n\n# Data Preprocessing:\n\n#Handled missing values.\n\nCategorical variables were encoded using techniques like one-hot encoding.\nScaled and normalized the data for better model performance.\nExploratory Data Analysis (EDA):\n\n# Analyzed the distribution of variables (age, job type, marital status, etc.).\n\nExamined relationships between key variables and purchase decisions.\nVisualized correlations between features using heatmaps.\nBuilding the Decision Tree Classifier:\n\n# Split the data into training and testing sets.\n\nTrained a decision tree classifier to predict customer purchases.\nOptimized the model by tuning hyperparameters like maximum depth, splitting criteria, etc.\nModel Evaluation:\n\n# Evaluated the model using metrics like accuracy, precision, recall, and F1-score.\n\nGenerated a confusion matrix to visualize performance.\nFeature Importance:\n\nAnalyzed which features contributed the most to the model's decision-making process.\n\n# Libraries Used\npandas for data manipulation\nmatplotlib and seaborn for data visualization\nscikit-learn for machine learning model building and evaluation\nNumPy for numerical operations\n\n# Dataset\n\nThe dataset used is similar to the Bank Marketing dataset from the UCI Machine Learning Repository, containing features like:\n\nAge: Age of the customer.\nJob: Type of job.\nMarital Status: Whether the customer is married, single, or divorced.\nEducation: Level of education.\nBalance: Bank balance of the customer.\nCampaign: Number of contacts performed during this campaign.\nPrevious Outcome: Outcome of the previous marketing campaign.\nPurchase: Whether the customer purchased the product (target variable).\n\n# Results\n\nThe decision tree classifier performed well in predicting customer purchases, with a focus on improving accuracy and interpretability through feature importance analysis.\n\n# How to Use This Repository\n\nCould you clone the repository to your local machine?\nInstall the required libraries by running the following:\nbash\nCopy code\npip install -r requirements.txt\nRun the Jupyter Notebook or Python scripts to see the full analysis and model-building process.\nFuture Work\n\nImplement other machine learning models like Random Forest or Logistic Regression for comparison.\n\nExplore feature engineering techniques to improve model performance.\n\n\n# Glimps of Data Visualisation \n\n\n\n![classification_report_heatmap](https://github.com/user-attachments/assets/be02b9c6-3e7c-4e5a-9ee9-f272321078de)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashishsingh789%2Fcustomer_purchase_prediction_using_decision-tree-_classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashishsingh789%2Fcustomer_purchase_prediction_using_decision-tree-_classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashishsingh789%2Fcustomer_purchase_prediction_using_decision-tree-_classifier/lists"}