Skip to content

アプリケーション内で をクリックすると、お使いのDataRobotバージョンに関する全プラットフォームドキュメントにアクセスできます。

デプロイの時系列予測

エンドポイント: /deployments/<deploymentId>/predictions

デプロイしたモデルの時系列予測を実行します。

リクエストメソッド: POST

リクエストURL:デプロイ済みURL、例:
https://your-company.orm.datarobot.com/predApi/v1.0

リクエストパラメーター

ヘッダー

キー タイプ 説明
Datarobot-key 文字列 予測サーバーの追加認証要素として使用される、組織ごとのシークレット。 /api/v2/predictionServersエンドポイントにアクセスして、datarobot-keyをプラグマティックに取得します。 エンドポイントは、予測サーバーのURLと対応するdatarobot-keyを返します。

セルフマネージドAIプラットフォームユーザーの場合のみ必須です。文字列型
33257d41-fcc9-7c01-161c-3467df169a50
Authorization 文字列 3つの方法がサポートされます。
  • Bearer認証
  • (使用非推奨)基本認証:User_emailおよびAPIトークン
  • (使用非推奨)APIトークン
  • Bearer認証方法の例:Bearer API_key-12345abcdb-xyz6789
  • (使用非推奨)User_emailおよびAPIトークン方法の例:Basic Auth_basic-12345abcdb-xyz6789
  • (使用非推奨)APIトークン方法の例:Token API_key-12345abcdb-xyz6789

Datarobot-key:このヘッダーはマネージドAIプラットフォームでのみ必須です。 これは、他の検証済みDataRobotユーザーからユーザーのデータを保護するための対策です。 キーはDataRobot APIに対する次のリクエストで取得することもできます。
GET <URL>/api/v2/modelDeployments/<deploymentId>

引数のクエリ(時系列モデルのみ)

キー タイプ 説明
forecastPoint ISO-8601文字列 ISO 8601形式のDateTime文字列(タイムゾーンなし)。予測ポイントを表します。 predictionsStartDateおよびpredictionsEndDateがパスされる場合、このパラメーターは使用できません。 ?forecastPoint=2013-12-20T01:30:00Z
relaxKnownInAdvanceFeaturesCheck ブール trueまたはfalsetrueの場合、予測時に予測ウィンドウで事前に既知の特徴量の欠損値を使用できます。 デフォルト値はfalseです。 事前に既知の値がない場合、予測品質に負の影響が生じることがあります。 ?relaxKnownInAdvanceFeaturesCheck=true
predictionsStartDate ISO-8601文字列 データセット内での一括予測の生成開始時間。 このパラメーターは、predictionsEndDateと一緒に定義する必要があります。 predictionsStartDateおよびpredictionsEndDateがパスされる場合、forecastPointパラメーターは使用できません。 ?predictionsStartDate=2013-12-20T01:30:00Z&predictionsEndDate=2013-12-20T01:40:00Z
predictionsEndDate ISO-8601文字列 データセット内での一括予測の生成停止時間。 このパラメーターは、predictionsStartDateと一緒に定義する必要があります。 predictionsStartDateおよびpredictionsEndDateがパスされる場合、forecastPointパラメーターは使用できません。 上記を参照。

passthroughColumnspassthroughColumnsSetおよびmaxExplanationsを含む標準的なURIパラメーターを使用することができます。

XEMPベースの説明のサポート

時系列では、XEMPによる説明をサポートしています。 maxExplanationsURIパラメーターの例については、予測の説明を参照してください。

本文

データ タイプ
過去のデータおよび予測のデータ JSON 以下の画像に示す元のデータ。

Response 200

連続値予想の例

{
  "data": [
    {
      "seriesId": null,
      "forecastPoint": "2013-12-20T00:00:00Z",
      "rowId": 35,
      "timestamp": "2013-12-21T00:00:00.000000Z",
      "predictionValues": [
        {
        "value": 2.3353628422,
        "label": "sales (actual)"
        }
    ],
    "forecastDistance": 1,
    "prediction": 2.3353628422
    }
  ]
} 

二値分類の予測例

{
  "data": [
    {
      "rowId": 147,
      "prediction": "low",
      "predictionThreshold": 0.5,
      "predictionValues": [
        {"label": "low", "value": 0.5158823954},
        {"label": "high", "value": 0.4841176046},
      ],
      "timestamp": "1961-04-01T00:00:00.000000Z",
      "forecastDistance": 2,
      "forecastPoint": "1961-02-01T00:00:00Z",
      "seriesId": null,
    }
  ]
} 

エラーリスト

HTTPコード サンプルエラーメッセージ リーズン
400 BAD REQUEST {"message": "Based on the forecast point (10/26/08), there are no rows to predict that fall inside of the forecast window (10/27/08 to 11/02/08). Try adjusting the forecast point to an earlier date or appending new future rows to the data."} 予測を行うために空の行が提供されませんでした。
400 BAD REQUEST {"message": "No valid output rows"} 過去の情報が提供されませんでした。予測する行は1つしかありません。
400 BAD REQUEST {"message": "The \"Time\" feature contains the value 'OCT-27', which does not match the original format %m/%d/%y (e.g., '06/24/19'). To upload this data, first correct the format in your prediction dataset and then try the import again. Because some software automatically converts the format for display, it is best to check the actual format using a text editor."} 予想行の形式が残りのデータの形式と異なります。
400 BAD REQUEST {"message": "The following errors are found:\n • The prediction data must contain historical values spanning more than 35 day(s) into the past. In addition, the target cannot have missing values or missing rows which are used for differencing"} 提供されたデータセットには、必須の35行よりも少ない過去のデータが含まれています。
400 BAD REQUEST {"message": {"forecastPoint": "Invalid RFC 3339 datetime string: "}} 空または無効なforecastPointが提供されました。
404 NOT FOUND {"message": "Deployment :deploymentId cannot be found for user :userId"} デプロイが削除されたか、存在しませんでした。
422 UNPROCESSABLE ENTITY {"message": "Predictions on models that are not time series models are not supported on this endpoint. Please use the predict endpoint instead."} 時系列プロジェクトでないdeploymentIdが提供されました。
422 UNPROCESSABLE ENTITY {"message": {"relaxKnownInAdvanceFeaturesCheck": "value can't be converted to Bool"}} 空または無効なrelaxKnownInAdvanceFeaturesCheck'の値が提供されました。

更新しました March 3, 2024