org.encog.ml.kmeans
Class BasicCluster
- java.lang.Object
-
- org.encog.ml.kmeans.BasicCluster
-
-
Constructor Summary
Constructors Constructor and Description BasicCluster(Cluster<BasicMLDataPair> cluster)Construct a cluster from another.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(MLData pair)Add to the cluster.MLDataSetcreateDataSet()Create a dataset from the clustered data.MLDataget(int pos)Get the specified data item by index.Centroid<?>getCentroid()java.util.List<MLData>getData()voidremove(MLData pair)Remove the specified item.voidsetCentroid(BasicMLDataPairCentroid c)Set the centroid.intsize()
-
-
-
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.
-
createDataSet
public final MLDataSet createDataSet()
Create a dataset from the clustered data.- Specified by:
createDataSetin interfaceMLCluster- Returns:
- The dataset.
-
get
public final MLData get(int pos)
Get the specified data item by index.
-
getCentroid
public final Centroid<?> getCentroid()
- Returns:
- The centroid.
-
getData
public final java.util.List<MLData> getData()
-
remove
public final void remove(MLData pair)
Remove the specified item.
-
setCentroid
public final void setCentroid(BasicMLDataPairCentroid c)
Set the centroid.- Parameters:
c- The new centroid.
-
-
DMelt 3.0 © DataMelt by jWork.ORG