kmeansnode属性
K-Means节点将数据集分为不同的组(或簇)。 该方法定义了固定数量的集群,将记录迭代分配到集群中,并调整集群中心,直到进一步优化不再能够改善模型。 k-means算法不试图预测结果,而是使用一种称为无监督学习的流程来揭示输入字段集中的模式。
示例
node = stream.create("kmeans", "My node")
# "Fields" tab
node.setPropertyValue("custom_fields", True)
node.setPropertyValue("inputs", ["Cholesterol", "BP", "Drug", "Na", "K", "Age"])
# "Model" tab
node.setPropertyValue("use_model_name", True)
node.setPropertyValue("model_name", "Kmeans_allinputs")
node.setPropertyValue("num_clusters", 9)
node.setPropertyValue("gen_distance", True)
node.setPropertyValue("cluster_label", "Number")
node.setPropertyValue("label_prefix", "Kmeans_")
node.setPropertyValue("optimize", "Speed")
# "Expert" tab
node.setPropertyValue("mode", "Expert")
node.setPropertyValue("stop_on", "Custom")
node.setPropertyValue("max_iterations", 10)
node.setPropertyValue("tolerance", 3.0)
node.setPropertyValue("encoding_value", 0.3)
kmeansnode 属性 |
值 | 属性描述 |
|---|---|---|
inputs |
[field1 ... fieldN] | K-均值模型对一组输入字段进行聚类分析,但不使用目标字段。 不使用权重字段和频率字段。 请参阅 公共建模节点属性 以获取更多信息。 |
num_clusters |
号 | |
gen_distance |
标志 | |
cluster_label |
String Number |
|
label_prefix |
字符串 | |
mode |
Simple Expert |
|
stop_on |
Default Custom |
|
max_iterations |
号 | |
tolerance |
号 | |
encoding_value |
号 | |
optimize |
Speed Memory |
指定是应针对速度还是针对内存优化模型构建。 |