Skip to content

predict_crnn

This document has been machine translated.

Apply a trained CRNN model to perform prediction.

The execution method uses JSON-RPC v2.0.

Example request

To execute prediction by CRNN model, specify predict_crnn as method in the parameter of prov.process of the Provenance API.

An example request for JSON-RPC is as follows

{
  "jsonrpc": "2.0",
  "method": "prov.process",
  "params": {
    "method": "predict_crnn",
    "params": {
      "output_ddc": "ddc:result",
      "model_ddc": "ddc:model",
      "input_ddc": "ddc:test_data",
      "start_datetime": "2020-07-20 00:00:00+09",
      "end_datetime": "2020-07-24 23:59:59+09",
      "train_period": "1 days",
      "crnn_param_json": "{}",
      "no_exec": true
    },
  },
  "id": "occurrence_jsonrpc_id"
}

Parameters

The following parameters can be specified for train_crnn.

Parameter name Data type Contents Default value
output_ddc string output ddc name mandatory
output_mode string output mode (overwrite, append, or error) error
model_ddc string model ddc name mandatory
input_ddc string input ddc name mandatory
start_datetime string prediction start date and time mandatory
end_datetime string prediciton end date and time mandatory
train_period string data period used for prediction mandatory
crnn_param_json string CRNN parameters mandatory
no_exec boolean execute asynchronously false

Set crnn_param_json to the same value you specified when training the model.

Input data

The ddc specified in model_ddc should have the following schema: ## Input data Normally this should be the same ddc output by CRNN model training (train_crnn).

column name contents remarks
data_table name of training data table real table name will be recorded instead of ddc
meshcode measurement point id
target_column name of column for prediction
prediction_time time to predict
crnn_param_json CRNN parameters
cnn_model_path CNN model file name
lstm_model_path LSTM model file name

The ddc specified in input_ddc must have the following schema.

column name contents remarks
start_datetime start time required column for event table
end_datetime end time required column in event table
(measurement point id) id representing the measurement point
(attribute 1) any attribute value (numeric type)
(attribute 2) any attribute value (numeric type)
(...) any attribute value (numeric type)

Output data

The schema of ddc to be output to output_ddc is as follows.

column name content remarks
start_datetime start time
end_datetime end time
location location information
value prediction result for classification prediction it will be a number between 0, 1, ...

Return value

Output ddc information