类 AgglomerativeClustering
- java.lang.Object
-
- org.apache.flink.ml.clustering.agglomerativeclustering.AgglomerativeClustering
-
- 所有已实现的接口:
Serializable,org.apache.flink.ml.api.AlgoOperator<AgglomerativeClustering>,org.apache.flink.ml.api.Stage<AgglomerativeClustering>,AgglomerativeClusteringParams<AgglomerativeClustering>,org.apache.flink.ml.common.param.HasDistanceMeasure<AgglomerativeClustering>,org.apache.flink.ml.common.param.HasFeaturesCol<AgglomerativeClustering>,org.apache.flink.ml.common.param.HasPredictionCol<AgglomerativeClustering>,HasWindows<AgglomerativeClustering>,org.apache.flink.ml.param.WithParams<AgglomerativeClustering>
public class AgglomerativeClustering extends Object implements org.apache.flink.ml.api.AlgoOperator<AgglomerativeClustering>, AgglomerativeClusteringParams<AgglomerativeClustering>
An AlgoOperator that performs a hierarchical clustering using a bottom-up approach. Each observation starts in its own cluster and the clusters are merged together one by one. Users can choose different strategies to merge two clusters by settingAgglomerativeClusteringParams.LINKAGEand different distance measures by settingHasDistanceMeasure.DISTANCE_MEASURE.The output contains two tables. The first one assigns one cluster Id for each data point. The second one contains the information of merging two clusters at each step. The data format of the merging information is (clusterId1, clusterId2, distance, sizeOfMergedCluster).
This AlgoOperator splits input stream into mini-batches of elements according to the windowing strategy specified by the
HasWindowsparameter, and performs the hierarchical clustering on each mini-batch independently. The clustering result of each element depends only on the elements in the same mini-batch.See https://en.wikipedia.org/wiki/Hierarchical_clustering.
- 另请参阅:
- 序列化表格
-
-
字段概要
-
从接口继承的字段 org.apache.flink.ml.clustering.agglomerativeclustering.AgglomerativeClusteringParams
COMPUTE_FULL_TREE, DISTANCE_THRESHOLD, LINKAGE, LINKAGE_AVERAGE, LINKAGE_COMPLETE, LINKAGE_SINGLE, LINKAGE_WARD, NUM_CLUSTERS
-
从接口继承的字段 org.apache.flink.ml.common.param.HasWindows
WINDOWS
-
-
构造器概要
构造器 构造器 说明 AgglomerativeClustering()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 Map<org.apache.flink.ml.param.Param<?>,Object>getParamMap()static AgglomerativeClusteringload(org.apache.flink.table.api.bridge.java.StreamTableEnvironment tEnv, String path)voidsave(String path)org.apache.flink.table.api.Table[]transform(org.apache.flink.table.api.Table... inputs)-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.apache.flink.ml.clustering.agglomerativeclustering.AgglomerativeClusteringParams
getComputeFullTree, getDistanceThreshold, getLinkage, getNumClusters, setComputeFullTree, setDistanceThreshold, setLinkage, setNumClusters
-
从接口继承的方法 org.apache.flink.ml.common.param.HasWindows
getWindows, setWindows
-
-
-
-
方法详细资料
-
transform
public org.apache.flink.table.api.Table[] transform(org.apache.flink.table.api.Table... inputs)
- 指定者:
transform在接口中org.apache.flink.ml.api.AlgoOperator<AgglomerativeClustering>
-
save
public void save(String path) throws IOException
- 指定者:
save在接口中org.apache.flink.ml.api.Stage<AgglomerativeClustering>- 抛出:
IOException
-
load
public static AgglomerativeClustering load(org.apache.flink.table.api.bridge.java.StreamTableEnvironment tEnv, String path) throws IOException
- 抛出:
IOException
-
getParamMap
public Map<org.apache.flink.ml.param.Param<?>,Object> getParamMap()
- 指定者:
getParamMap在接口中org.apache.flink.ml.param.WithParams<AgglomerativeClustering>
-
-