I'm trying to pull the score values out of my google automl PredictResponse Object. the object returned from the API looks as follows:
payload {
classification {
score: 0.989063024521
}
display_name: "No"
}
payload {
classification {
score: 0.0109369996935
}
display_name: "Yes"
}
I've gotten close using this:
result.payload[1]
Which returns:
classification {
score: 0.0109369996935
}
display_name: "Yes"
But I still can't get to just the score for a yes or a no.
I've tried using simplejson, but the PredictResponse Object doesn't play nice with that either. Is there a function within the Object I can use to get to the Score for yes and the score for no? Appreciate the help!
This is the answer to your question: