Getting Recurssion limit error
Afficher commentaires plus anciens
here is my code of DBSCAN algorithm
codes.
function cluster = dbscan(iris, Eps, MinPts)
Eps=0.04;
MinPts=4;
cluster = zeros(size(iris,1),1);
classcounter = 0;
doLoop = 1;
while(doLoop)
classcounter = classcounter + 1;
notClassified = find(cluster == 0);
if(sum(notClassified) == 0)
doLoop = 0;
else
cluster(notClassified(1)) = classcounter;
cluster = dbrec(notClassified(1), iris, Eps, MinPts, cluster);
end
end
antal(max(cluster)) = 0;
for i = 1:size(iris,1)
antal(cluster(i)) = antal(cluster(i)) + 1;
end
temp = find(antal < 3);
for i = 1:size(temp,2)
cluster(find(cluster == temp(i))) = 0;
end
save cluster;
for dbrec function
function cluster = dbrec(pIdx, M, Eps, MinPts, cluster)
for i=1:size(M,1)
if(norm(M(i,:) - M(pIdx,:)) < Eps && cluster(i) == 0)
cluster(i) = cluster(pIdx);
cluster = dbrec(pIdx, M, Eps, MinPts, cluster);
end
end
I use a data file which is 4.5lakh values*5 .When i run the code I get Matlab Recurssion limit error. When i change the recurssion limit to 1000 or 2000 i get the same error and when i set it to 2500 the simulation goes on ffor the whole day without results.
I am in a catch 22 situation please help
with regards, mani
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Cluster Analysis and Anomaly Detection dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!