aito.client.v2.responses.V2Hit
- class aito.client.v2.responses.V2Hit(json: Dict)
Bases:
objectA single hit of a
rowsresponseUser columns are read by name; the computed columns keep the
$prefix they were requested with inselect($p,$value,$why), which is why they are guaranteed not to collide with a user column.- Parameters:
json (Dict) – the content of the hit
Methods
get(item[, default])read a field of the hit, returning
defaultwhen it is absentAttributes
the raw content of the hit
the
$pof a predict, recommend or match hitthe predicted value, i.e.
$value.the
$whyexplanation tree- get(item, default=None)
read a field of the hit, returning
defaultwhen it is absent- Return type:
Any
- property json: Dict
the raw content of the hit
- Return type:
Dict
- property probability: float
the
$pof a predict, recommend or match hit- Raises:
KeyError –
$pwas not selected- Return type:
float
- property value: Any
the predicted value, i.e.
$valuev2 names this
$value; v1 named itfeature. The SDK does not alias it back — seedocs/v2-client-design.md.- Raises:
KeyError –
$valuewas not selected- Return type:
Any
- property why: Dict
the
$whyexplanation tree- Raises:
KeyError –
$whywas not selected- Return type:
Dict