Facebook
From Sloppy Echidna, 3 Years ago, written in R.
This paste is a reply to Untitled from Mustard Water Vole - view diff
Embed
Download Paste or View Raw
Hits: 78
  1. lab <- liste
  2.  
  3. predicted <- kmeans(lab[,c(2,3,4)],10,nstart = 20)
  4.  
  5. tahmin <- cbind.data.frame(lab, predicted$cluster)
  6.  
  7. colnames(tahmin) <- c("isim", "lab1", "lab2", "lab3", "Data", "Class")
  8.  
  9.  
  10. View(tahmin, "lab")
  11.  
  12. ## dbscan
  13.  library("dbscan")
  14.  cl <- hdbscan(U, minPts = 5)
  15.  
  16. #plot outlier scores
  17.  
  18.  plot(sort(cl$outlier_scores), ylab="hdbscan score")
  19. abline(h=quantile(cl$outlier_scores,c(.9,.95)), col=c("blue","red"))
  20. legend("bottomright", legend = c("90 percentile", "95 Percentile"), lty=1, col=c("blue","red") , bty = "n")
  21.  
  22. #find which rows are outlier
  23. which(cl$outlier_scores >quantile(cl$outlier_scores,0.95))
  24.  

Replies to Re: Untitled rss

Title Name Language When
Re: Re: Untitled Funky Pheasant rsplus 3 Years ago.