pillmannr

pillmannr / winequalitypredictor / 0.1.1

README.md

Overview

This algorithm is a Support Vector Machine that determines whether to recommend or not recommend wine based on a UCI dataset. Wine data includes both red and whites.

The recommendation is purely based on the rating the wine is likely to receive, and is therefore based on someone else's perception of the wine. I would not recommend necessarily buying or passing on an expensive bottle purely based on this algorithm.

Applicable Scenarios and Problems

Given the physicochemical data of a particular wine, this algorithm aims to recommend or not.

Usage

Input

Input Parameters. This should come in the form of a string of a dictionary.

  • Fixed Acidity (The fixed acidity of the wine (g(tartaric acid)/dm^3))
  • Volatile Acidity (The volatile acidity of the wine (g(acetic acid)/dm^3))
  • Citric Acid (The citric acid of the wine (g/dm^3))
  • Residual Sugar (The residual sugar of the wine (g/dm^3))
  • Chlorides (The chlorides of the wine (g(sodium chloride)/dm^3))
  • Free Sulfur Dioxide (The free sulfur dioxide of the wine (mg/dm^3))
  • Total Sulfur Dioxide (The total sulfur dioxide of the wine (mg/dm^3))
  • Density (The density of the wine (g/dm^3))
  • PH (The ph level of the wine)
  • Sulphates (The sulphates level of the wine (g(potassium sulphate)/dm^3))
  • Alcohol (The alcohol percentage of the wine (% volume))

This algorithm takes care of a few preprocessing steps. First, any missing fields are patched by defaulting to the average value for that field in the dataset. Then, fields are max-min scaled based on the maximum and minimum values found in the data training set.

Output

This algorithm returns a string, either indicating recommendation or no recommendation.

Examples

Example input:

"{'fixed_acidity': 8.7000, 'volatile_acidity':0.6900, 'citric_acid': 0.3100, 'residual_sugar':3.000, 'chlorides': 0.0860, 'free_sulfur_dioxide': 23.0, 'total_sulfur_dioxide': 81.0, 'density': 1.0002, 'pH': 3.4800, 'sulphates':0.7400, 'alcohol':11.6}"

The algorithm should recommend this kind of wine.