Set boundaries to label the classes before applying Gaussian distribution

1 次查看(过去 30 天)
Hello,
I'm working with neural decoding and I have to cluster the spikes into three classes using Gaussian distribution, I have found the boundaries for each class that will make them well separable but when I run the code the accuracy is very low and I couldn't know why the code isn't able to assign the spikes into the correct classes. I have 16 features in my data and I used two of those features to set the boundaries the first one is the start of the spike (first feature) the second one is the 8th feature which is the peak of the spike (lowest point). what might be the problem
for i=1:N
if spike_waveform(1,i)>=-4.08e-5 && spike_waveform(1,i)<2.13e-5 &&...
spike_waveform(8,i)>=-3.54e-4 && spike_waveform(8,i)<-1.96e-4
spike_Idx(1,k1)=i;
if k1==90
continue
end
k1=k1+1;
L(k)=1;
k=k+1;
elseif spike_waveform(1,i)>=-2.79e-5 && spike_waveform(1,i)<5.81e-5 &&...
spike_waveform(8,i)>=-3.77e-4 && spike_waveform(8,i)<-2.06e-4
spike_Idx(2,k2)=i;
if k2==90
continue
end
k2=k2+1;
L(k)=2;
k=k+1;
else
spike_Idx(3,k3)=i;
if k3==90
continue
end
k3=k3+1;
L(k)=3;
k=k+1;
end
end

回答(1 个)

Ayush Anand
Ayush Anand 2023-9-7
编辑:Ayush Anand 2023-9-7
Hi Thanaa,
I understand you are trying to cluster the spikes from some neural decoding into three classes using Gaussian distribution and are not getting satisfiable accuracy. Here are a few possible reasons behind this and the possible workarounds you could follow:
  1. Feature Selection: Since there are 16 features and you are using only two of them, it might be possible that the data classification is not fully encapsulated in those two features and hence you are getting low accuracy. You might want to add more features, or try different combinations of features (manual feature selection) to see which features are important for classifying the data.
  2. Feature Scaling: Check if the features you are using for clustering are on a similar scale. If the features have different magnitudes, it might be necessary to scale them to ensure that they contribute equally to the clustering process. You can use techniques like min-max scaling or standardization to normalize the features.
  3. Evaluation Metrics: Consider using other evaluation metrics such as precision, recall, or F1 score to assess the performance of your clustering algorithm. These metrics can provide more insight into how the features selected might be leading to a bias in the classification boundary.
  4. Alternative Clustering Algorithms: You can try other clustering algorithms such as k-means or Gaussian Mixture Models, to see how their results compare with the performance of the Gaussian distribution method.
You can refer to the following page for more information on clustering using Gaussian methods:
  1. https://in.mathworks.com/help/stats/gmdistribution.cluster.html
  2. https://in.mathworks.com/help/stats/clustering-using-gaussian-mixture-models.html
I hope this helps!

类别

Help CenterFile Exchange 中查找有关 Pattern Recognition and Classification 的更多信息

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by