Prediction Models
Implements a variety of prediction models.
- ia.gaius.prediction_models.average_emotives(record)
Averages the emotives in a list (e.g. predictions ensemble or percepts). The emotives in the record are of type: [{‘e1’: 4, ‘e2’: 5}, {‘e2’: 6}, {‘e1’: 5 ‘e3’: -4}]
- Parameters:
record (list) – List of emotive dictionaries to average emotives of
- Returns:
Dictionary of Averaged Emotives
- Return type:
dict
Example
from ia.gaius.prediction_models import average_emotives record = [{'e1': 4, 'e2': 5}, {'e2': 6}, {'e1': 5 'e3': -4}] averages = average_emotives(record=record)
- ia.gaius.prediction_models.bucket_predictions(ensemble)
- ia.gaius.prediction_models.hive_model_classification(ensembles)
Compute the “hive predicted model classification” based on the ensembles provided from each node
- Parameters:
ensembles (dict) – should be dictionary of { node_name: prediction_ensemble }
- Returns:
hive predicted classification
- Return type:
str
- ia.gaius.prediction_models.hive_model_emotives(ensembles)
Compute average of emotives in model by calling
average_emotives()
on ensembles- Parameters:
ensembles (list) – Prediction ensemble to compute average emotives of
- Returns:
_description_
- Return type:
_type_
- ia.gaius.prediction_models.make_modeled_emotives(ensemble)
The emotives in the ensemble are of type: ‘emotives’:[{‘e1’: 4, ‘e2’: 5}, {‘e2’: 6}, {‘e1’: 5 ‘e3’: -4}] First calls
average_emotives()
on each prediction in the ensemble, then callsbucket_predictions()
on the ensemble. After bucketing predictions, the functionmodel_per_emotives()
is called for each emotive present in the ensemble. Dict returned contains { emotive: model_per_emotive } for each emotive in the ensemble- Parameters:
ensemble (list) – Prediction ensemble containing emotives to model
- Returns:
Dictionary of modelled emotive values
- Return type:
dict
- ia.gaius.prediction_models.model_per_emotive(ensemble, emotive, potential_normalization_factor)
Using a Weighted Moving Average, though the ‘moving’ part refers to the prediction index.
- Parameters:
ensemble (list, required) – The prediction ensemble to use in computations
emotive (_type_) – The emotive to compute a moving average of
potential_normalization_factor (_type_) – Divisor to normailize the potential value of each prediction
- Returns:
_description_
- Return type:
_type_
- ia.gaius.prediction_models.prediction_ensemble_model_classification(ensemble)
For classifications, we don’t bother with marginal_probability because classifications are discrete symbols, not numeric values.
- ia.gaius.prediction_models.principal_delta(principal, other, potential)