本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
Gremlin 推理查询中使用的 Neptune ML 谓词
Neptune#ml.endpoint
这些区域有:Neptune#ml.endpoint
谓词用于with()
步骤来指定推理端点,如有必要:
.with("Neptune#ml.endpoint", "
the model's SageMaker inference endpoint
")
您可以通过它来识别终端节点id
或者它的 URL。例如:
.with( "Neptune#ml.endpoint", "node-classification-movie-lens-endpoint" )
或者:
.with( "Neptune#ml.endpoint", "https://runtime.sagemaker.us-east-1.amazonaws.com/endpoints/node-classification-movie-lens-endpoint/invocations" )
如果您设置neptune_ml_endpoint参数在 Neptune 数据库集群参数组中到终端节点id
或 URL,则不需要包含Neptune#ml.endpoint
每个查询中的谓词。
Neptune#ml.iamRoleArn
Neptune#ml.iamRoleArn
用于with()
步骤可指定 SageMaker 执行 IAM 角色的 ARN(如有必要):
.with("Neptune#ml.iamRoleArn", "
the ARN for the SageMaker execution IAM role
")
有关如何创建 SageMaker 执行 IAM 角色的信息,请参阅创建自定义NeptuneSageMakerIAMRole角色.
如果您设置neptune_ml_iam_role参数在你的 Neptune 数据库集群参数组到 SageMaker 执行 IAM 角色的 ARN 中,你不需要包含Neptune#ml.iamRoleArn
每个查询中的谓词。
Neptune#ml.limit
这些区域有:Neptune#ml.limit
谓词可以选择限制每个实体返回的结果数:
.with( "Neptune#ml.limit",
2
)
默认情况下,限制为 1,可设置的最大数量为 100。
Neptune#ml.threshold
这些区域有:Neptune#ml.threshold
谓词(可选)为结果分数建立截止阈值:
.with( "Neptune#ml.threshold",
0.5D
)
这样,您可以丢弃分数低于指定阈值的所有结果。
Neptune#ml.classification
这些区域有:Neptune#ml.classification
谓词附加到properties()
步骤来确定需要从节点分类模型的 SageMaker 端点中获取属性:
.properties( "
property key of the node classification model
" ).with( "Neptune#ml.classification" )
Neptune#ml.regression
这些区域有:Neptune#ml.regression
谓词附加到properties()
步骤来确定需要从节点回归模型的 SageMaker 端点中获取属性:
.properties( "
property key of the node regression model
" ).with( "Neptune#ml.regression" )
Neptune#ml.prediction
这些区域有:Neptune#ml.prediction
谓词被附加到in()
和out()
确定这是一个链接预测查询的步骤:
.in("
edge label of the link prediction model
").with("Neptune#ml.prediction").hasLabel("target node label
")
Neptune#ml.score
这些区域有:Neptune#ml.score
谓词在 Gremlin 节点或边缘分类查询中使用来获取机器学习信心分数。这些区域有:Neptune#ml.score
谓词应与查询谓词一起传递properties()
步骤以获取节点或边缘分类查询的 ML 置信度分数。
你可以找到一个节点分类示例其他节点分类示例,以及中的边缘分类示例边缘分类.