Documentation of 'org.encog.ml.kmeans.BasicCluster' Java class
BasicCluster
org.encog.ml.kmeans

Class BasicCluster

  • All Implemented Interfaces:
    MLCluster


    public class BasicCluster
    extends java.lang.Object
    implements MLCluster
    Holds a cluster of MLData items that have been clustered by the KMeansClustering class.
    • Constructor Detail

      • BasicCluster

        public BasicCluster(Cluster<BasicMLDataPair> cluster)
        Construct a cluster from another.
        Parameters:
        cluster - The other cluster.
    • Method Detail

      • add

        public final void add(MLData pair)
        Add to the cluster.
        Specified by:
        add in interface MLCluster
        Parameters:
        pair - The pair to add.
      • createDataSet

        public final MLDataSet createDataSet()
        Create a dataset from the clustered data.
        Specified by:
        createDataSet in interface MLCluster
        Returns:
        The dataset.
      • get

        public final MLData get(int pos)
        Get the specified data item by index.
        Specified by:
        get in interface MLCluster
        Parameters:
        pos - The index of the data item to get.
        Returns:
        The data item.
      • getCentroid

        public final Centroid<?> getCentroid()
        Returns:
        The centroid.
      • getData

        public final java.util.List<MLData> getData()
        Specified by:
        getData in interface MLCluster
        Returns:
        The data in this cluster.
      • remove

        public final void remove(MLData pair)
        Remove the specified item.
        Specified by:
        remove in interface MLCluster
        Parameters:
        pair - The item to remove.
      • setCentroid

        public final void setCentroid(BasicMLDataPairCentroid c)
        Set the centroid.
        Parameters:
        c - The new centroid.
      • size

        public final int size()
        Specified by:
        size in interface MLCluster
        Returns:
        The number of items.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.