

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

# SPARQL オブジェクト回帰の例
<a name="machine-learning-sparql-inference-object-regression"></a>

オブジェクト回帰は、各ノードの回帰モデルから推定される数値の述語値を除いて、オブジェクト分類に似ています。オブジェクト回帰には、オブジェクト分類の場合と同じ SPARQL クエリを使用できます。ただし、`the Neptune#ml.limit` および `Neptune#ml.threshold` 述語は適用されません。

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

```
SELECT * WHERE { ?input a foaf:Person .
  SERVICE neptune-ml:inference {
    neptune-ml:config neptune-ml:modelType 'OBJECT_REGRESSION' ;
                      neptune-ml:input ?input ;
                      neptune-ml:predicate <http://www.example.org/accountbalance> ;
                      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_REGRESSION' ;
                      neptune-ml:input ?input ;
                      neptune-ml:predicate <http://www.example.org/accountbalance> ;
                      neptune-ml:output ?output .
  }
}
```