ML: Clustering algorithm R packet-density clustering

Source: Internet
Author: User

Density Clustering

    • FPC::d Bscan

FPC::d Bscan

Dbscan Core idea: If a point, within the range of its EPs, is not less than minpts points, then the point is the core point. A cluster is formed between the core and its neighbors within the EPS range. In a cluster, if more than one point appears to be the core point, the clusters centered on these core points are merged. Note that the parameter EPS settings, if the EPS is set too large, then all points will be grouped into a cluster, if set too small, then the number of clusters will be too many. If the minpts is set too large, many points will be considered noise points (calculate the distance matrix first, then look at the approximate distance, and find a reliable setting for the radius)

Advantages:

    • Insensitive to noise.
    • Can find any shape of the cluster.

Disadvantages:

    • The results of clustering have a great relationship with the parameters.
    • Dbscan Use fixed parameters to identify clusters, but when the degree of sparse clustering is different, the same criteria may destroy the natural structure of the cluster, that is, the more sparse clusters are divided into multiple classes or dense and relatively close to the class will be merged into a cluster
> Library (FPC)# as before, remove the species attribute from the Data sample > DS <-dbscan (Iris2, eps=0.42, minpts=5 )#  Compare clusters with original class labels> table (ds$cluster, iris$species)       Setosa versicolor virginica  0      2  1               0         0  2      0         PNs         0  3      0          3        33

In the above data table, 1 to 3 is the identified 3 clusters, and 0 represents the noise data or the point of interest, that is, objects that do not belong to any cluster.

Plot (ds, IRIS2)

View partial feature map plot (Ds,iris2[c (1,4)))

The FPC package also provides another function plotcluster () that shows the clustering analysis, and it is worth mentioning that the data will be projected into different clusters
Plotcluster (Iris2, Ds$cluster)

Resources:

    • https://www.douban.com/note/495288321/
    • http://www.36dsj.com/archives/63216
    • Https://cran.r-project.org/web/packages/dbscan/index.html

ML: Clustering algorithm R packet-density clustering

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.