Effacer les filtres
Effacer les filtres

Set boundaries to label the classes before applying Gaussian distribution

2 vues (au cours des 30 derniers jours)
Thanaa
Thanaa le 27 Déc 2022
Modifié(e) : Ayush Anand le 7 Sep 2023
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

Réponses (1)

Ayush Anand
Ayush Anand le 7 Sep 2023
Modifié(e) : Ayush Anand le 7 Sep 2023
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!

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by