<jupyter_start><jupyter_text>Testing the implementation of basic ML model with robustness checks  Import model code<jupyter_code>%load_ext autoreload
%autoreload 2
!ls ..
!ln -s ../models/
!ln -s ../utils/
!ln -s ../data/
!ls
from models.extended_ml import ExtendedMLModel<jupyter_output><empty_output><jupyter_text>Create simple model<jupyter_code>def print_model(model):
    print("MODEL CONFIGURATION")
    print(model.conf)
    print("MODEL AGENTS")
    for a in model.schedule.agents:
        print(f"{a.unique_id}, kl={a.kl}, state={a.state}")
print_model(model)
model = ExtendedMLModel(
    num_humans=10,
    num_ml=10,
    belief_dims=20,
    p_1=0.1,
    p_2=0.9,
    p_3=0.9,
    p_h1=0.1,
    p_h2=0.5,
    p_ml=0.8,
    p_turb=0.04,
    p_ml_scaling="logistic",
)
model.step()<jupyter_output>reached update
reached update
reached update
reached update
reached update
reached update
reached update
reached update
reached update
reached update
updated KLs
[<models.extended_ml.Reality object at 0x117a425d0>, <models.extended_ml.Human object at 0x117a42550>, <models.extended_ml.Human object at 0x117a42790>, <models.extended_ml.Human object at 0x117a42910>, <models.extended_ml.Human object at 0x117a42a90>, <models.extended_ml.Human object at 0x117a42c50>, <models.extended_ml.Human object at 0x117a42590>, <models.extended_ml.Human object at 0x117a42f10>, <models.extended_ml.Human object at 0x1179b1b50>, <models.extended_ml.Human object at 0x117a42e10>, <models.extended_ml.Human object at 0x117a42b90>, <models.extended_ml.MLAgent object at 0x117a429d0>, <models.extended_ml.MLAgent object at 0x117a42810>, <models.extended_ml.MLAgent object at 0x117a42710>, <models.extended_ml.MLAgent object at 0x117a426d0>, <models.extended_ml.MLAgent object at 0x117a42690>, <models.extended_ml.MLAge[...]
{'fraction_non_alphanumeric': 0.11215469613259668, 'fraction_numerical': 0.08950276243093923, 'mean_word_length': 5.288194444444445, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '420311', 'license': 'MIT', 'n_tokens_mistral': 804, 'n_tokens_neox': 675, 'n_words': 147, 'path': 'nbs/07_Test_Extended_ML_Model.ipynb', 'repo_name': 'felixpeters/ai-sim-job', 'size': '1810'}