Browse Source

Change DB-SCAN parameters per dataset, Fix class enumerations

master
Apostolos Fanakis 6 years ago
parent
commit
28debd3ab5
  1. 19
      spike_sorting.m

19
spike_sorting.m

@ -270,11 +270,11 @@ for fileIndex=1:4
distThreshold = 0.15;
minPts = 30;
elseif fileIndex == 3
distThreshold = 0.32;
minPts = 30;
distThreshold = 0.40;
minPts = 50;
else
distThreshold = 0.36;
minPts = 35;
distThreshold = 0.30;
minPts = 40;
end
[~, dbScanClasses, ~] = dbscan(features(:, 6:7)', distThreshold, minPts);
@ -289,8 +289,7 @@ for fileIndex=1:4
dbScanClasses(dbScanClasses==2) = 1;
dbScanClasses(dbScanClasses==7) = 2;
elseif fileIndex == 4
dbScanClasses(dbScanClasses==1) = 7;
dbScanClasses(dbScanClasses==3) = 1;
dbScanClasses(dbScanClasses==3) = 7;
dbScanClasses(dbScanClasses==2) = 3;
dbScanClasses(dbScanClasses==7) = 2;
end
@ -316,10 +315,6 @@ for fileIndex=1:4
hierarchicalClusters(hierarchicalClusters==1) = 7;
hierarchicalClusters(hierarchicalClusters==2) = 1;
hierarchicalClusters(hierarchicalClusters==7) = 2;
elseif fileIndex == 3
hierarchicalClusters(hierarchicalClusters==1) = 7;
hierarchicalClusters(hierarchicalClusters==2) = 1;
hierarchicalClusters(hierarchicalClusters==7) = 2;
end
figure();
@ -351,6 +346,10 @@ for fileIndex=1:4
kMeansClasses(kMeansClasses==2) = 1;
kMeansClasses(kMeansClasses==3) = 2;
kMeansClasses(kMeansClasses==7) = 3;
elseif fileIndex == 4
kMeansClasses(kMeansClasses==3) = 7;
kMeansClasses(kMeansClasses==2) = 3;
kMeansClasses(kMeansClasses==7) = 2;
end
figure();

Loading…
Cancel
Save