aito.client.AitoClient.naive_predict

AitoClient.naive_predict(predicting_field: str, from_table: str, use_database_schema: aito.schema.AitoDatabaseSchema = None) → Tuple[Dict, Dict, Dict]

generate an example predict query to predict a field

The example query will use all fields of the table as the hypothesis and the first entry of the table as the input data

Parameters
  • predicting_field (str) – the predicting field name. If the field belong to a linked table, it should be in the format of <column_with_link>.<field_name>

  • from_table (str) – the name of the table the will be use as context for prediction. The predicting field should be “reachable” from the table (i.e: the predicting field should be a column in the table or a table that is linked to this table)

  • use_database_schema (AitoDatabaseSchema) – use an existing database schema if do not want to re-fetch the database schema

Returns

a tuple contains the predict query and the prediction result

Return type

Tuple[Dict, Dict, Dict]