Nick Grebe - Netscape Compatible
+++ Nick Grebe online +++ Data Science & AI in Maastricht +++ Geo AI, Edge ML, statistics & good music +++

ML Demo Bay

Machine Learning

Three tiny models on a real data excerpt.

This page keeps machine learning small on purpose: the UCI Wine Quality data, a cached training artifact, and instant predictions without runtime training.

Regression

Linear Regression

Estimates wine quality as a number from 0 to 10.

Target
quality

Prediction

4.24 / 10 Absolute error: 0.76

Live training

Final model: cached ridge weights
Epoch
5
Selected features
11
Progress
100%

Loss Split Final model: Standardized on train split 11

  • fixed acidity +0.08
  • volatile acidity -0.21
  • citric acid -0.06
  • residual sugar +0.03
  • chlorides -0.11
  • free sulfur dioxide +0.04
  • total sulfur dioxide -0.1
  • density -0.08
  • pH -0.06
  • sulphates +0.18
  • alcohol +0.26

Metrics

Test Accuracy 85% Test F1 0.42 Balanced Acc 64% Accuracy +/-1 90% Test MAE 0.51

Feature weights

  • fixed acidity +0.08
  • volatile acidity -0.21
  • citric acid -0.06
  • residual sugar +0.03
  • chlorides -0.11
  • free sulfur dioxide +0.04
  • total sulfur dioxide -0.1
  • density -0.08
  • pH -0.06
  • sulphates +0.18
  • alcohol +0.26
Classification

Logistic Regression

Estimates whether a sample belongs to the good class.

Target
quality >= 7

Prediction

0% standard Probability good: 0.003

Live training

Epoch 900: optimize weights
Epoch
900
Validation F1
0.538
Progress
100%

Loss Split Final model: Validation accuracy 0.8

  • fixed acidity +0.5
  • volatile acidity -0.43
  • citric acid +0.02
  • residual sugar +0.37
  • chlorides -0.39
  • free sulfur dioxide +0.07
  • total sulfur dioxide -0.47
  • density -0.45
  • pH -0.007
  • sulphates +0.71
  • alcohol +1.04

Metrics

Test Accuracy 85% Test F1 0.41 Balanced Acc 64%

Feature weights

  • fixed acidity +0.5
  • volatile acidity -0.43
  • citric acid +0.02
  • residual sugar +0.37
  • chlorides -0.39
  • free sulfur dioxide +0.07
  • total sulfur dioxide -0.47
  • density -0.45
  • pH -0.007
  • sulphates +0.71
  • alcohol +1.04

Confusion Matrix

FN
26
FP
9
TN
193
TP
12
Classification

Decision Tree

Shows a small, readable rule path.

Target
quality >= 7

Prediction

5 / 10 -> standard Rule path

Live training

Final model: cached CART rules
Epoch
9
Validation F1
0.583
Progress
100%

Loss Split Final model: Balanced accuracy 0.775

  1. alcohol > 10.45
  2. sulphates > 0.635
  3. alcohol > 11.15
  4. alcohol > 11.65
FN
12
FP
18
TN
189
TP
21

Metrics

Test Accuracy 86% Test F1 0.51 Balanced Acc 70%

Tree rules

  • alcohol > 10.45
  • sulphates > 0.635
  • alcohol > 11.15
  • alcohol > 11.65

Rule path

  1. alcohol <= 10.45
  2. fixed_acidity <= 11.45
  3. sulphates <= 0.595
  4. citric_acid > 0.025

Confusion Matrix

FN
20
FP
14
TN
188
TP
18