%% Function wine_datamatrix()
% Load wine dataset into the data matrix X
% Attribute Y is the target variable
function [X, y] = wine_datamatrix()
    X = readtable("Data/Wine.csv");
    original_vars = ["Var1", "Var2", "Var3", "Var4", "Var5", "Var6", ...
                     "Var7", "Var8", "Var9", "Var10", "Var11", "Var12", ...
                     "Var13", "Var14"];
    renamed_vars  = ["Y", "Alcohol", "Malic Acid", "Ash", ...
                    "Alcalinity of ash", "Magnesium", ...
                     "Total Phenols", "Flavonoids",...
                     "Non-Flavanoid Phenols", ...
                     "Proanthocyanins", "Color intensity", "Hue", ...
                     "OD280/OD315 of diluted wines", "Proline"];

    X = renamevars (X, original_vars, renamed_vars);
    y = X.Y;
    X.Y = [];
    X = table2array(X);
end
