Home›Materials›Machine Learning›Random Forest Classification – Customer Purchase Prediction
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.
Preview
Preview of Random Forest Classification – Customer Purchase Prediction
More Materials
Machine Learning – Unit V: Clustering
Suneel Mekala · 1 downloads
Machine Learning – Unit IV: LDA, Perceptron, SVM & Regression
Suneel Mekala · 1 downloads
Machine Learning – Unit II: Nearest Neighbor Based Models
Suneel Mekala · 0 downloads
Introduction to Machine Learning – Unit I Full Notes
Suneel Mekala · 0 downloads