Contextualized Networks#

import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
X = np.random.normal(0, 1, size=(1000, 10))
C = np.random.uniform(-1, 1, size=(1000, 5))
# Correlation Networks
from contextualized.easy import ContextualizedCorrelationNetworks

ccn = ContextualizedCorrelationNetworks(encoder_type='ngam', num_archetypes=16, n_bootstraps=3)
ccn.fit(C, X, max_epochs=5)

# Get rho
ccn.predict_correlation(C, squared=False)

# Get rho^2
ccn.predict_correlation(C, squared=True)
GPU available: True (mps), used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
/opt/homebrew/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py:1789: UserWarning: MPS available but not used. Set `accelerator` and `devices` using `Trainer(accelerator='mps', devices=1)`.
  rank_zero_warn(
/opt/homebrew/lib/python3.10/site-packages/pytorch_lightning/callbacks/model_checkpoint.py:616: UserWarning: Checkpoint directory /Users/blengerich/Dropbox/Professional/Research/Libraries/Contextualized/docs/demos/lightning_logs/boot_0_checkpoints exists and is not empty.
  rank_zero_warn(f"Checkpoint directory {dirpath} exists and is not empty.")

  | Name      | Type             | Params
-----------------------------------------------
0 | metamodel | SubtypeMetamodel | 8.8 K 
-----------------------------------------------
8.8 K     Trainable params
0         Non-trainable params
8.8 K     Total params
0.035     Total estimated model params size (MB)
/opt/homebrew/lib/python3.10/site-packages/pytorch_lightning/trainer/connectors/data_connector.py:236: PossibleUserWarning: The dataloader, val_dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 10 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  rank_zero_warn(
/opt/homebrew/lib/python3.10/site-packages/pytorch_lightning/trainer/connectors/data_connector.py:236: PossibleUserWarning: The dataloader, train_dataloader, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 10 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  rank_zero_warn(
`Trainer.fit` stopped: `max_epochs=5` reached.
GPU available: True (mps), used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
/opt/homebrew/lib/python3.10/site-packages/pytorch_lightning/callbacks/model_checkpoint.py:616: UserWarning: Checkpoint directory /Users/blengerich/Dropbox/Professional/Research/Libraries/Contextualized/docs/demos/lightning_logs/boot_1_checkpoints exists and is not empty.
  rank_zero_warn(f"Checkpoint directory {dirpath} exists and is not empty.")

  | Name      | Type             | Params
-----------------------------------------------
0 | metamodel | SubtypeMetamodel | 8.8 K 
-----------------------------------------------
8.8 K     Trainable params
0         Non-trainable params
8.8 K     Total params
0.035     Total estimated model params size (MB)
GPU available: True (mps), used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
/opt/homebrew/lib/python3.10/site-packages/pytorch_lightning/callbacks/model_checkpoint.py:616: UserWarning: Checkpoint directory /Users/blengerich/Dropbox/Professional/Research/Libraries/Contextualized/docs/demos/lightning_logs/boot_2_checkpoints exists and is not empty.
  rank_zero_warn(f"Checkpoint directory {dirpath} exists and is not empty.")

  | Name      | Type             | Params
-----------------------------------------------
0 | metamodel | SubtypeMetamodel | 8.8 K 
-----------------------------------------------
8.8 K     Trainable params
0         Non-trainable params
8.8 K     Total params
0.035     Total estimated model params size (MB)
/opt/homebrew/lib/python3.10/site-packages/pytorch_lightning/trainer/connectors/data_connector.py:236: PossibleUserWarning: The dataloader, predict_dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 10 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  rank_zero_warn(
/opt/homebrew/lib/python3.10/site-packages/pytorch_lightning/loops/epoch/prediction_epoch_loop.py:174: UserWarning: Lightning couldn't infer the indices fetched for your dataloader.
  warning_cache.warn("Lightning couldn't infer the indices fetched for your dataloader.")
array([[[[9.89862516e-01, 3.50535239e-04, 7.30263222e-03, ...,
          7.90101277e-04, 1.05555484e-03, 7.80435884e-06],
         [2.49076890e-04, 1.00825720e+00, 6.03154572e-05, ...,
          6.00902896e-03, 2.33155914e-05, 6.36553736e-04],
         [9.27782722e-03, 2.65080100e-04, 1.02757562e+00, ...,
          4.48706900e-04, 3.33212893e-04, 2.36649999e-04],
         ...,
         [7.40074511e-04, 5.87037857e-03, 1.86871377e-04, ...,
          1.01477822e+00, 8.16102718e-04, 3.65115072e-03],
         [7.11498927e-04, 9.39027914e-05, 5.19456769e-04, ...,
          4.71734029e-04, 1.04765931e+00, 6.24137964e-03],
         [7.82117662e-06, 1.00058264e-03, 1.44764192e-04, ...,
          3.47015122e-03, 6.59794730e-03, 1.00512683e+00]],

        [[9.23732310e-01, 3.07706764e-04, 2.04932599e-03, ...,
          2.64686562e-05, 6.52232603e-04, 2.16598057e-03],
         [1.03738674e-04, 9.66583699e-01, 1.32111645e-03, ...,
          1.01753465e-03, 1.45276702e-03, 1.11053638e-06],
         [2.74632460e-03, 1.84542423e-03, 9.64833398e-01, ...,
          1.68688850e-04, 2.14629193e-04, 2.16746439e-04],
         ...,
         [1.18703923e-04, 6.47711534e-04, 2.43789148e-04, ...,
          9.45673180e-01, 1.28769036e-03, 7.25106711e-05],
         [4.61113960e-04, 1.29226573e-03, 1.95653315e-04, ...,
          1.03251808e-03, 9.78920556e-01, 7.79265995e-04],
         [1.52838519e-03, 1.07643960e-04, 2.39452920e-04, ...,
          7.98384324e-05, 7.67223210e-04, 9.45399151e-01]],

        [[8.93459992e-01, 6.15965179e-04, 4.39199451e-03, ...,
          4.48587515e-04, 5.35015409e-04, 3.46388072e-08],
         [6.49806805e-04, 9.10177064e-01, 1.73524217e-05, ...,
          1.46126930e-03, 5.85060820e-04, 3.99360233e-04],
         [6.11167208e-03, 2.40289838e-05, 9.08524871e-01, ...,
          4.71304003e-04, 7.98057421e-04, 1.28664209e-04],
         ...,
         [4.80706953e-04, 1.56016362e-03, 4.97654900e-04, ...,
          8.85189450e-01, 4.49532696e-04, 1.90847983e-03],
         [4.37521211e-04, 6.36911320e-04, 9.14773350e-04, ...,
          1.94051423e-04, 9.24537476e-01, 4.89506230e-03],
         [1.63442194e-06, 9.86524055e-04, 1.34235574e-04, ...,
          2.16010367e-03, 5.11401392e-03, 9.02372803e-01]],

        ...,

        [[9.77668958e-01, 9.66356631e-04, 5.45096257e-03, ...,
          2.73839642e-04, 1.23277910e-03, 1.52555523e-04],
         [6.67197593e-04, 1.00001812e+00, 2.72732975e-04, ...,
          3.12069022e-03, 5.19730285e-04, 1.52711176e-04],
         [7.09876984e-03, 5.26145010e-04, 1.00815186e+00, ...,
          4.51677698e-04, 6.72953617e-04, 9.96446583e-05],
         ...,
         [2.67110982e-04, 2.89043036e-03, 3.54353912e-04, ...,
          9.88186054e-01, 5.12383608e-04, 1.30780126e-03],
         [8.79040264e-04, 6.77940798e-04, 8.14243092e-04, ...,
          2.98100466e-04, 1.02847803e+00, 3.84413938e-03],
         [9.52754857e-05, 5.45376667e-04, 1.05244934e-04, ...,
          1.32061930e-03, 4.04819946e-03, 9.93260809e-01]],

        [[8.15051219e-01, 3.35955454e-04, 4.44422093e-04, ...,
          3.29738309e-05, 4.51466842e-05, 9.45445598e-04],
         [1.88748582e-04, 8.51578219e-01, 8.32790504e-05, ...,
          3.57819624e-04, 8.91051999e-04, 5.91585206e-04],
         [1.07491988e-03, 2.61045649e-05, 8.40905827e-01, ...,
          1.35956910e-06, 2.23968887e-04, 6.78489230e-04],
         ...,
         [1.58623743e-06, 2.08607428e-04, 1.23774353e-04, ...,
          8.15240860e-01, 1.46891360e-03, 2.65611398e-05],
         [7.29289726e-05, 4.65995161e-04, 2.36993569e-04, ...,
          9.73773321e-04, 8.38672128e-01, 7.36743848e-04],
         [6.18207811e-04, 1.25257055e-03, 6.83955056e-04, ...,
          3.47920990e-06, 8.60343759e-04, 8.31710733e-01]],

        [[9.73964731e-01, 1.17254699e-03, 4.49079748e-03, ...,
          1.29161408e-04, 1.28778875e-03, 3.02262201e-04],
         [7.89033563e-04, 1.00013328e+00, 4.08553566e-04, ...,
          1.82112698e-03, 9.56605410e-04, 4.98770234e-05],
         [6.01281715e-03, 7.17532879e-04, 1.00416664e+00, ...,
          3.97557993e-04, 8.10765033e-04, 7.39596046e-05],
         ...,
         [1.09685833e-04, 1.60446952e-03, 4.19982318e-04, ...,
          9.80392723e-01, 4.58919188e-04, 4.97367981e-04],
         [9.09985316e-04, 1.07734860e-03, 9.23957214e-04, ...,
          2.76872307e-04, 1.02421993e+00, 2.70909179e-03],
         [1.78577635e-04, 4.08491222e-04, 9.81330336e-05, ...,
          5.50648189e-04, 2.85700161e-03, 9.92224252e-01]]],


       [[[7.57250388e-01, 6.27242509e-04, 5.65419398e-05, ...,
          1.56257567e-03, 7.02913441e-04, 1.02229210e-02],
         [8.87077198e-04, 7.36720279e-01, 4.52357254e-04, ...,
          6.58217040e-04, 1.06829245e-03, 2.59736166e-04],
         [6.19960757e-05, 6.01330082e-04, 7.79814295e-01, ...,
          1.65437519e-02, 2.21551374e-03, 5.38376744e-05],
         ...,
         [3.04538108e-03, 1.05959633e-03, 1.43988192e-02, ...,
          7.79377590e-01, 8.76510910e-04, 3.30813410e-03],
         [9.92310349e-04, 7.71068498e-04, 2.09023254e-03, ...,
          7.75384009e-04, 7.64531616e-01, 7.30804604e-04],
         [8.24412085e-03, 5.83364427e-04, 4.32787152e-07, ...,
          4.73163409e-03, 4.08958394e-04, 7.96859686e-01]],

        [[6.23113843e-01, 2.76674170e-04, 2.95142070e-05, ...,
          1.59132375e-03, 2.64017807e-04, 8.47643598e-03],
         [3.93619695e-04, 6.14049281e-01, 4.96783101e-04, ...,
          3.39549778e-04, 3.54779494e-04, 5.12110431e-04],
         [2.89187455e-06, 5.75667822e-04, 6.50362387e-01, ...,
          8.91421503e-03, 1.27540042e-03, 7.21123625e-05],
         ...,
         [2.52281041e-03, 5.92322808e-04, 8.86661315e-03, ...,
          6.51812354e-01, 5.41663330e-04, 3.07069102e-03],
         [3.66603304e-04, 5.27902476e-04, 1.07653000e-03, ...,
          5.87434671e-04, 6.38643184e-01, 1.17747545e-04],
         [8.07718711e-03, 5.37294634e-04, 1.70919527e-05, ...,
          2.99781533e-03, 1.76968657e-04, 6.63437784e-01]],

        [[8.21233750e-01, 7.19630970e-04, 3.89513223e-05, ...,
          2.29955365e-03, 1.07331169e-03, 1.11687703e-02],
         [9.54473998e-04, 8.29496671e-01, 2.83935377e-04, ...,
          6.75880705e-04, 1.02519134e-03, 3.72795227e-04],
         [3.24397115e-05, 2.75605074e-04, 8.47645491e-01, ...,
          1.69313564e-02, 2.11808636e-03, 4.54088781e-08],
         ...,
         [4.02736828e-03, 1.10375309e-03, 1.50827277e-02, ...,
          8.62505113e-01, 9.89000786e-04, 3.40978440e-03],
         [1.41242428e-03, 8.12971167e-04, 2.01429590e-03, ...,
          8.22593924e-04, 8.44713231e-01, 9.59325026e-04],
         [1.04970479e-02, 5.34881427e-04, 5.56703319e-08, ...,
          4.27826869e-03, 4.96897940e-04, 8.72411811e-01]],

        ...,

        [[7.18150621e-01, 5.39967139e-04, 4.77990758e-05, ...,
          1.79927561e-03, 6.75276018e-04, 9.88680985e-03],
         [7.31288683e-04, 7.14688018e-01, 3.83226633e-04, ...,
          5.68610506e-04, 7.22027390e-04, 3.72991831e-04],
         [8.81590406e-06, 4.18226562e-04, 7.48760903e-01, ...,
          1.35468084e-02, 2.09925679e-03, 2.13752510e-05],
         ...,
         [3.14996337e-03, 9.28223553e-04, 1.24046338e-02, ...,
          7.49412250e-01, 7.03758546e-04, 3.22347803e-03],
         [8.62511814e-04, 7.04919441e-04, 1.81245155e-03, ...,
          5.68825143e-04, 7.39203940e-01, 4.96761845e-04],
         [8.98694307e-03, 4.72674847e-04, 4.26235042e-07, ...,
          4.05347352e-03, 2.70389192e-04, 7.67006140e-01]],

        [[7.88516286e-01, 5.53417544e-04, 1.78516858e-05, ...,
          2.38214641e-03, 8.05606310e-04, 1.04975181e-02],
         [6.77840507e-04, 7.94977580e-01, 3.33393259e-04, ...,
          5.12474852e-04, 7.42707637e-04, 4.84210400e-04],
         [1.71636628e-05, 3.53929217e-04, 8.12581437e-01, ...,
          1.37019216e-02, 1.44660609e-03, 8.95541907e-06],
         ...,
         [3.77303846e-03, 8.05416103e-04, 1.28507993e-02, ...,
          8.30114777e-01, 9.36143321e-04, 3.45003938e-03],
         [1.01007927e-03, 6.94056358e-04, 1.42797574e-03, ...,
          9.09510922e-04, 8.07186300e-01, 5.43480721e-04],
         [1.01973333e-02, 6.25278236e-04, 1.48302421e-05, ...,
          3.43139424e-03, 4.52572315e-04, 8.29218750e-01]],

        [[7.42678411e-01, 4.80761841e-04, 5.16368192e-05, ...,
          2.03899387e-03, 6.81824944e-04, 1.03483282e-02],
         [6.66270212e-04, 7.43681733e-01, 4.93471856e-04, ...,
          5.11943525e-04, 5.70215403e-04, 5.09568576e-04],
         [4.78309989e-06, 4.77375663e-04, 7.74743276e-01, ...,
          1.26372111e-02, 1.91074557e-03, 1.98822924e-05],
         ...,
         [3.34049103e-03, 9.20813280e-04, 1.18737402e-02, ...,
          7.80141299e-01, 7.30740354e-04, 3.36173235e-03],
         [8.37487787e-04, 6.37389573e-04, 1.57141747e-03, ...,
          6.20196488e-04, 7.66627938e-01, 3.76885179e-04],
         [9.96958635e-03, 5.04020734e-04, 1.02392559e-05, ...,
          3.74370298e-03, 2.37038447e-04, 7.95883631e-01]]],


       [[[9.12838685e-01, 5.86530023e-03, 1.67777767e-03, ...,
          1.62827044e-04, 6.77267804e-05, 4.73669281e-03],
         [6.30009948e-03, 8.50397918e-01, 1.73038669e-04, ...,
          5.07710598e-03, 5.75179725e-04, 5.70556539e-03],
         [1.95435463e-03, 5.27674738e-04, 8.57395417e-01, ...,
          8.93458137e-04, 1.17716498e-03, 1.43292482e-03],
         ...,
         [8.07685144e-06, 5.04571157e-03, 3.01637525e-04, ...,
          8.66551021e-01, 4.05338814e-03, 1.81084818e-03],
         [3.42686439e-05, 9.43569013e-04, 1.60472320e-03, ...,
          3.99867462e-03, 8.84102417e-01, 1.18537417e-03],
         [3.18107190e-03, 5.35139470e-03, 1.17376758e-03, ...,
          2.65487097e-03, 1.19940311e-03, 8.07320504e-01]],

        [[9.48810183e-01, 4.43922706e-03, 2.02852108e-03, ...,
          7.48094052e-05, 4.98261809e-06, 4.55123668e-03],
         [5.92677191e-03, 8.79442885e-01, 6.64638353e-04, ...,
          6.88660525e-03, 6.30566767e-04, 5.25577004e-03],
         [2.41881504e-03, 1.55173686e-03, 8.84768125e-01, ...,
          4.73114816e-04, 7.21374081e-04, 1.14222635e-03],
         ...,
         [1.45518022e-04, 7.60265776e-03, 1.71854218e-04, ...,
          8.97546833e-01, 4.66048844e-03, 1.81953948e-03],
         [1.33138813e-05, 6.88815856e-04, 1.16956621e-03, ...,
          4.28287131e-03, 9.22433735e-01, 1.85019500e-03],
         [3.50036156e-03, 4.21692853e-03, 1.07329655e-03, ...,
          2.44593097e-03, 2.04656861e-03, 8.42957189e-01]],

        [[9.06410950e-01, 5.71681079e-03, 2.00019208e-03, ...,
          2.53992676e-04, 3.54731893e-05, 4.81522838e-03],
         [6.96182924e-03, 8.48058653e-01, 2.18695904e-04, ...,
          5.38925956e-03, 6.65632260e-04, 4.57038414e-03],
         [2.35304844e-03, 4.88802857e-04, 8.50133664e-01, ...,
          8.06697448e-04, 8.06782096e-04, 1.14195568e-03],
         ...,
         [1.58362973e-05, 5.47733227e-03, 2.28869309e-04, ...,
          8.63739428e-01, 4.39361717e-03, 1.82894296e-03],
         [6.55269609e-06, 9.38991468e-04, 1.13623721e-03, ...,
          3.99850595e-03, 8.84011852e-01, 1.40470826e-03],
         [3.29479371e-03, 4.41545989e-03, 9.38868071e-04, ...,
          2.60883908e-03, 1.66464863e-03, 8.12798627e-01]],

        ...,

        [[8.84740877e-01, 5.34188591e-03, 1.78463504e-03, ...,
          9.44427271e-05, 3.72728804e-05, 4.59711889e-03],
         [6.13098789e-03, 8.23934659e-01, 2.02242947e-04, ...,
          5.29422589e-03, 6.38719016e-04, 5.06388183e-03],
         [2.05580695e-03, 5.70378027e-04, 8.28798918e-01, ...,
          8.03860609e-04, 8.42542295e-04, 1.19061266e-03],
         ...,
         [1.80194768e-06, 5.50717763e-03, 2.64157470e-04, ...,
          8.39172422e-01, 4.09376433e-03, 1.78349583e-03],
         [1.07224625e-05, 9.02095313e-04, 1.29146155e-03, ...,
          3.89028253e-03, 8.58358224e-01, 1.37393817e-03],
         [3.18635037e-03, 4.65586101e-03, 1.02318296e-03, ...,
          2.56836917e-03, 1.45697098e-03, 7.82994693e-01]],

        [[9.91124504e-01, 5.13020064e-03, 2.31958634e-03, ...,
          3.42122617e-07, 2.11044147e-06, 4.84200005e-03],
         [6.92735010e-03, 9.22591055e-01, 7.08871578e-04, ...,
          6.90585122e-03, 6.67689585e-04, 5.13525022e-03],
         [2.73691969e-03, 1.32526821e-03, 9.27102800e-01, ...,
          4.80056206e-04, 8.15571970e-04, 1.20332090e-03],
         ...,
         [5.83329543e-05, 7.19030291e-03, 1.42426960e-04, ...,
          9.42626091e-01, 5.16580228e-03, 1.75680878e-03],
         [9.15552194e-06, 6.86522487e-04, 1.13630201e-03, ...,
          4.63063479e-03, 9.66414117e-01, 1.75762676e-03],
         [3.45532967e-03, 4.41816049e-03, 1.01405299e-03, ...,
          2.45650223e-03, 2.10479264e-03, 8.92433207e-01]],

        [[8.90278711e-01, 5.09809855e-03, 1.82374593e-03, ...,
          5.15316554e-05, 1.47910888e-05, 4.52524833e-03],
         [6.10311866e-03, 8.27856527e-01, 2.55612681e-04, ...,
          5.53847356e-03, 6.85767888e-04, 4.93276043e-03],
         [2.14027086e-03, 6.72483261e-04, 8.31351246e-01, ...,
          6.92856495e-04, 7.01806306e-04, 1.16017074e-03],
         ...,
         [3.35488268e-07, 5.73357215e-03, 2.27734968e-04, ...,
          8.42715870e-01, 4.40731755e-03, 1.72364526e-03],
         [2.33231953e-06, 8.35534698e-04, 1.11920707e-03, ...,
          4.07034774e-03, 8.62611841e-01, 1.39775730e-03],
         [3.09206992e-03, 4.44920164e-03, 1.00929989e-03, ...,
          2.53305246e-03, 1.56527667e-03, 7.87554983e-01]]]])
# Markov Networks

from contextualized.easy import ContextualizedMarkovNetworks

cmn = ContextualizedMarkovNetworks(encoder_type='ngam', num_archetypes=16, n_bootstraps=3)
cmn.fit(C, X, max_epochs=5)

# Get network
cmn.predict_networks(C)

# Get precision matrices
cmn.predict_precisions(C)
GPU available: True (mps), used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
  | Name      | Type             | Params
-----------------------------------------------
0 | metamodel | SubtypeMetamodel | 7.3 K 
-----------------------------------------------
7.3 K     Trainable params
0         Non-trainable params
7.3 K     Total params
0.029     Total estimated model params size (MB)
GPU available: True (mps), used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
  | Name      | Type             | Params
-----------------------------------------------
0 | metamodel | SubtypeMetamodel | 7.3 K 
-----------------------------------------------
7.3 K     Trainable params
0         Non-trainable params
7.3 K     Total params
0.029     Total estimated model params size (MB)
GPU available: True (mps), used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
  | Name      | Type             | Params
-----------------------------------------------
0 | metamodel | SubtypeMetamodel | 7.3 K 
-----------------------------------------------
7.3 K     Trainable params
0         Non-trainable params
7.3 K     Total params
0.029     Total estimated model params size (MB)
array([[[[-0.00000000e+00,  3.79762016e-02,  6.72823191e-02, ...,
           2.38584587e-03, -3.77380215e-02,  6.44380450e-02],
         [ 3.79762016e-02, -0.00000000e+00, -2.64505651e-02, ...,
           6.41709119e-02,  3.71031538e-02, -2.26043779e-02],
         [ 6.72823191e-02, -2.64505651e-02, -0.00000000e+00, ...,
           5.76512516e-02, -2.81158201e-02, -2.49102488e-02],
         ...,
         [ 2.38584587e-03,  6.41709119e-02,  5.76512516e-02, ...,
          -0.00000000e+00, -4.65933979e-02, -1.62600502e-02],
         [-3.77380215e-02,  3.71031538e-02, -2.81158201e-02, ...,
          -4.65933979e-02, -0.00000000e+00, -5.51168919e-02],
         [ 6.44380450e-02, -2.26043779e-02, -2.49102488e-02, ...,
          -1.62600502e-02, -5.51168919e-02, -0.00000000e+00]],

        [[-0.00000000e+00,  5.39469086e-02,  7.05896169e-02, ...,
          -2.06243768e-02, -7.50767663e-02,  6.34372607e-02],
         [ 5.39469086e-02, -0.00000000e+00, -4.85335849e-03, ...,
           6.60559684e-02,  9.72347334e-02, -4.51064259e-02],
         [ 7.05896169e-02, -4.85335849e-03, -0.00000000e+00, ...,
           9.18963403e-02, -2.76931860e-02, -5.89454100e-02],
         ...,
         [-2.06243768e-02,  6.60559684e-02,  9.18963403e-02, ...,
          -0.00000000e+00, -8.35510641e-02, -3.14000696e-02],
         [-7.50767663e-02,  9.72347334e-02, -2.76931860e-02, ...,
          -8.35510641e-02, -0.00000000e+00, -6.73868060e-02],
         [ 6.34372607e-02, -4.51064259e-02, -5.89454100e-02, ...,
          -3.14000696e-02, -6.73868060e-02, -0.00000000e+00]],

        [[-0.00000000e+00,  1.04961265e-02,  3.71861197e-02, ...,
           7.75893126e-03, -1.05874902e-02,  2.03646235e-02],
         [ 1.04961265e-02, -0.00000000e+00, -1.77317057e-02, ...,
           3.20662893e-02,  1.06884609e-03, -1.05142808e-02],
         [ 3.71861197e-02, -1.77317057e-02, -0.00000000e+00, ...,
           1.46256667e-02, -1.84025057e-02, -1.19055752e-02],
         ...,
         [ 7.75893126e-03,  3.20662893e-02,  1.46256667e-02, ...,
          -0.00000000e+00, -1.13475136e-02,  4.86422796e-03],
         [-1.05874902e-02,  1.06884609e-03, -1.84025057e-02, ...,
          -1.13475136e-02, -0.00000000e+00, -4.67092078e-03],
         [ 2.03646235e-02, -1.05142808e-02, -1.19055752e-02, ...,
           4.86422796e-03, -4.67092078e-03, -0.00000000e+00]],

        ...,

        [[-0.00000000e+00,  3.17455232e-02,  6.23767152e-02, ...,
           4.67062113e-04, -3.98902707e-02,  5.34806401e-02],
         [ 3.17455232e-02, -0.00000000e+00, -2.28560790e-02, ...,
           5.67314029e-02,  4.49827686e-02, -2.91421711e-02],
         [ 6.23767152e-02, -2.28560790e-02, -0.00000000e+00, ...,
           5.95979281e-02, -2.10535936e-02, -2.95272283e-02],
         ...,
         [ 4.67062113e-04,  5.67314029e-02,  5.95979281e-02, ...,
          -0.00000000e+00, -4.49478179e-02, -1.66146941e-02],
         [-3.98902707e-02,  4.49827686e-02, -2.10535936e-02, ...,
          -4.49478179e-02, -0.00000000e+00, -4.73117605e-02],
         [ 5.34806401e-02, -2.91421711e-02, -2.95272283e-02, ...,
          -1.66146941e-02, -4.73117605e-02, -0.00000000e+00]],

        [[-0.00000000e+00,  1.78990029e-02,  2.85606403e-02, ...,
          -1.05060525e-02, -3.50006521e-02,  2.43834071e-02],
         [ 1.78990029e-02, -0.00000000e+00, -2.20677187e-03, ...,
           2.32432634e-02,  3.95733155e-02, -2.23988220e-02],
         [ 2.85606403e-02, -2.20677187e-03, -0.00000000e+00, ...,
           4.23926711e-02, -1.88263990e-02, -3.01369391e-02],
         ...,
         [-1.05060525e-02,  2.32432634e-02,  4.23926711e-02, ...,
          -0.00000000e+00, -2.52837613e-02, -1.17928013e-02],
         [-3.50006521e-02,  3.95733155e-02, -1.88263990e-02, ...,
          -2.52837613e-02, -0.00000000e+00, -1.42081948e-02],
         [ 2.43834071e-02, -2.23988220e-02, -3.01369391e-02, ...,
          -1.17928013e-02, -1.42081948e-02, -0.00000000e+00]],

        [[-0.00000000e+00,  2.56797075e-02,  4.95882072e-02, ...,
          -4.06341581e-03, -3.97564769e-02,  5.19283637e-02],
         [ 2.56797075e-02, -0.00000000e+00, -1.77231822e-02, ...,
           4.09939960e-02,  4.48720083e-02, -2.91369706e-02],
         [ 4.95882072e-02, -1.77231822e-02, -0.00000000e+00, ...,
           6.28448576e-02, -2.01022308e-02, -2.78440006e-02],
         ...,
         [-4.06341581e-03,  4.09939960e-02,  6.28448576e-02, ...,
          -0.00000000e+00, -3.35486829e-02, -2.16163285e-02],
         [-3.97564769e-02,  4.48720083e-02, -2.01022308e-02, ...,
          -3.35486829e-02, -0.00000000e+00, -4.34122756e-02],
         [ 5.19283637e-02, -2.91369706e-02, -2.78440006e-02, ...,
          -2.16163285e-02, -4.34122756e-02, -0.00000000e+00]]],


       [[[-0.00000000e+00,  1.52201355e-02, -6.10923730e-02, ...,
           3.24961939e-03, -5.45080900e-02, -6.53190240e-02],
         [ 1.52201355e-02, -0.00000000e+00, -2.53827907e-02, ...,
           3.04247923e-02,  8.69070087e-03, -1.89322699e-02],
         [-6.10923730e-02, -2.53827907e-02, -0.00000000e+00, ...,
          -8.37875530e-03,  4.04637456e-02,  2.30775438e-02],
         ...,
         [ 3.24961939e-03,  3.04247923e-02, -8.37875530e-03, ...,
          -0.00000000e+00,  3.23795602e-02,  3.05562764e-02],
         [-5.45080900e-02,  8.69070087e-03,  4.04637456e-02, ...,
           3.23795602e-02, -0.00000000e+00,  1.24695133e-02],
         [-6.53190240e-02, -1.89322699e-02,  2.30775438e-02, ...,
           3.05562764e-02,  1.24695133e-02, -0.00000000e+00]],

        [[-0.00000000e+00,  2.72307806e-02, -5.73289767e-02, ...,
          -4.39427886e-03, -5.85180372e-02, -6.36056960e-02],
         [ 2.72307806e-02, -0.00000000e+00, -2.45678350e-02, ...,
           4.67042346e-03,  2.08799895e-02, -2.25322451e-02],
         [-5.73289767e-02, -2.45678350e-02, -0.00000000e+00, ...,
          -1.10519500e-02,  2.23827995e-02,  1.44354813e-02],
         ...,
         [-4.39427886e-03,  4.67042346e-03, -1.10519500e-02, ...,
          -0.00000000e+00,  1.40820649e-02,  2.47811209e-02],
         [-5.85180372e-02,  2.08799895e-02,  2.23827995e-02, ...,
           1.40820649e-02, -0.00000000e+00,  1.85501277e-02],
         [-6.36056960e-02, -2.25322451e-02,  1.44354813e-02, ...,
           2.47811209e-02,  1.85501277e-02, -0.00000000e+00]],

        [[-0.00000000e+00, -2.47222297e-02, -2.40650214e-02, ...,
           5.21276221e-02, -3.34276855e-02, -3.67066972e-02],
         [-2.47222297e-02, -0.00000000e+00,  2.53506266e-02, ...,
           1.40624661e-02,  1.21471230e-02, -3.42462421e-03],
         [-2.40650214e-02,  2.53506266e-02, -0.00000000e+00, ...,
           3.19996965e-03,  5.17021194e-02, -2.48726122e-02],
         ...,
         [ 5.21276221e-02,  1.40624661e-02,  3.19996965e-03, ...,
          -0.00000000e+00,  2.72176787e-02, -1.24952588e-02],
         [-3.34276855e-02,  1.21471230e-02,  5.17021194e-02, ...,
           2.72176787e-02, -0.00000000e+00,  1.65127758e-02],
         [-3.67066972e-02, -3.42462421e-03, -2.48726122e-02, ...,
          -1.24952588e-02,  1.65127758e-02, -0.00000000e+00]],

        ...,

        [[-0.00000000e+00,  7.06451666e-03, -4.37117144e-02, ...,
           9.50042158e-03, -5.00906818e-02, -4.88801524e-02],
         [ 7.06451666e-03, -0.00000000e+00, -4.61548939e-03, ...,
           1.20609580e-02,  1.72587521e-02, -1.75216030e-02],
         [-4.37117144e-02, -4.61548939e-03, -0.00000000e+00, ...,
          -1.91728119e-03,  3.69407572e-02,  8.77640769e-03],
         ...,
         [ 9.50042158e-03,  1.20609580e-02, -1.91728119e-03, ...,
          -0.00000000e+00,  1.90002285e-02,  1.30839348e-02],
         [-5.00906818e-02,  1.72587521e-02,  3.69407572e-02, ...,
           1.90002285e-02, -0.00000000e+00,  1.09494496e-02],
         [-4.88801524e-02, -1.75216030e-02,  8.77640769e-03, ...,
           1.30839348e-02,  1.09494496e-02, -0.00000000e+00]],

        [[-0.00000000e+00, -1.73089467e-02, -2.76193619e-02, ...,
           5.12773544e-02, -3.06053869e-02, -3.47239859e-02],
         [-1.73089467e-02, -0.00000000e+00,  1.73761211e-02, ...,
           2.55218195e-03,  1.28981890e-02, -3.16609582e-03],
         [-2.76193619e-02,  1.73761211e-02, -0.00000000e+00, ...,
          -1.88432820e-03,  4.33688536e-02, -2.30520088e-02],
         ...,
         [ 5.12773544e-02,  2.55218195e-03, -1.88432820e-03, ...,
          -0.00000000e+00,  2.04396322e-02, -1.26577057e-02],
         [-3.06053869e-02,  1.28981890e-02,  4.33688536e-02, ...,
           2.04396322e-02, -0.00000000e+00,  2.05956064e-02],
         [-3.47239859e-02, -3.16609582e-03, -2.30520088e-02, ...,
          -1.26577057e-02,  2.05956064e-02, -0.00000000e+00]],

        [[-0.00000000e+00,  1.15544535e-05, -3.68704535e-02, ...,
           1.84190180e-02, -4.48441356e-02, -3.97989601e-02],
         [ 1.15544535e-05, -0.00000000e+00,  6.96056662e-03, ...,
           4.45195753e-03,  2.02310234e-02, -1.49377864e-02],
         [-3.68704535e-02,  6.96056662e-03, -0.00000000e+00, ...,
           2.17299955e-03,  3.72471102e-02,  3.19143198e-03],
         ...,
         [ 1.84190180e-02,  4.45195753e-03,  2.17299955e-03, ...,
          -0.00000000e+00,  1.72459632e-02,  6.00179471e-03],
         [-4.48441356e-02,  2.02310234e-02,  3.72471102e-02, ...,
           1.72459632e-02, -0.00000000e+00,  8.65733251e-03],
         [-3.97989601e-02, -1.49377864e-02,  3.19143198e-03, ...,
           6.00179471e-03,  8.65733251e-03, -0.00000000e+00]]],


       [[[-0.00000000e+00,  3.22773457e-02, -5.91575652e-02, ...,
          -7.43395742e-03,  1.86792370e-02, -8.08547884e-02],
         [ 3.22773457e-02, -0.00000000e+00,  2.32705306e-02, ...,
           4.48453166e-02,  1.86834764e-02,  6.61408063e-03],
         [-5.91575652e-02,  2.32705306e-02, -0.00000000e+00, ...,
          -1.46647394e-02, -1.06818955e-02, -8.20120703e-03],
         ...,
         [-7.43395742e-03,  4.48453166e-02, -1.46647394e-02, ...,
          -0.00000000e+00,  2.30740942e-02,  5.69591532e-03],
         [ 1.86792370e-02,  1.86834764e-02, -1.06818955e-02, ...,
           2.30740942e-02, -0.00000000e+00,  4.87646535e-02],
         [-8.08547884e-02,  6.61408063e-03, -8.20120703e-03, ...,
           5.69591532e-03,  4.87646535e-02, -0.00000000e+00]],

        [[-0.00000000e+00,  1.90538336e-02, -5.06853834e-02, ...,
          -1.11669255e-02,  7.21614994e-03, -5.23921996e-02],
         [ 1.90538336e-02, -0.00000000e+00,  1.78156979e-02, ...,
           2.95422617e-02,  2.23215893e-02,  8.92175920e-03],
         [-5.06853834e-02,  1.78156979e-02, -0.00000000e+00, ...,
          -3.77835310e-03, -9.22869612e-03, -1.57824326e-02],
         ...,
         [-1.11669255e-02,  2.95422617e-02, -3.77835310e-03, ...,
          -0.00000000e+00,  6.75189169e-03,  1.71840645e-03],
         [ 7.21614994e-03,  2.23215893e-02, -9.22869612e-03, ...,
           6.75189169e-03, -0.00000000e+00,  3.02910656e-02],
         [-5.23921996e-02,  8.92175920e-03, -1.57824326e-02, ...,
           1.71840645e-03,  3.02910656e-02, -0.00000000e+00]],

        [[-0.00000000e+00,  4.67472672e-02, -6.41315952e-02, ...,
           2.18831301e-02,  3.28885466e-02, -9.78821814e-02],
         [ 4.67472672e-02, -0.00000000e+00,  3.69264968e-02, ...,
           5.02013043e-02,  1.90318073e-03, -1.25981495e-03],
         [-6.41315952e-02,  3.69264968e-02, -0.00000000e+00, ...,
          -1.50583498e-02, -1.63095482e-02, -1.22910654e-02],
         ...,
         [ 2.18831301e-02,  5.02013043e-02, -1.50583498e-02, ...,
          -0.00000000e+00,  1.37890177e-03,  3.85165662e-02],
         [ 3.28885466e-02,  1.90318073e-03, -1.63095482e-02, ...,
           1.37890177e-03, -0.00000000e+00,  5.29135913e-02],
         [-9.78821814e-02, -1.25981495e-03, -1.22910654e-02, ...,
           3.85165662e-02,  5.29135913e-02, -0.00000000e+00]],

        ...,

        [[-0.00000000e+00,  2.82053929e-02, -6.28206432e-02, ...,
          -3.06884642e-03,  1.54921785e-02, -7.27565736e-02],
         [ 2.82053929e-02, -0.00000000e+00,  1.96606349e-02, ...,
           4.50934768e-02,  1.45095848e-02,  4.49489057e-03],
         [-6.28206432e-02,  1.96606349e-02, -0.00000000e+00, ...,
          -1.03935401e-03,  2.38353619e-04, -1.57587603e-02],
         ...,
         [-3.06884642e-03,  4.50934768e-02, -1.03935401e-03, ...,
          -0.00000000e+00,  7.78413843e-03,  1.33108199e-02],
         [ 1.54921785e-02,  1.45095848e-02,  2.38353619e-04, ...,
           7.78413843e-03, -0.00000000e+00,  3.65132354e-02],
         [-7.27565736e-02,  4.49489057e-03, -1.57587603e-02, ...,
           1.33108199e-02,  3.65132354e-02, -0.00000000e+00]],

        [[-0.00000000e+00,  3.32180820e-02, -5.39759099e-02, ...,
           1.39218895e-02,  2.21865363e-02, -6.95139319e-02],
         [ 3.32180820e-02, -0.00000000e+00,  3.37836072e-02, ...,
           3.38580646e-02,  8.31592921e-03,  2.91820779e-03],
         [-5.39759099e-02,  3.37836072e-02, -0.00000000e+00, ...,
          -9.22138989e-03, -2.16225814e-02, -1.61412638e-02],
         ...,
         [ 1.39218895e-02,  3.38580646e-02, -9.22138989e-03, ...,
          -0.00000000e+00, -1.15876710e-02,  3.03322505e-02],
         [ 2.21865363e-02,  8.31592921e-03, -2.16225814e-02, ...,
          -1.15876710e-02, -0.00000000e+00,  3.95924598e-02],
         [-6.95139319e-02,  2.91820779e-03, -1.61412638e-02, ...,
           3.03322505e-02,  3.95924598e-02, -0.00000000e+00]],

        [[-0.00000000e+00,  2.46369727e-02, -6.01489320e-02, ...,
           6.90049026e-04,  1.37301981e-02, -6.63318411e-02],
         [ 2.46369727e-02, -0.00000000e+00,  2.06389260e-02, ...,
           4.23069447e-02,  1.10172154e-02,  4.48318291e-03],
         [-6.01489320e-02,  2.06389260e-02, -0.00000000e+00, ...,
           1.52478705e-03,  2.51441076e-03, -1.91944167e-02],
         ...,
         [ 6.90049026e-04,  4.23069447e-02,  1.52478705e-03, ...,
          -0.00000000e+00,  1.75735948e-03,  1.54784387e-02],
         [ 1.37301981e-02,  1.10172154e-02,  2.51441076e-03, ...,
           1.75735948e-03, -0.00000000e+00,  2.95610949e-02],
         [-6.63318411e-02,  4.48318291e-03, -1.91944167e-02, ...,
           1.54784387e-02,  2.95610949e-02, -0.00000000e+00]]]])
# Bayesian Networks
from contextualized.easy import ContextualizedBayesianNetworks

cbn = ContextualizedMarkovNetworks(encoder_type='ngam', num_archetypes=16, n_bootstraps=3)
cbn.fit(C, X, max_epochs=5)

# Get network
cbn.predict_networks(C)


cbn.measure_mses(C, X)
GPU available: True (mps), used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
  | Name      | Type             | Params
-----------------------------------------------
0 | metamodel | SubtypeMetamodel | 7.3 K 
-----------------------------------------------
7.3 K     Trainable params
0         Non-trainable params
7.3 K     Total params
0.029     Total estimated model params size (MB)
GPU available: True (mps), used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
  | Name      | Type             | Params
-----------------------------------------------
0 | metamodel | SubtypeMetamodel | 7.3 K 
-----------------------------------------------
7.3 K     Trainable params
0         Non-trainable params
7.3 K     Total params
0.029     Total estimated model params size (MB)
GPU available: True (mps), used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
  | Name      | Type             | Params
-----------------------------------------------
0 | metamodel | SubtypeMetamodel | 7.3 K 
-----------------------------------------------
7.3 K     Trainable params
0         Non-trainable params
7.3 K     Total params
0.029     Total estimated model params size (MB)
array([0.88007736, 1.00024517, 0.66440315, 0.69860011, 0.59522215,
       1.52510775, 0.55339952, 0.92261044, 2.02184468, 0.67410138,
       0.79150607, 0.91911763, 0.91415584, 1.32631482, 0.46400006,
       0.94443037, 1.12260288, 0.70086666, 0.30105348, 0.82971142,
       0.82045639, 1.15041352, 1.35627999, 1.81542099, 1.0147423 ,
       1.38932417, 1.23523846, 1.57467141, 0.86238962, 0.69022099,
       0.76354915, 0.45662675, 1.60409115, 0.80518934, 1.80714635,
       0.81959731, 1.03217143, 0.7331834 , 1.26608549, 1.1757965 ,
       1.6264783 , 1.239255  , 1.39489568, 1.01143795, 0.53416453,
       0.76072173, 3.48492195, 0.97623333, 1.97837087, 0.66614825,
       0.95628659, 1.46225726, 0.58850474, 1.94540667, 0.78479997,
       1.82393708, 1.33258698, 0.57431504, 1.31351284, 0.9110382 ,
       0.28382378, 1.63623965, 1.47866874, 0.68944749, 0.53485432,
       1.65856846, 0.43448736, 0.46534166, 1.16449396, 0.91656212,
       1.39591942, 1.09463649, 0.24819175, 0.71436337, 1.75391741,
       0.63827774, 0.83895851, 0.86457255, 1.36677858, 0.88305501,
       1.31238088, 0.63236425, 0.49305789, 0.67982521, 0.89567625,
       0.67697358, 0.68693475, 0.57305328, 0.83514287, 1.30374235,
       0.88560065, 1.61115395, 0.73530001, 0.11201509, 1.22608828,
       1.36339485, 1.34360274, 1.25614904, 0.46102658, 0.79237162,
       1.08381967, 0.81781243, 0.65639933, 0.27703012, 0.78986345,
       0.66564043, 0.98297443, 0.71375421, 1.4502502 , 1.667369  ,
       0.97354426, 1.2315739 , 1.81451682, 1.58928432, 0.36140473,
       0.31063428, 1.12521641, 1.07507193, 0.43724416, 0.57516312,
       1.13824977, 1.16599738, 1.17631919, 0.89810651, 1.78698023,
       0.94542156, 0.7845758 , 1.05501962, 0.89296651, 0.78159036,
       0.78309824, 1.6748167 , 0.45345935, 0.27042724, 0.53997564,
       0.32671395, 0.74237378, 0.61987158, 0.9429035 , 3.00672562,
       0.89356317, 1.08893769, 1.48482176, 0.68832099, 0.85082651,
       0.59111322, 2.01038412, 0.56265708, 1.04278795, 0.75540219,
       0.6348945 , 1.08670919, 1.44047821, 1.52596488, 0.70857954,
       0.53900632, 0.8938419 , 0.97817555, 1.63245277, 0.9539163 ,
       0.52051104, 0.70685259, 1.26907855, 0.50709993, 1.6556386 ,
       0.71126684, 0.84215245, 0.88383674, 0.51265399, 0.67358769,
       1.09390688, 0.86563917, 2.0143044 , 0.27531912, 0.20650945,
       0.57194955, 0.92813533, 0.66029565, 1.11210548, 0.69987788,
       0.95860615, 0.64276489, 0.64193685, 0.62307884, 0.66329781,
       1.31174122, 1.42161471, 0.50984227, 0.86559018, 0.76314226,
       1.1778902 , 0.86735126, 1.13772002, 0.84351494, 0.71528627,
       0.76555603, 0.92140734, 0.99601402, 1.59147217, 0.42761829,
       0.89118144, 1.07206324, 1.10012971, 1.17359898, 1.00885464,
       0.36509035, 1.33721098, 0.23740417, 0.60843012, 0.83387178,
       0.9148941 , 0.90984814, 0.70487006, 0.89836751, 0.57275772,
       0.68421992, 1.13539672, 0.52577648, 0.90879981, 1.02451345,
       2.2021064 , 1.78802983, 1.20028393, 1.22141942, 1.43887726,
       0.7373786 , 1.36848817, 0.49149797, 0.72948684, 0.75340653,
       0.92850734, 0.49072461, 0.83264989, 0.95605933, 1.80413268,
       0.66573172, 0.75410533, 0.81692272, 1.13365827, 0.34172347,
       1.12766286, 0.56256091, 0.94761079, 1.97654776, 1.3222739 ,
       0.25711388, 1.03255012, 0.23646388, 0.94649746, 1.10551771,
       1.05542808, 1.52719721, 0.64312065, 0.90162974, 0.73379341,
       1.60219458, 0.87417339, 0.81681073, 0.90689806, 0.61218199,
       1.21129141, 1.40442486, 0.48991473, 0.7264141 , 1.4389501 ,
       0.73056354, 0.93631426, 0.50299428, 0.72585759, 0.39229662,
       0.50293378, 0.62288583, 0.6012235 , 1.55532183, 1.70174204,
       1.2051071 , 1.48771827, 0.25515779, 1.1588272 , 0.48629462,
       1.47997063, 1.10707526, 0.32710747, 0.35484399, 1.32820396,
       1.36345338, 0.93998447, 1.05254247, 0.81188409, 0.60105136,
       1.28307749, 1.64796264, 1.02899359, 0.93679661, 0.60278906,
       1.30961652, 0.94636232, 0.57827597, 0.63503389, 0.57439647,
       0.97855931, 0.98566743, 0.85832403, 0.76158537, 1.27510697,
       0.32763351, 0.84129593, 2.15613958, 1.10057909, 0.78079183,
       1.50652318, 1.03408791, 0.38128209, 1.06982381, 1.75270557,
       1.15349304, 0.98279082, 0.72349387, 1.14710833, 0.61425749,
       1.12020594, 1.01252832, 0.43280676, 1.22677594, 2.5175282 ,
       1.36468157, 1.28706038, 0.71491164, 0.50563086, 1.12913824,
       2.20482537, 1.10598241, 0.95848598, 0.96796247, 0.53257139,
       1.06116518, 0.63964399, 0.66308623, 1.41701733, 1.14555185,
       0.94561335, 0.75191343, 0.5324187 , 0.53482029, 0.72609388,
       1.13682058, 1.22051184, 2.39304622, 0.88724509, 1.56925513,
       1.10693419, 0.72126028, 0.41962975, 0.61745557, 0.61647286,
       0.51778455, 0.83489855, 0.17948739, 1.00859971, 1.01828174,
       0.65202383, 1.61728561, 0.60948339, 0.82557489, 0.69568716,
       0.68470007, 0.5472983 , 1.11062694, 0.39542659, 0.77266416,
       0.76278075, 1.81403255, 0.97257215, 0.89361066, 2.44494379,
       1.16016682, 0.43071442, 1.0220985 , 0.90909548, 0.92579005,
       1.01030392, 0.80297551, 0.87774437, 1.51908383, 0.76276996,
       0.32617707, 0.75560325, 0.30598173, 1.87730334, 1.53018799,
       0.85955503, 0.99235223, 0.4517033 , 1.72149459, 0.9614814 ,
       1.18786994, 0.68715611, 1.83013975, 0.17798369, 1.1780615 ,
       0.81777274, 0.64867311, 0.61605974, 0.81486078, 0.57375905,
       1.07885485, 1.01083859, 0.86212516, 0.5289298 , 0.43056386,
       0.47209504, 0.83466144, 1.87879627, 0.69497991, 1.42841481,
       1.00229901, 0.7428161 , 0.42956321, 0.5711205 , 0.81222983,
       0.76253555, 0.5021195 , 1.11947128, 0.64367212, 1.99249833,
       0.93716332, 1.50202863, 1.85807596, 0.542208  , 1.03691037,
       1.16878104, 0.82306679, 0.74365699, 2.04678115, 1.27376064,
       0.70726687, 0.85690103, 0.80999519, 0.46200002, 0.89012335,
       0.60631309, 1.05965312, 2.33933034, 1.37243344, 0.83263475,
       1.01136097, 1.46361884, 1.5488273 , 0.52974541, 0.90753707,
       0.68242229, 1.2335218 , 1.11725351, 0.92804991, 0.87800171,
       0.66913534, 1.34105855, 0.90568563, 1.10652723, 0.77728289,
       1.06607158, 1.22420853, 1.31163191, 2.04819856, 1.22517914,
       1.48330225, 0.30580396, 1.68066363, 1.0339887 , 0.95937024,
       1.0945222 , 0.38882679, 1.00620733, 0.63587191, 1.27505424,
       0.8561719 , 1.24479318, 1.34746957, 0.73733676, 1.45805253,
       0.4239517 , 1.39169333, 1.02473031, 1.13511859, 0.45026487,
       0.92134728, 1.33888564, 0.835589  , 0.71266158, 0.92796843,
       0.70183226, 0.96439129, 1.76977845, 1.67223298, 1.192887  ,
       1.20044384, 1.1224868 , 0.93973052, 0.46326702, 1.54425976,
       0.89822132, 0.64231444, 0.63302642, 1.26543257, 1.91043179,
       1.28053536, 0.56561651, 0.960811  , 0.54842906, 0.35064461,
       0.53470052, 0.62616398, 1.8199803 , 1.01036838, 1.37057835,
       0.68732026, 1.21860719, 0.70593553, 1.72105417, 2.12300542,
       1.22553749, 0.82966513, 0.92141185, 0.98224043, 0.87341062,
       1.60666689, 0.93202026, 1.30043624, 0.34081728, 2.10520308,
       1.28590056, 0.88255145, 0.76382218, 0.89925219, 1.76650194,
       0.34153202, 0.97252458, 0.97452638, 0.85562681, 1.49055766,
       1.80708468, 1.07704707, 1.17636025, 0.98032382, 0.55025311,
       0.88208692, 0.96241161, 0.58785345, 1.06567823, 1.03124572,
       0.89784706, 1.0709846 , 0.99092491, 0.55088998, 0.68330708,
       1.22065818, 0.9954924 , 0.82526445, 1.44054063, 0.91326228,
       1.01585144, 1.21493321, 1.16365438, 0.53062195, 0.7711798 ,
       1.98932019, 0.52540872, 0.83236777, 0.98464846, 0.53978232,
       1.94365134, 1.00250724, 0.57037893, 0.74872306, 0.57462074,
       0.3289152 , 0.62998575, 0.71351585, 0.90365725, 1.68905894,
       1.36270677, 1.29115017, 2.14732668, 0.87793325, 1.08474562,
       0.93097872, 0.58369873, 0.62070028, 0.51431033, 0.5874543 ,
       1.0570232 , 1.38149636, 0.85479554, 0.59131488, 1.40171891,
       1.0299272 , 1.70565419, 1.4085919 , 0.72175737, 0.92734865,
       0.69883912, 0.78142521, 1.03042062, 0.95263094, 1.26779739,
       0.50898203, 1.15122948, 0.64407557, 0.82580587, 1.22247663,
       0.64515078, 0.88404848, 1.41353134, 1.19288075, 0.50375552,
       1.2363245 , 1.09728024, 0.51829175, 0.80835427, 0.6410025 ,
       1.04132787, 1.37213143, 1.17585298, 2.45503572, 1.07153897,
       0.32513902, 0.8349121 , 1.51779401, 1.61750123, 0.61558392,
       0.82827243, 0.65769361, 0.62563723, 0.91986023, 0.32881602,
       0.81656343, 1.30157343, 0.78105144, 0.81102934, 0.89791252,
       0.72527036, 1.99103626, 0.67636792, 0.44611723, 0.92941999,
       1.09393317, 1.15368577, 1.36878246, 0.78089937, 1.37936479,
       1.28441857, 0.73124852, 0.4936985 , 0.15146826, 0.58611608,
       1.13762055, 1.27228617, 1.40778222, 0.83975105, 0.61019935,
       0.81678328, 0.61411927, 0.53306247, 1.17424435, 1.1917558 ,
       1.1231272 , 1.16950546, 1.21676646, 0.61647097, 1.15192769,
       0.80298107, 1.00394255, 0.55208369, 0.81761656, 1.14779314,
       0.75568452, 1.64309474, 0.79247626, 0.67095343, 0.43988784,
       0.23932676, 1.46968132, 0.41835453, 1.77324314, 0.82417954,
       0.9718437 , 0.84446397, 1.12727728, 0.81702472, 1.25792203,
       0.64680157, 1.51762169, 0.9399804 , 1.24914098, 1.00837373,
       0.74642731, 0.86444227, 0.98078174, 0.48418508, 0.73605898,
       1.17080033, 1.26816383, 1.18710783, 0.92007512, 0.86507937,
       0.37468639, 1.46722859, 2.09557854, 1.34560635, 0.51692463,
       1.15189521, 0.53103538, 0.31306075, 1.45403138, 1.99559412,
       0.59670013, 0.88072499, 0.42160989, 1.44385832, 1.46135164,
       0.90317124, 0.76365242, 1.20063367, 2.06488217, 1.99829592,
       0.51804285, 1.10507326, 1.34846737, 1.54245873, 0.43356322,
       0.904906  , 1.02578836, 0.51238861, 0.60453263, 1.45459489,
       0.49805611, 1.46175103, 1.27282537, 0.40925353, 1.10653513,
       1.14476617, 1.77278931, 0.78473256, 1.08410641, 1.7248877 ,
       0.36373523, 1.24883672, 0.91935812, 0.59874156, 0.82185032,
       0.26323959, 0.9517641 , 0.56905444, 2.12171499, 0.93435182,
       1.27147586, 0.85888851, 0.46184655, 1.21124009, 0.67245153,
       1.10664111, 0.66881408, 1.35817116, 1.68186966, 0.41744065,
       1.51703496, 0.77022524, 1.03609732, 0.88905968, 0.64756881,
       0.73596489, 1.11819396, 1.04198452, 0.94974058, 1.16170852,
       1.2390578 , 1.77951576, 0.87020892, 0.94245371, 0.41810811,
       0.70045432, 1.63990867, 0.10626666, 1.05498813, 0.74435857,
       0.9083958 , 0.80813325, 0.43220159, 0.95925742, 1.21179057,
       1.26939448, 0.36714021, 1.46787379, 0.87215569, 0.47267772,
       0.74178784, 0.43391062, 0.82365165, 1.61604144, 1.62370954,
       0.6077143 , 0.71135685, 0.82160071, 1.55384145, 1.31782241,
       1.00962794, 1.12005297, 0.83444403, 1.30839087, 0.83517678,
       1.29257859, 0.44616307, 2.55490932, 1.56566011, 0.65461182,
       1.06575738, 0.47136254, 0.82850852, 0.76137521, 0.90593377,
       1.1016716 , 0.98528648, 0.96839319, 1.46651279, 0.88202288,
       1.49847132, 0.40671733, 0.77175601, 1.16883555, 0.90403212,
       0.79092923, 0.66909176, 2.24693252, 1.000095  , 1.82187473,
       0.61002306, 1.30171873, 1.69916346, 1.27058818, 0.87078193,
       0.74305446, 1.49681355, 1.13809815, 1.20616907, 0.98299355,
       0.35488231, 0.92259889, 1.43998352, 1.17608404, 1.95979792,
       1.08834758, 1.01532336, 0.95537268, 1.35054995, 1.01947521,
       1.07828882, 1.15690796, 1.18995167, 0.86992935, 0.54526333,
       0.74234884, 1.71729523, 1.07721355, 0.3687355 , 1.09429866,
       0.75745562, 0.55433689, 1.11108141, 1.24439247, 0.71677704,
       0.68999281, 0.74836824, 0.42743708, 0.76810952, 0.82795692,
       1.28088793, 1.16868189, 1.25804936, 0.57964772, 0.69579053,
       0.3097184 , 0.9081541 , 2.24639399, 1.63615582, 2.14943049,
       1.14900312, 1.48084713, 1.57592685, 0.90779174, 0.91377759,
       0.89940159, 1.27843154, 0.74683958, 1.69076096, 1.17827986,
       0.84880834, 1.64125609, 0.56132672, 0.58866974, 1.58372578,
       0.99846233, 0.90455843, 0.26082429, 0.79119283, 1.05341342,
       0.88667165, 1.0150486 , 0.64817721, 1.17765925, 0.56462336,
       1.22415397, 0.9485248 , 0.828098  , 0.59047808, 1.46550681,
       0.82382739, 0.32006012, 0.87558184, 1.54136957, 1.30869399,
       1.05909868, 1.51253004, 0.88399644, 0.69475968, 2.1048436 ,
       0.83488814, 0.41153515, 0.7330947 , 0.65894565, 1.07516023,
       1.16864861, 1.4860542 , 0.48262617, 1.00555797, 1.6993725 ,
       1.84364266, 1.32731699, 1.31847346, 1.54233239, 0.34106531,
       1.66860448, 0.63621295, 0.70160923, 1.15725211, 0.71294846,
       0.95163575, 1.08806547, 0.75830814, 0.9379648 , 1.18119132,
       1.47311829, 0.50508006, 1.32261654, 0.39983341, 1.76978902,
       1.0323238 , 1.44229128, 1.26367829, 0.82823204, 0.66113878,
       1.42797016, 0.23863051, 2.81215017, 1.0859112 , 0.49545438,
       1.21955511, 0.61607381, 1.93308569, 1.11643536, 0.84791355,
       1.51295665, 0.63122541, 1.01559454, 1.07255171, 1.53368572,
       0.89661726, 0.34514285, 1.69624178, 1.86700352, 1.28285909,
       0.47109309, 1.33354885, 0.80203541, 0.56701941, 0.37776079,
       0.3804218 , 0.60409467, 1.03286759, 0.87830273, 1.44264858,
       0.75804906, 0.50944812, 0.4942734 , 0.97202785, 0.5644725 ,
       0.66491704, 1.0178108 , 0.61377638, 0.57253418, 0.97193811])