SPARQL オブジェクト分類の例 - Amazon Neptune

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

SPARQL オブジェクト分類の例

Neptune ML での SPARQL オブジェクト分類では、モデルは述語値の 1 つに基づいてトレーニングされます。これは、その述語が特定の主語にまだ存在していない場合に便利です。

オブジェクト分類モデルを使用すると、カテゴリカル述語値のみを推論できます。

次のクエリは、foaf:Person タイプのすべての入力の <http://www.example.org/team> 述語値を予測しようとします。

SELECT * WHERE { ?input a foaf:Person . SERVICE neptune-ml:inference { neptune-ml:config neptune-ml:modelType 'OBJECT_CLASSIFICATION' ; neptune-ml:input ?input ; neptune-ml:predicate <http://www.example.org/team> ; neptune-ml:output ?output . } }

このクエリは、次のようにカスタマイズできます。

SELECT * WHERE { ?input a foaf:Person . SERVICE neptune-ml:inference { neptune-ml:config neptune-ml:endpoint 'node-prediction-account-balance-endpoint' ; neptune-ml:iamRoleArn 'arn:aws:iam::0123456789:role/sagemaker-role' ; neptune-ml:batchSize "40"^^xsd:integer ; neptune-ml:timeout "1000"^^xsd:integer ; neptune-ml:modelType 'OBJECT_CLASSIFICATION' ; neptune-ml:input ?input ; neptune-ml:predicate <http://www.example.org/team> ; neptune-ml:output ?output . } }