Yokutjon Tohirova
Back to projects

Machine Learning Project

Restaurant Sales Prediction

Transaction analysis and classification-model comparison

An end-to-end machine learning project designed to identify factors associated with high-value restaurant sales and compare classification models for predicting transaction performance.

Restaurant Sales AnalysisMachine Learning Workflow
Illustrative visualization of the restaurant sales machine learning workflow

254

Restaurant transactions analyzed

4

Classification models evaluated

2

Engineered sales variables

Problem

What factors are associated with high-value sales?

The project examined transaction-level characteristics including price, quantity sold, purchase type, city, payment method, and manager.

The main classification objective was to predict whether a transaction's total sales exceeded the median sales value. This converted the business question into a reproducible binary classification task.

Methodology

From raw transactions to model comparison

01

Data preparation

Cleaned the transaction data, reviewed missing values, corrected data types, and prepared numerical and categorical variables for analysis.

02

Feature engineering

Created total_sales by multiplying price by quantity sold, then created a binary high_sales target using the median total-sales value.

03

Model development

Trained logistic regression, ridge logistic regression, lasso logistic regression, and decision-tree classification models.

04

Model evaluation

Compared model accuracy, interpretability, stability, complexity, and potential overfitting to identify the most appropriate approach.

Feature engineering

Creating measurable sales outcomes

Total sales

Price × Quantity Sold

Represents the monetary value of each transaction.

High sales

Total Sales > Median

Creates the binary target used by the classification models.

Key findings

Regularization provided the strongest overall balance

01

Price and quantity sold were important indicators of high-value transactions.

02

Purchase type and city also contributed meaningful predictive information.

03

Logistic regression provided a strong and interpretable baseline model.

04

Regularized logistic regression offered the best balance of stability, complexity, and interpretability.

05

The decision tree captured nonlinear relationships but was more vulnerable to overfitting because of the small dataset.

Limitations

Interpreting results from a small dataset

The dataset contained 254 transactions, so the evaluation results should be interpreted cautiously. A model can appear accurate on a small test set while performing differently on new business data.

Additional transactions, repeated cross-validation, broader feature coverage, and testing across multiple restaurants would strengthen future analysis.

Technology

Tools used throughout the analysis

PythonPandasNumPyScikit-learnMatplotlibJupyter Notebook