Class CFSFDP<O>

  • Type Parameters:
    O - Object type
    All Implemented Interfaces:
    elki.Algorithm, ClusteringAlgorithm<Clustering<SimplePrototypeModel<elki.database.ids.DBID>>>

    @Reference(authors="A. Rodriguez and A. Laio",
               title="Clustering by fast search and find of density peaks",
               booktitle="Science 344 (6191)",
               url="https://doi.org/10.1126/science.1242072",
               bibkey="doi:10.1126/science.1242072")
    public class CFSFDP<O>
    extends java.lang.Object
    implements ClusteringAlgorithm<Clustering<SimplePrototypeModel<elki.database.ids.DBID>>>
    Clustering by fast search and find of density peaks (CFSFDP) is a density-based clustering method similar to mean-shift clustering.

    While the authors named this "fast", the runtime clearly is O(n²) making this a rather slow method compared to k-means. The Science paper also does not do a good comparison to existing methods such as HDBSCAN, OPTICS, and mean-shift clustering.

    This is an adaptation of the original method to use priority search for accelerations, so the runtime can be better than pairwise distance computations (but supposedly still is O(n²))

    Reference:

    A. Rodriguez and A. Laio
    Clustering by fast search and find of density peaks
    Science 344 (6191), 2014

    Since:
    0.8.0
    Author:
    Erich Schubert
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CFSFDP.Par<O>
      Parameterizer
      • Nested classes/interfaces inherited from interface elki.Algorithm

        elki.Algorithm.Utils
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected double dc
      Distance cutoff.
      protected elki.distance.Distance<? super O> distance
      Distance function used.
      protected int k
      Number of clusters to find.
      private static elki.logging.Logging LOG
      Class logger.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CFSFDP​(elki.distance.Distance<? super O> distance, double dc, int k)
      Constructor.
    • Field Detail

      • LOG

        private static final elki.logging.Logging LOG
        Class logger.
      • distance

        protected elki.distance.Distance<? super O> distance
        Distance function used.
      • dc

        protected double dc
        Distance cutoff.
      • k

        protected int k
        Number of clusters to find.
    • Constructor Detail

      • CFSFDP

        protected CFSFDP​(elki.distance.Distance<? super O> distance,
                         double dc,
                         int k)
        Constructor.
        Parameters:
        distance - distance function
        dc - distance cutoff
        k - number of clusters
    • Method Detail

      • getInputTypeRestriction

        public elki.data.type.TypeInformation[] getInputTypeRestriction()
        Specified by:
        getInputTypeRestriction in interface elki.Algorithm
      • run

        public Clustering<SimplePrototypeModel<elki.database.ids.DBID>> run​(elki.database.relation.Relation<O> relation)
        Perform CFSFDP clustering.
        Parameters:
        relation - data relation
        Returns:
        clustering