HomeMaterialsMachine LearningRandom Forest Classification – Customer Purchase Prediction

Random Forest Classification – Customer Purchase Prediction
Machine Learning

Random Forest Classification – Customer Purchase PredictionFree

(0 ratings)

Report
PDF (172 KB)
Suneel Mekala
Audisankara Deemed to be University
19 Aug 2026 (Uploaded)
3 Downloads
24 Views
Download

About this material

This Machine Learning lab experiment demonstrates Random Forest Classification for predicting whether a customer will purchase a product based on Age, Salary, Previous Purchases, and Browsing Time. The experiment uses a sample customer dataset and implements RandomForestClassifier with Python and Scikit-learn.

The experiment covers dataset creation, feature and target separation, train-test splitting, Random Forest model training, prediction, accuracy evaluation, confusion matrix, classification report, feature importance, and prediction for a new customer. The model uses 100 decision trees with a maximum depth of 5.

The demonstrated model achieves 1.0 accuracy on the test data, with the classification report showing 1.00 precision, recall, and F1-score for both classes. Feature importance is also calculated, with Salary having the highest importance among the four features.