clear

%% load network
% loaded_net=load("NLD_network_polar_01_log_mvm_c1_05.mat");
loaded_net=load("NLD_network_minmax_c1_05.mat");
% loaded_net=load("NLD_network_polar_01_c1_05.mat");
% loaded_net=load("NLD_network_polar_01_mvm_c1_05.mat");
% loaded_net=load("NLD_network_polar_01_log_c1_05.mat");
net=loaded_net.net;
clear("loaded_net"); % eliminate useless data from workspace


%% load testing data set

% loaded_testdata=load("NLD_4testing_polar_01_log_mvm_c1_01.mat");
loaded_testdata=load("NLD_4testing_minmax_c1_01.mat");
% loaded_testdata=load("NLD_4testing_polar_01_c1_01.mat");
% loaded_testdata=load("NLD_4testing_polar_01_mvm_c1_01.mat");
% loaded_testdata=load("NLD_4testing_polar_01_log_c1_01.mat");

rho=loaded_testdata.rho;
target=loaded_testdata.target;
clear("loaded_testdata"); % eliminate useless data from workspace

%% test network
pred = classify(net, rho);

error = numel(pred(pred ~= target))/length(pred) * 100;

disp("error:");
disp(error)
figure;plot(pred);

