Home | History | Annotate | Download | only in dyn
      1 <html><body>
      2 <style>
      3 
      4 body, h1, h2, h3, div, span, p, pre, a {
      5   margin: 0;
      6   padding: 0;
      7   border: 0;
      8   font-weight: inherit;
      9   font-style: inherit;
     10   font-size: 100%;
     11   font-family: inherit;
     12   vertical-align: baseline;
     13 }
     14 
     15 body {
     16   font-size: 13px;
     17   padding: 1em;
     18 }
     19 
     20 h1 {
     21   font-size: 26px;
     22   margin-bottom: 1em;
     23 }
     24 
     25 h2 {
     26   font-size: 24px;
     27   margin-bottom: 1em;
     28 }
     29 
     30 h3 {
     31   font-size: 20px;
     32   margin-bottom: 1em;
     33   margin-top: 1em;
     34 }
     35 
     36 pre, code {
     37   line-height: 1.5;
     38   font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
     39 }
     40 
     41 pre {
     42   margin-top: 0.5em;
     43 }
     44 
     45 h1, h2, h3, p {
     46   font-family: Arial, sans serif;
     47 }
     48 
     49 h1, h2, h3 {
     50   border-bottom: solid #CCC 1px;
     51 }
     52 
     53 .toc_element {
     54   margin-top: 0.5em;
     55 }
     56 
     57 .firstline {
     58   margin-left: 2 em;
     59 }
     60 
     61 .method  {
     62   margin-top: 1em;
     63   border: solid 1px #CCC;
     64   padding: 1em;
     65   background: #EEE;
     66 }
     67 
     68 .details {
     69   font-weight: bold;
     70   font-size: 14px;
     71 }
     72 
     73 </style>
     74 
     75 <h1><a href="prediction_v1_4.html">Prediction API</a> . <a href="prediction_v1_4.trainedmodels.html">trainedmodels</a></h1>
     76 <h2>Instance Methods</h2>
     77 <p class="toc_element">
     78   <code><a href="#delete">delete(id)</a></code></p>
     79 <p class="firstline">Delete a trained model.</p>
     80 <p class="toc_element">
     81   <code><a href="#get">get(id)</a></code></p>
     82 <p class="firstline">Check training status of your model.</p>
     83 <p class="toc_element">
     84   <code><a href="#insert">insert(body)</a></code></p>
     85 <p class="firstline">Begin training your model.</p>
     86 <p class="toc_element">
     87   <code><a href="#predict">predict(id, body)</a></code></p>
     88 <p class="firstline">Submit model id and request a prediction</p>
     89 <p class="toc_element">
     90   <code><a href="#update">update(id, body)</a></code></p>
     91 <p class="firstline">Add new data to a trained model.</p>
     92 <h3>Method Details</h3>
     93 <div class="method">
     94     <code class="details" id="delete">delete(id)</code>
     95   <pre>Delete a trained model.
     96 
     97 Args:
     98   id: string, The unique name for the predictive model. (required)
     99 </pre>
    100 </div>
    101 
    102 <div class="method">
    103     <code class="details" id="get">get(id)</code>
    104   <pre>Check training status of your model.
    105 
    106 Args:
    107   id: string, The unique name for the predictive model. (required)
    108 
    109 Returns:
    110   An object of the form:
    111 
    112     {
    113       "kind": "prediction#training", # What kind of resource this is.
    114       "storageDataLocation": "A String", # Google storage location of the training data file.
    115       "storagePMMLModelLocation": "A String", # Google storage location of the pmml model file.
    116       "dataAnalysis": { # Data Analysis.
    117         "warnings": [
    118           "A String",
    119         ],
    120       },
    121       "trainingStatus": "A String", # The current status of the training job. This can be one of following: RUNNING; DONE; ERROR; ERROR: TRAINING JOB NOT FOUND
    122       "modelInfo": { # Model metadata.
    123         "confusionMatrixRowTotals": { # A list of the confusion matrix row totals
    124           "a_key": 3.14,
    125         },
    126         "numberLabels": "A String", # Number of class labels in the trained model [Categorical models only].
    127         "confusionMatrix": { # An output confusion matrix. This shows an estimate for how this model will do in predictions. This is first indexed by the true class label. For each true class label, this provides a pair {predicted_label, count}, where count is the estimated number of times the model will predict the predicted label given the true label. Will not output if more then 100 classes [Categorical models only].
    128           "a_key": {
    129             "a_key": 3.14,
    130           },
    131         },
    132         "meanSquaredError": 3.14, # An estimated mean squared error. The can be used to measure the quality of the predicted model [Regression models only].
    133         "modelType": "A String", # Type of predictive model (CLASSIFICATION or REGRESSION)
    134         "numberInstances": "A String", # Number of valid data instances used in the trained model.
    135         "classWeightedAccuracy": 3.14, # Estimated accuracy of model taking utility weights into account [Categorical models only].
    136         "classificationAccuracy": 3.14, # A number between 0.0 and 1.0, where 1.0 is 100% accurate. This is an estimate, based on the amount and quality of the training data, of the estimated prediction accuracy. You can use this is a guide to decide whether the results are accurate enough for your needs. This estimate will be more reliable if your real input data is similar to your training data [Categorical models only].
    137       },
    138       "storagePMMLLocation": "A String", # Google storage location of the preprocessing pmml file.
    139       "id": "A String", # The unique name for the predictive model.
    140       "selfLink": "A String", # A URL to re-request this resource.
    141       "utility": [ # A class weighting function, which allows the importance weights for class labels to be specified [Categorical models only].
    142         { # Class label (string).
    143           "a_key": 3.14,
    144         },
    145       ],
    146     }</pre>
    147 </div>
    148 
    149 <div class="method">
    150     <code class="details" id="insert">insert(body)</code>
    151   <pre>Begin training your model.
    152 
    153 Args:
    154   body: object, The request body. (required)
    155     The object takes the form of:
    156 
    157 {
    158     "kind": "prediction#training", # What kind of resource this is.
    159     "storageDataLocation": "A String", # Google storage location of the training data file.
    160     "storagePMMLModelLocation": "A String", # Google storage location of the pmml model file.
    161     "dataAnalysis": { # Data Analysis.
    162       "warnings": [
    163         "A String",
    164       ],
    165     },
    166     "trainingStatus": "A String", # The current status of the training job. This can be one of following: RUNNING; DONE; ERROR; ERROR: TRAINING JOB NOT FOUND
    167     "modelInfo": { # Model metadata.
    168       "confusionMatrixRowTotals": { # A list of the confusion matrix row totals
    169         "a_key": 3.14,
    170       },
    171       "numberLabels": "A String", # Number of class labels in the trained model [Categorical models only].
    172       "confusionMatrix": { # An output confusion matrix. This shows an estimate for how this model will do in predictions. This is first indexed by the true class label. For each true class label, this provides a pair {predicted_label, count}, where count is the estimated number of times the model will predict the predicted label given the true label. Will not output if more then 100 classes [Categorical models only].
    173         "a_key": {
    174           "a_key": 3.14,
    175         },
    176       },
    177       "meanSquaredError": 3.14, # An estimated mean squared error. The can be used to measure the quality of the predicted model [Regression models only].
    178       "modelType": "A String", # Type of predictive model (CLASSIFICATION or REGRESSION)
    179       "numberInstances": "A String", # Number of valid data instances used in the trained model.
    180       "classWeightedAccuracy": 3.14, # Estimated accuracy of model taking utility weights into account [Categorical models only].
    181       "classificationAccuracy": 3.14, # A number between 0.0 and 1.0, where 1.0 is 100% accurate. This is an estimate, based on the amount and quality of the training data, of the estimated prediction accuracy. You can use this is a guide to decide whether the results are accurate enough for your needs. This estimate will be more reliable if your real input data is similar to your training data [Categorical models only].
    182     },
    183     "storagePMMLLocation": "A String", # Google storage location of the preprocessing pmml file.
    184     "id": "A String", # The unique name for the predictive model.
    185     "selfLink": "A String", # A URL to re-request this resource.
    186     "utility": [ # A class weighting function, which allows the importance weights for class labels to be specified [Categorical models only].
    187       { # Class label (string).
    188         "a_key": 3.14,
    189       },
    190     ],
    191   }
    192 
    193 
    194 Returns:
    195   An object of the form:
    196 
    197     {
    198       "kind": "prediction#training", # What kind of resource this is.
    199       "storageDataLocation": "A String", # Google storage location of the training data file.
    200       "storagePMMLModelLocation": "A String", # Google storage location of the pmml model file.
    201       "dataAnalysis": { # Data Analysis.
    202         "warnings": [
    203           "A String",
    204         ],
    205       },
    206       "trainingStatus": "A String", # The current status of the training job. This can be one of following: RUNNING; DONE; ERROR; ERROR: TRAINING JOB NOT FOUND
    207       "modelInfo": { # Model metadata.
    208         "confusionMatrixRowTotals": { # A list of the confusion matrix row totals
    209           "a_key": 3.14,
    210         },
    211         "numberLabels": "A String", # Number of class labels in the trained model [Categorical models only].
    212         "confusionMatrix": { # An output confusion matrix. This shows an estimate for how this model will do in predictions. This is first indexed by the true class label. For each true class label, this provides a pair {predicted_label, count}, where count is the estimated number of times the model will predict the predicted label given the true label. Will not output if more then 100 classes [Categorical models only].
    213           "a_key": {
    214             "a_key": 3.14,
    215           },
    216         },
    217         "meanSquaredError": 3.14, # An estimated mean squared error. The can be used to measure the quality of the predicted model [Regression models only].
    218         "modelType": "A String", # Type of predictive model (CLASSIFICATION or REGRESSION)
    219         "numberInstances": "A String", # Number of valid data instances used in the trained model.
    220         "classWeightedAccuracy": 3.14, # Estimated accuracy of model taking utility weights into account [Categorical models only].
    221         "classificationAccuracy": 3.14, # A number between 0.0 and 1.0, where 1.0 is 100% accurate. This is an estimate, based on the amount and quality of the training data, of the estimated prediction accuracy. You can use this is a guide to decide whether the results are accurate enough for your needs. This estimate will be more reliable if your real input data is similar to your training data [Categorical models only].
    222       },
    223       "storagePMMLLocation": "A String", # Google storage location of the preprocessing pmml file.
    224       "id": "A String", # The unique name for the predictive model.
    225       "selfLink": "A String", # A URL to re-request this resource.
    226       "utility": [ # A class weighting function, which allows the importance weights for class labels to be specified [Categorical models only].
    227         { # Class label (string).
    228           "a_key": 3.14,
    229         },
    230       ],
    231     }</pre>
    232 </div>
    233 
    234 <div class="method">
    235     <code class="details" id="predict">predict(id, body)</code>
    236   <pre>Submit model id and request a prediction
    237 
    238 Args:
    239   id: string, The unique name for the predictive model. (required)
    240   body: object, The request body. (required)
    241     The object takes the form of:
    242 
    243 {
    244     "input": { # Input to the model for a prediction
    245       "csvInstance": [ # A list of input features, these can be strings or doubles.
    246         "",
    247       ],
    248     },
    249   }
    250 
    251 
    252 Returns:
    253   An object of the form:
    254 
    255     {
    256     "kind": "prediction#output", # What kind of resource this is.
    257     "outputLabel": "A String", # The most likely class label [Categorical models only].
    258     "id": "A String", # The unique name for the predictive model.
    259     "outputMulti": [ # A list of class labels with their estimated probabilities [Categorical models only].
    260       {
    261         "score": 3.14, # The probability of the class label.
    262         "label": "A String", # The class label.
    263       },
    264     ],
    265     "outputValue": 3.14, # The estimated regression value [Regression models only].
    266     "selfLink": "A String", # A URL to re-request this resource.
    267   }</pre>
    268 </div>
    269 
    270 <div class="method">
    271     <code class="details" id="update">update(id, body)</code>
    272   <pre>Add new data to a trained model.
    273 
    274 Args:
    275   id: string, The unique name for the predictive model. (required)
    276   body: object, The request body. (required)
    277     The object takes the form of:
    278 
    279 {
    280     "output": "A String", # The generic output value - could be regression value or class label
    281     "csvInstance": [ # The input features for this instance
    282       "",
    283     ],
    284     "label": "A String", # The class label of this instance
    285   }
    286 
    287 
    288 Returns:
    289   An object of the form:
    290 
    291     {
    292       "kind": "prediction#training", # What kind of resource this is.
    293       "storageDataLocation": "A String", # Google storage location of the training data file.
    294       "storagePMMLModelLocation": "A String", # Google storage location of the pmml model file.
    295       "dataAnalysis": { # Data Analysis.
    296         "warnings": [
    297           "A String",
    298         ],
    299       },
    300       "trainingStatus": "A String", # The current status of the training job. This can be one of following: RUNNING; DONE; ERROR; ERROR: TRAINING JOB NOT FOUND
    301       "modelInfo": { # Model metadata.
    302         "confusionMatrixRowTotals": { # A list of the confusion matrix row totals
    303           "a_key": 3.14,
    304         },
    305         "numberLabels": "A String", # Number of class labels in the trained model [Categorical models only].
    306         "confusionMatrix": { # An output confusion matrix. This shows an estimate for how this model will do in predictions. This is first indexed by the true class label. For each true class label, this provides a pair {predicted_label, count}, where count is the estimated number of times the model will predict the predicted label given the true label. Will not output if more then 100 classes [Categorical models only].
    307           "a_key": {
    308             "a_key": 3.14,
    309           },
    310         },
    311         "meanSquaredError": 3.14, # An estimated mean squared error. The can be used to measure the quality of the predicted model [Regression models only].
    312         "modelType": "A String", # Type of predictive model (CLASSIFICATION or REGRESSION)
    313         "numberInstances": "A String", # Number of valid data instances used in the trained model.
    314         "classWeightedAccuracy": 3.14, # Estimated accuracy of model taking utility weights into account [Categorical models only].
    315         "classificationAccuracy": 3.14, # A number between 0.0 and 1.0, where 1.0 is 100% accurate. This is an estimate, based on the amount and quality of the training data, of the estimated prediction accuracy. You can use this is a guide to decide whether the results are accurate enough for your needs. This estimate will be more reliable if your real input data is similar to your training data [Categorical models only].
    316       },
    317       "storagePMMLLocation": "A String", # Google storage location of the preprocessing pmml file.
    318       "id": "A String", # The unique name for the predictive model.
    319       "selfLink": "A String", # A URL to re-request this resource.
    320       "utility": [ # A class weighting function, which allows the importance weights for class labels to be specified [Categorical models only].
    321         { # Class label (string).
    322           "a_key": 3.14,
    323         },
    324       ],
    325     }</pre>
    326 </div>
    327 
    328 </body></html>