1. Data introduction
Data download URL: https://archive.ics.uci.edu/ml/datasets/Wine+Quality
https://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/
Paper download URL: https://www.sciencedirect.com/science/article/pii/S0167923609001377
Data description: Two data sets are included, relating to red and white wine samples from northern Portugal. The goal is to model wine quality based on physicochemical tests.
2. Modeling steps
(1) Load CSV data
(2) Convert string type data to floating point type
(3) Data normalization (maximum-minimum normalization)
(4) Cross validation
(5) Evaluate algorithm performance through RMSE
The following is the specific implementation code:
# -*- coding: utf-8 -*-
"""
Created on Mon May 9 15:23:51 2022
@author: xiaofeng
"""
# 1. load csv
# 2. convert string to float
# 3. normalization
# 4. cross validation
# 5. evaluate our algo(RMSE)
# 1.Import standard Lib
from math import sqrt
fro