机器学习

节点分类

节点分类的原始 Alpha 版本已被完全移除,并已整合到节点分类流水线中。在训练节点分类模型之前,您必须创建和配置训练流水线。

训练

训练的部分内容现在已在训练流水线的特定配置程序中进行配置。这些配置必须在调用 train 程序之前生效。其余部分已移至流水线训练程序。请参阅下表。

表 1. 训练配置更改
1.x 2.x

modelName

此参数现在仅在 gds.beta.pipeline.nodeClassification.train 中配置。

featuresProperties

此参数已由 gds.beta.pipeline.nodeClassification.selectFeatures 替换。现在还有一个程序 gds.beta.pipeline.nodeClassification.addNodeProperty,用于在训练流水线和生成的分类模型中计算输入图的节点属性。

targetProperty

此参数现在仅在 gds.beta.pipeline.nodeClassification.train 中配置。

holdoutFraction

此参数现在名为 testFraction,并在 gds.beta.pipeline.nodeClassification.configureSplit 中配置。

validationFolds

此参数现在仅在 gds.beta.pipeline.nodeClassification.configureSplit 中配置。

metrics

此参数现在仅在 gds.beta.pipeline.nodeClassification.train 中配置。

params

此参数已由 gds.beta.pipeline.nodeClassification.addLogisticRegression 替换,允许配置单个模型候选项。该程序可以多次调用以添加多个模型候选项。还有一个新选项可以使用 gds.beta.pipeline.nodeClassification.addRandomForest 将随机森林作为模型候选项。

randomSeed

此参数现在仅在 gds.beta.pipeline.nodeClassification.train 中配置。

表 2. 流水线配置更改
1.x 2.x

gds.beta.pipeline.nodeClassification.configureParams

此过程已不再存在,它曾用于添加逻辑回归模型候选项。现在可以通过调用 gds.beta.pipeline.nodeClassification.addLogisticRegression 一次或多次来添加逻辑回归候选项。

预测

除了下面列出的参数外,节点分类预测的 API 与以前相同,但使用了不同的程序。这些程序是 gds.beta.pipeline.nodeClassification.predict.[mutate,stream,write]

表 3. 预测配置更改
1.x 2.x

batchSize

批处理大小在内部已优化,不再由用户配置。

表 4. 预测程序替换
1.x 2.x

gds.alpha.ml.nodeClassification.predict.stream

gds.beta.pipeline.nodeClassification.predict.stream

gds.alpha.ml.nodeClassification.predict.mutate

gds.beta.pipeline.nodeClassification.predict.mutate

gds.alpha.ml.nodeClassification.predict.write

gds.beta.pipeline.nodeClassification.predict.write

链接预测的原始 Alpha 版本已被完全移除,并已整合到链接预测流水线中。在训练链接预测模型之前,您必须创建和配置训练流水线。

训练

训练的部分内容现在已在训练流水线的特定配置程序中进行配置。这些配置必须在调用 train 程序之前生效。其余部分已移至流水线训练程序。请参阅下表。

表 5. 训练配置更改
1.x 2.x

modelName

此参数现在仅在 gds.beta.pipeline.linkPrediction.train 中配置。

featuresProperties

已由 gds.beta.pipeline.linkPrediction.addFeature 中的 nodeProperties 替换。还有一个程序 gds.beta.pipeline.linkPrediction.addNodeProperty,用于在训练流水线和生成的分类模型中计算输入图的节点属性。

linkFeatureCombiner

已由 gds.beta.pipeline.linkPrediction.addFeature 的第二个位置参数(称为 featureType)替换。

trainRelationshipTypetestRelationshipType

这些参数已移除。请使用 gds.beta.pipeline.linkPrediction.configureSplit 来设置数据集拆分。

validationFolds

此参数现在仅在 gds.beta.pipeline.linkPrediction.configureSplit 中配置。

negativeClassWeight

此参数现在仅在 gds.beta.pipeline.linkPrediction.train 中配置。

params

此参数已由 gds.beta.pipeline.linkPrediction.addLogisticRegression 替换,允许配置单个模型候选项。该程序可以多次调用以添加多个模型候选项。还有一个新选项可以使用 gds.beta.pipeline.linkPrediction.addRandomForest 将随机森林作为模型候选项。

randomSeed

此参数现在仅在 gds.beta.pipeline.linkPrediction.train 中配置。

表 6. 流水线配置更改
1.x 2.x

gds.beta.pipeline.linkPrediction.configureParams

此过程已不再存在,它曾用于添加逻辑回归模型候选项。现在可以通过调用 gds.beta.pipeline.linkPrediction.addLogisticRegression 一次或多次来添加逻辑回归候选项。

预测

链接预测分类的 API 与以前相同,但使用了不同的程序。这些程序是 gds.beta.pipeline.linkPrediction.predict.[mutate,stream]。但是,链接预测分类不再有 write 模式,但仍然可以通过使用 mutate 模式后跟 gds.graph.relationship.write 来模拟此行为。

表 7. 预测程序替换
1.x 2.x

gds.alpha.ml.linkPrediction.predict.stream

gds.beta.pipeline.linkPrediction.predict.stream

gds.alpha.ml.linkPrediction.predict.mutate

gds.beta.pipeline.linkPrediction.predict.mutate

gds.alpha.ml.linkPrediction.predict.write

-

© . All rights reserved.