The Google Cloud Prediction API has been deprecated and will be shut down on April 30, 2018.

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.6/projects/project/trainedmodels/id/analyze

Parameters

Parameter name Value Description
Required parameters
id string The unique name for the predictive model.
project string The project associated with the 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": string,
        "variance": string
      },
      "text": [
        {
          "value": string,
          "count": long
        }
      ]
    },
    "features": [
      {
        "index": long,
        "numeric": {
          "count": long,
          "mean": string,
          "variance": string
        },
        "categorical": {
          "count": long,
          "values": [
            {
              "value": string,
              "count": long
            }
          ]
        },
        "text": {
          "count": long
        }
      }
    ]
  },
  "modelDescription": {
    "modelinfo": trainedmodels Resource,
    "confusionMatrix": {
      (key): {
        (key): string
      }
    },
    "confusionMatrixRowTotals": {
      (key): string
    }
  }
}
Property name Value Description Notes
kind string What kind of resource this is - "prediction#analyze".
id string The unique name for the predictive model.
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 string Mean of the output values in the data set.
dataDescription.outputFeature.numeric.variance string 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 Description of the input features in the data set.
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 string Mean of the numeric values of this feature in the data set.
dataDescription.features[].numeric.variance string 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.
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 Confusion matrix information for the true class label.
modelDescription.confusionMatrix.(key).(key) string Average number of times an instance with correct class label modelDescription.confusionMatrix.(key) was wrongfully classified as this class label.
modelDescription.confusionMatrixRowTotals object A list of the confusion matrix row totals.
modelDescription.confusionMatrixRowTotals.(key) string Average number of instances with this true class label that were tested.

Try it!

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

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Prediction API Documentation