Google Prediction API

Trainedmodels: analyze

Requires authorization

Get analysis of the model and the data the model was trained on. Try it now.

Request

HTTP request

GET https://www.googleapis.com/prediction/v1.5/trainedmodels/id/analyze

Parameters

Parameter name Value Description
Required parameters
id string The unique name for the predictive model.

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/prediction

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "prediction#analyze",
  "id": string,
  "selfLink": string,
  "errors": [
    {
      (key): string
    }
  ],
  "dataDescription": {
    "outputFeature": {
      "numeric": {
        "count": long,
        "mean": double,
        "variance": double
      },
      "text": [
        {
          "value": string,
          "count": long
        }
      ]
    },
    "features": [
      {
        "index": long,
        "numeric": {
          "count": long,
          "mean": double,
          "variance": double
        },
        "categorical": {
          "count": long,
          "values": [
            {
              "value": string,
              "count": long
            }
          ]
        },
        "text": {
          "count": long
        }
      }
    ]
  },
  "modelDescription": {
    "modelinfo": trainedmodels Resource,
    "confusionMatrix": {
      (key): {
        (key): double
      }
    },
    "confusionMatrixRowTotals": {
      (key): double
    }
  }
}
Property name Value Description Notes
kind string What kind of resource this is.
id string A name for the predictive model, unique within this user account. Naming restrictions are 1-255 characters long, any mix of digits, lowercase letters, dashes, and underscores: [0-9a-z_\-]
errors[] list List of errors with the data.
errors[].(key) string Error level followed by a detailed error message.
dataDescription object Description of the data the model was trained on.
dataDescription.outputFeature object Description of the output value or label.
dataDescription.outputFeature.numeric object Description of the output values in the data set.
dataDescription.outputFeature.numeric.count long Number of numeric output values in the data set.
dataDescription.outputFeature.numeric.mean double Mean of the output values in the data set.
dataDescription.outputFeature.numeric.variance double Variance of the output values in the data set.
dataDescription.outputFeature.text[] list Description of the output labels in the data set.
dataDescription.outputFeature.text[].value string The output label.
dataDescription.outputFeature.text[].count long Number of times the output label occurred in the data set.
dataDescription.features[] list Array of descriptions of input features in the data set. Will only print up to 1000 feature descriptions. 
dataDescription.features[].index long The feature index.
dataDescription.features[].numeric object Description of the numeric values of this feature.
dataDescription.features[].numeric.count long Number of numeric values for this feature in the data set.
dataDescription.features[].numeric.mean double Mean of the numeric values of this feature in the data set.
dataDescription.features[].numeric.variance double Variance of the numeric values of this feature in the data set.
dataDescription.features[].categorical object Description of the categorical values of this feature.
dataDescription.features[].categorical.count long Number of categorical values for this feature in the data.
dataDescription.features[].categorical.values[] list List of all the categories for this feature in the data set.
dataDescription.features[].categorical.values[].value string The category name.
dataDescription.features[].categorical.values[].count long Number of times this feature had this value.
dataDescription.features[].text object Description of multiple-word text values of this feature. Text feature values are values that contain more than one word separated by spaces. 
dataDescription.features[].text.count long Number of multiple-word text values for this feature.
modelDescription object Description of the model.
modelDescription.modelinfo nested object Basic information about the model.
modelDescription.confusionMatrix object 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].
modelDescription.confusionMatrix.(key) object
modelDescription.confusionMatrix.(key).(key) double
modelDescription.confusionMatrixRowTotals object A list of the confusion matrix row totals
modelDescription.confusionMatrixRowTotals.(key) double

Try it!

Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.