Business definition:
A company (fictional) wants to analyze the quality of their wine production. Their aim is to improve their target marketing by modeling tastes from their desired niche market. Their brand consists of red and white wines.
Data:
The data was sourced from UCL machine learning repository with 12 variables in the dataset which are continuous.
Methodology:
I displayed the first five list of wine in each category
I also checked for null values in each category which came back false meaning that there was absence of null values in the dataset.
Data Visualization:
I made use of matplotlib.pyplot to create scatter plots and histograms for the wine categories.
White wine
Red wine
Histogram
Data Splitting:
I split the data into training and test sets using scikitlearn library with a test size of 34%.
Building the neural network:
I used the Keras sequential model and dense layer to build the structure of the network. Relu activation was used for both the input layer and the hidden layer ( I used only one hidden layer). Then sigmoid activation function for the output layer.
Compilation:
During compilation, the loss was calculated using binary-crossentropy since it also works with multi-class classification models like this, adam optimizer was used and ‘accuracy’ metrics.
Training:
I trained the model using 3 epochs and 1 batch-size leading to a 93% accuracy and 17% loss.
Correlation:
The attribute correlation of the trained model was visualized used the seaborn library in form of a heat map.
Finally, the model was saved as a json file.
Conclusion:
This is the Github repo for this project and my LinkedIn profile for corrections and suggestions.