Skip to content

Input data JSON format 01

Aichoo AIOS edited this page Jan 25, 2018 · 1 revision

JSON file used by JSON_data_loader_01.py agent should be created using the following overall format:

{
   "model_definition" : { ... },
   "static_data"      : { ... },
   "training_data"    : { ... },
}

The model_definition section defines the model and declares the data that will be sent in the training_data section.

{
   "model_definition" : {
      "model_id" :        <unique numeric id defining this model>,
      "model_name" :      <model name>,
      "system_id" :       <numeric id>,
      "system_name" :     <System name>,
      "training_source" : <config or live>,
      "model_owner" :     <a human>,
      "layout" : {
          "title"     :   <title>,
          "layout_id" :   <numeric layout listing id>,
          "layout_type" : "Application",
          "columns" : [
               {
                  "heading"   : <column heading>,
                  "data_type" : <pathable data type (BOOLEAN, DATETIME, FLOAT, FREETEXT, LARGETEXT, LOCATION, LOOKUP, NUMERIC)>,
                  "analysis"  : <one of 
                                 "data"    # column to be used as training data,
                                 "outcome" # column is prediction target,
                                 "(blank)" # column is not to be used for model building
                                >
                  "meta" : {
                        <specific to type where available, such as lookup_id, float precision, text (max) length, etc>
                  },
               }
          ]
       },
       "options" : {
          "tree" : true or false
       }
   }
}
 
Data types  
BOOLEAN 	# 0 or 1  
DATETIME 	# UTC ISO 8601 e.g. 2001-02-01T06:30:00Z  
FLOAT 	        # non exponentiated floating point e.g. 0.74  
FREETEXT 	# utf8 string of arbitrary length  
LARGETEXT 	# utf8 string of arbitrary length  
LOCATION 	# comma separated floating point latitude and longitude, e.g. 51.299818,-0.33727840  
LOOKUP 	        # numeric id but with extra meta for lookup_type, lookup_id and value_preference  
NUMERIC 	# signed integer  

Training data will consist of an array of data in the form:

{
   "training_data" : [
      {
        <column heading> : <value>,
        <column heading> : <value>
      }
   ]
}