Here is the Python code snippet for getting the model evaluation parameters:
project_id = 'PROJECT_ID'
compute_region = 'COMPUTE_REGION'
model_id = 'MODEL_ID'
filter_ = 'Filter expression'
from google.cloud import automl_v1beta1 as automl
client = automl.AutoMlClient()
# Get the fully qualified path of the model based on project, region and model
model_full_id = client.model_path(project_id, compute_region, model_id)
# Apply the filter for listing all the model evaluations.
response = client.list_model_evaluations(model_full_id, filter_)
print("Loop for listing all the model evaluations received based on the filter condition")
for element in response:
print(element)
This code snippet gets the model evaluation parameters and iterates over the response and prints individual parameters such as precision and recall.