Skip to content

danielroshardt/Assignment-3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wine Classification Project

This project uses the UCI Wine dataset to classify wine into one of three cultivars using machine learning techniques. The entire workflow includes data preprocessing, exploratory data analysis (EDA), model training, hyperparameter tuning, and evaluation.


Dataset Overview

  • Source: UCI Machine Learning Repository
  • Instances: 178
  • Features: 13 chemical attributes of wines
  • Target Variable: Wine Class (1, 2, or 3)

Steps Performed

1. Exploratory Data Analysis (EDA)

  • Pairplots were generated for selected features.
  • Summary statistics confirmed no missing values or anomalies.
  • Class distributions were balanced using stratified splits.

2. Data Preparation

  • StandardScaler was used to normalize the features.
  • 80/20 train-test split was used with stratification on class.

3. Model Training & Hyperparameter Tuning

  • Logistic Regression: GridSearchCV tuned the regularization strength C. Best C = 0.01
  • SVM (Linear Kernel): Also tuned using GridSearchCV. Best C = 0.01

4. Evaluation

  • Test Accuracy: 100% for both models.
  • Precision, Recall, and F1-score were all perfect (1.00) across all classes.
  • PCA visualization showed clear class separability.

Conclusion

Both Logistic Regression and SVM performed excellently on this dataset, achieving perfect classification metrics. This is likely due to well-separated classes in the original feature space. PCA confirmed this visually.


Files Included

  • wine_classification.ipynb: Full code notebook
  • wine.data.csv: Dataset used
  • README.md: This summary
  • requirements.txt: Python package requirements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors