% Example: Wine data classification using RBFs load wineclassification; %Loads data in matrix X, t [Xs,Params]=StandardScaler(X,13); % Change the class from "1, 2, 3" to e1, e2, e3 (cols of the identity): temp=eye(3); T=temp(:,t'); Xs=Xs'; [Xtrain,Xtest,Ttrain,Ttest]=TrainTestSplit(Xs,T,0.3); NetParams=rbfOLS(Xtrain,Ttrain,0.1,70); Ztest=rbfpredict(NetParams,Xtest); % Should not do this, but we are checking to see if our code is correct. %Ztest=rbfpredict(NetParams,Xtrain); %Ttest=Ttrain; % Convert the columns of the identity back to "1, 2, or 3" [~,classout]=max(Ztest,[],1); [~,trueout]=max(Ttest,[],1); C=conf_matrix(trueout,classout,3); C