public abstract class ClustererBase extends Object implements Clusterer
cluster(jsat.DataSet)
and cluster(jsat.DataSet, java.util.concurrent.ExecutorService)
using
their int array counterparts. supportsWeightedData()
method.Constructor and Description |
---|
ClustererBase() |
Modifier and Type | Method and Description |
---|---|
abstract Clusterer |
clone() |
List<List<DataPoint>> |
cluster(DataSet dataSet)
Performs clustering on the given data set.
|
List<List<DataPoint>> |
cluster(DataSet dataSet,
ExecutorService threadpool)
Performs clustering on the given data set.
|
static List<List<DataPoint>> |
createClusterListFromAssignmentArray(int[] assignments,
DataSet dataSet)
Convenient helper method.
|
static List<DataPoint> |
getDatapointsFromCluster(int c,
int[] assignments,
DataSet dataSet,
int[] indexFrom)
Gets a list of the datapoints in a data set that belong to the indicated cluster
|
boolean |
supportsWeightedData()
Indicates whether the model knows how to cluster using weighted data
points.
|
public List<List<DataPoint>> cluster(DataSet dataSet)
Clusterer
public List<List<DataPoint>> cluster(DataSet dataSet, ExecutorService threadpool)
Clusterer
public static List<List<DataPoint>> createClusterListFromAssignmentArray(int[] assignments, DataSet dataSet)
assignments
- the array containing cluster assignmentsdataSet
- the original data set, with data in the same order as was used to create the assignments arraypublic static List<DataPoint> getDatapointsFromCluster(int c, int[] assignments, DataSet dataSet, int[] indexFrom)
c
- the cluster ID to get the datapoints forassignments
- the array containing cluster assignmentsdataSet
- the data set to get the points fromindexFrom
- stores the index from the original dataset that the
datapoint is from, such that the item at index i
in the returned
list can be found in the original dataset at index indexFrom[i]
.
May be null
public boolean supportsWeightedData()
Clusterer
supportsWeightedData
in interface Clusterer
Copyright © 2017. All rights reserved.