|
@ -2,8 +2,8 @@ |
|
|
%% EMAIL[1] : apostolof@auth.gr |
|
|
%% EMAIL[1] : apostolof@auth.gr |
|
|
%% AUTHOR[2] : Charalampos Papadiakos (8302) |
|
|
%% AUTHOR[2] : Charalampos Papadiakos (8302) |
|
|
%% EMAIL[2] : charaldp@ece.auth.gr |
|
|
%% EMAIL[2] : charaldp@ece.auth.gr |
|
|
%% AUTHOR[3] : Hlektra Mitsi () |
|
|
%% AUTHOR[3] : Hlektra Mitsi (8536) |
|
|
%% EMAIL[3] : |
|
|
%% EMAIL[3] : ilektraem@auth.ece.gr |
|
|
%% $DATE : 28-December-2018 12:45:00 $ |
|
|
%% $DATE : 28-December-2018 12:45:00 $ |
|
|
%% $Revision : 1.00 $ |
|
|
%% $Revision : 1.00 $ |
|
|
%% DEVELOPED : 9.0.0.341360 (R2016a) |
|
|
%% DEVELOPED : 9.0.0.341360 (R2016a) |
|
@ -111,7 +111,8 @@ clear(clearvars{:}) |
|
|
clear clearvars |
|
|
clear clearvars |
|
|
|
|
|
|
|
|
for fileIndex=1:4 |
|
|
for fileIndex=1:4 |
|
|
fprintf('Loading evaluation dataset no. %d \n', fileIndex); |
|
|
fprintf('========================================================\n'); |
|
|
|
|
|
fprintf('Loading evaluation dataset no. %d\n', fileIndex); |
|
|
filename = sprintf('dataset\\Data_Eval_E_%d.mat', fileIndex); |
|
|
filename = sprintf('dataset\\Data_Eval_E_%d.mat', fileIndex); |
|
|
Dataset = load(filename); |
|
|
Dataset = load(filename); |
|
|
data = double(Dataset.data); |
|
|
data = double(Dataset.data); |
|
@ -257,7 +258,7 @@ for fileIndex=1:4 |
|
|
|
|
|
|
|
|
%% Q.2.5 |
|
|
%% Q.2.5 |
|
|
accuracy = MyClassify(features, spikeClass'); |
|
|
accuracy = MyClassify(features, spikeClass'); |
|
|
fprintf('Accuracy achieved is %.2f%%\n\n', accuracy); |
|
|
fprintf('Accuracy achieved is %.2f%%\n', accuracy); |
|
|
|
|
|
|
|
|
% clustering using DB-SCAN algorithm |
|
|
% clustering using DB-SCAN algorithm |
|
|
% code for DB-SCAN downloaded from here: |
|
|
% code for DB-SCAN downloaded from here: |
|
@ -304,7 +305,7 @@ for fileIndex=1:4 |
|
|
xlabel('PCA feature 1'); |
|
|
xlabel('PCA feature 1'); |
|
|
ylabel('PCA feature 2'); |
|
|
ylabel('PCA feature 2'); |
|
|
accuracy = classperf(spikeClass',dbScanClasses); |
|
|
accuracy = classperf(spikeClass',dbScanClasses); |
|
|
fprintf('Accuracy achieved with DB-SCAN is %.2f%%\n\n', accuracy.CorrectRate*100); |
|
|
fprintf('Accuracy achieved with DB-SCAN is %.2f%%\n', accuracy.CorrectRate*100); |
|
|
|
|
|
|
|
|
% hierarchical clustering |
|
|
% hierarchical clustering |
|
|
distances = pdist(features(:, 6:7)); |
|
|
distances = pdist(features(:, 6:7)); |
|
@ -331,7 +332,7 @@ for fileIndex=1:4 |
|
|
xlabel('PCA feature 1'); |
|
|
xlabel('PCA feature 1'); |
|
|
ylabel('PCA feature 2'); |
|
|
ylabel('PCA feature 2'); |
|
|
accuracy = classperf(spikeClass',hierarchicalClusters); |
|
|
accuracy = classperf(spikeClass',hierarchicalClusters); |
|
|
fprintf('Accuracy achieved with hierarchical clustering is %.2f%%\n\n', accuracy.CorrectRate*100); |
|
|
fprintf('Accuracy achieved with hierarchical clustering is %.2f%%\n', accuracy.CorrectRate*100); |
|
|
|
|
|
|
|
|
% clustering using kmeans algorithm |
|
|
% clustering using kmeans algorithm |
|
|
rng(1); % For reproducibility |
|
|
rng(1); % For reproducibility |
|
|