Predicting new data

Predicting new data#

In this section we are going to recognize the activity of two new individuals from which we have data regarding the signals, in the same conditions as before, but we haven’t the activity classes.

The point is to use the saved pre-trained pipeline to predict the activity of those new individuals based on their data about the signals.

First of all we load the pre-trained pipeline.

# Load the pipeline from file
with open(r'C:\Users\fscielzo\Documents\DataScience-GitHub\Human-Activity-Recognition\results\final_pipeline.pkl', 'rb') as file:
    loaded_pipeline = pickle.load(file)

Now we load the new data, process it a bit just to put it in a suitable format to be used by the pipeline, and, finally, we predict the activities for those signals using the pre-trained pipeline.

HAR_new_data = HAR_database['database_test']
n_new_individuals = len(HAR_new_data)
X_HAR_new = [HAR_new_data[i][0] for i in range(n_new_individuals)]
Y_new_hat = loaded_pipeline.predict(X=X_HAR_new)
Y_new_hat
array([3, 3, 3, ..., 3, 3, 3], dtype=uint8)

As before, activities are predicted for each second in which the signals were measured.

For example, the recognized activity in the first second of activity for the first new individual is 3: Standing, since Y_new_hat[0] == 3.

In the following code cell we collect certain information that will be used below, to present the recognized activities for the new individuals in a more elegant way.

blocks_size = loaded_pipeline.get_params()['features_extraction__blocks_size']
best_stats = loaded_pipeline.get_params()['features_extraction__statistics']
signals_block = loaded_pipeline.steps[0][1].signals_block
decoded_class_labels = {1: 'Running', 2: 'Walking', 3: 'Standing', 4: 'Sitting', 5: 'Lying'}
X_new, _,_ = get_X_features_HAR(X_HAR=X_HAR_new, blocks_size=blocks_size, statistics=best_stats)
new_individuals_idx = {}
for i in range(n_new_individuals):
    if i == 0:
        new_individuals_idx[i] = range(0, len(signals_block[i]))
    else:
        new_individuals_idx[i] = range(len(signals_block[i-1]), len(signals_block[i-1]) + len(signals_block[i]))
Y_new_hat_expanded = {}

for i in range(n_new_individuals):
    Y_new_hat_expanded[i] = []

    for j, r in enumerate(new_individuals_idx[i]):

        block_size = len(signals_block[i][j])
        time_secs = block_size/sampling_freq
        
        print('=========================================================================================================================')
        print(f' New Individual {i} - Block Number {j} - Block Size = {block_size} signals measurements - Block Time = {time_secs} seconds')
        print('=========================================================================================================================')
        print(f'\nINPUT --> Signals measurements:\n\n {signals_block[i][j]}\n\nPREPROCESSING (Features Extraction) --> Signals statistics ({best_stats}) for the block: \n\n {X_new[r]}\n\nOUTPUT (Recognized Activity) --> {decoded_class_labels[Y_new_hat[r]]}\n')
        
        # Here he expand the prediction for each bloch to each signal observation belonging to the block, in order to save them following the original format of the provided data.
        Y_new_hat_expanded[i].append(np.repeat(Y_new_hat[r], block_size))
    Y_new_hat_expanded[i] = np.concatenate(Y_new_hat_expanded[i])
=========================================================================================================================
 New Individual 0 - Block Number 0 - Block Size = 16 signals measurements - Block Time = 1.0 seconds
=========================================================================================================================

INPUT --> Signals measurements:

 [[-0.06516976  0.38268988 -0.2133753   0.18997728  0.13234735]
 [ 0.0188162   0.56415602  0.05981534  0.09126936  0.12937823]
 [ 0.02866381  0.53441247  0.10957474  0.06215636  0.15868741]
 [ 0.04405483  0.53172164  0.07782252  0.07026572  0.21301619]
 [ 0.07323893  0.33030948  0.04207259  0.10479012  0.25472851]
 [ 0.10348716  0.39947796  0.07482676  0.10607     0.24277312]
 [ 0.00382445  0.24056696  0.07427139  0.10105946  0.23303664]
 [-0.02644907  0.22729669  0.07213565  0.09636051  0.1450192 ]
 [ 0.00125242  0.17975689  0.05798641  0.09558193  0.11143713]
 [ 0.0887153   0.23176001  0.05140934  0.09096713  0.11414265]
 [ 0.09320141  0.14311734  0.03227439  0.09425283  0.11037175]
 [-0.00770817  0.20626431  0.01874265  0.09826403  0.08638627]
 [-0.0189568   0.18699118  0.00317415  0.10239344  0.06931742]
 [ 0.09620386  0.09242085 -0.00072207  0.10486445  0.07172898]
 [ 0.025798    0.13298362 -0.00270101  0.10720509  0.05703968]
 [ 0.00187846  0.13547957  0.00058527  0.10414203  0.05195844]]

PREPROCESSING (Features Extraction) --> Signals statistics (mean-median-std) for the block: 

 [0.02880319 0.2824628  0.0286183  0.10122623 0.13633556 0.0223071
 0.22952835 0.04674096 0.09966174 0.12176044 0.04859194 0.1506874
 0.07052091 0.02594961 0.0649858 ]

OUTPUT (Recognized Activity) --> Standing

=========================================================================================================================
 New Individual 0 - Block Number 1 - Block Size = 16 signals measurements - Block Time = 1.0 seconds
=========================================================================================================================

INPUT --> Signals measurements:

 [[ 0.07822253  0.21299422 -0.0011441   0.11126233  0.04826217]
 [ 0.04543221  0.25207318 -0.0012154   0.10402711  0.05718289]
 [-0.05370269  0.23917664 -0.00283067  0.09973757  0.05563816]
 [ 0.0082843   0.28679291 -0.00582791  0.10807546  0.053654  ]
 [ 0.07131597  0.30846983  0.0052691   0.10534019  0.07849775]
 [-0.00168616  0.28142032  0.00428668  0.10561629  0.06620189]
 [ 0.04566237  0.31789266 -0.00083285  0.11061433  0.05802735]
 [ 0.0087159   0.30301945 -0.0028673   0.1102779   0.05448369]
 [ 0.02124345  0.33206065 -0.00604193  0.11468804  0.06918671]
 [-0.02084701  0.39256987  0.00854859  0.11038107  0.06349866]
 [-0.06357525  0.32646551  0.01121332  0.11854085  0.04058297]
 [ 0.11133249  0.39876298  0.0064789   0.10701572  0.04557053]
 [ 0.05612203  0.41737773 -0.01098056  0.10447219  0.07345569]
 [-0.02591146  0.44740817  0.00811967  0.10293985  0.08541377]
 [-0.02673191  0.40071077  0.00154825  0.10383105  0.06254121]
 [ 0.11410522  0.41102887  0.01493504  0.10052187  0.0584256 ]]

PREPROCESSING (Features Extraction) --> Signals statistics (mean-median-std) for the block: 

 [0.02299887 0.33301398 0.00179118 0.10733386 0.06066394 0.01497968
 0.32217908 0.0003577  0.10631601 0.05822647 0.05291527 0.06850033
 0.00679033 0.00491307 0.01153968]

OUTPUT (Recognized Activity) --> Standing

=========================================================================================================================
 New Individual 0 - Block Number 2 - Block Size = 16 signals measurements - Block Time = 1.0 seconds
=========================================================================================================================

INPUT --> Signals measurements:

 [[ 0.04778877  0.48390299  0.01536225  0.08927573  0.07610216]
 [-0.00862728  0.42591055  0.01666294  0.09466854  0.0783439 ]
 [ 0.00332619  0.39371577  0.01699184  0.09773712  0.05262936]
 [ 0.02910045  0.41922215  0.01505755  0.09259787  0.03498327]
 [ 0.02782871  0.44356219  0.01512198  0.10510717  0.01036895]
 [-0.00082794  0.48349567  0.02425552  0.10406379  0.02165936]
 [ 0.03338541  0.46327954  0.00346781  0.11557792  0.06393324]
 [ 0.02524285  0.38173151  0.00856409  0.11370167  0.08144859]
 [ 0.06439862  0.47238916  0.03997783  0.08276327  0.06460615]
 [-0.02740109  0.43786911  0.01226558  0.0872837   0.0854358 ]
 [ 0.02861887  0.45196874  0.02238081  0.1098863   0.10246427]
 [ 0.02812908  0.42997001  0.0189658   0.10661932  0.11718231]
 [-0.00834373  0.36748554  0.01816767  0.09676115  0.11323331]
 [ 0.00397363  0.38667027  0.02460613  0.10597855  0.11602011]
 [-0.02464908  0.45326285  0.00820614  0.1075354   0.1095591 ]
 [ 0.14620165  0.43902184  0.02221119  0.10504964  0.09822822]]

PREPROCESSING (Features Extraction) --> Signals statistics (mean-median-std) for the block: 

 [0.02300907 0.43334112 0.01764157 0.10091294 0.07663738 0.02653578
 0.43844548 0.01682739 0.10455671 0.07989625 0.04019369 0.03482897
 0.00812925 0.00932702 0.03248714]

OUTPUT (Recognized Activity) --> Standing

...
...
...

=========================================================================================================================
 New Individual 0 - Block Number 59 - Block Size = 16 signals measurements - Block Time = 1.0 seconds
=========================================================================================================================

INPUT --> Signals measurements:

 [[-2.28260037e+00  6.19702108e+00  1.78860752e-02  1.11242208e-01
   1.08525649e-01]
 [-2.28962059e+00  6.17941111e+00  4.09508644e-02  7.47088261e-02
   8.04042306e-02]
 [-2.32547332e+00  6.45854210e+00  2.53976364e-02  8.25834606e-02
   5.98026245e-02]
 [-2.35060286e+00  6.32454438e+00 -2.24922907e-02  1.09600611e-01
   5.70599830e-02]
 [-2.29416337e+00  6.26870749e+00  1.68413750e-02  1.20072007e-01
   7.65656863e-02]
 [-2.23846409e+00  6.13132261e+00  3.24662172e-02  1.04301248e-01
   8.54639066e-02]
 [-2.24637379e+00  6.30068904e+00  3.74667356e-02  9.80247131e-02
   6.72340788e-02]
 [-2.23325748e+00  6.46033989e+00  4.18832000e-02  8.32161243e-02
   6.31504677e-02]
 [-2.38646624e+00  6.17376667e+00  1.59226561e-02  7.00459892e-02
   8.71173475e-02]
 [-2.25592385e+00  6.30867017e+00  3.02436426e-02  7.23731323e-02
   1.08698414e-01]
 [-2.39681587e+00  6.42058930e+00  2.76985572e-02  7.38676670e-02
   8.94875861e-02]
 [-2.35703308e+00  6.31123581e+00  1.48041829e-02  9.03541631e-02
   5.64331927e-02]
 [-2.37738044e+00  6.33773834e+00  1.18966275e-02  1.02832343e-01
   6.81331832e-02]
 [-2.27727583e+00  6.31095378e+00  4.35036436e-03  1.14569777e-01
   8.39630509e-02]
 [-2.37969593e+00  6.23354268e+00  1.53563604e-02  1.04151484e-01
   5.68268814e-02]
 [-2.32774979e+00  6.43938632e+00 -1.41010504e-02  1.37142863e-01
   3.32484988e-02]]

PREPROCESSING (Features Extraction) --> Signals statistics (mean-median-std) for the block: 

 [-2.31368106  6.3035288   0.0185357   0.09681791  0.07388217 -2.30981835
  6.30981197  0.01736373  0.10042853  0.07234943  0.05445592  0.10058985
  0.01749289  0.01897378  0.01942392]

OUTPUT (Recognized Activity) --> Sitting

=========================================================================================================================
 New Individual 0 - Block Number 60 - Block Size = 16 signals measurements - Block Time = 1.0 seconds
=========================================================================================================================

INPUT --> Signals measurements:

 [[-2.30534584e+00  6.30718387e+00 -2.68604323e-02  1.53833093e-01
   4.92161601e-02]
 [-2.25972823e+00  6.22086616e+00 -2.36429229e-02  1.54699368e-01
   3.90276910e-02]
 [-2.20573239e+00  6.17372435e+00  1.07463614e-02  1.32801156e-01
   4.73162179e-02]
 [-2.18689282e+00  6.23785376e+00  4.17367001e-02  1.01454547e-01
   6.50913160e-02]
 [-2.25326706e+00  6.24526488e+00  5.59098726e-02  1.14539833e-01
   6.54507350e-02]
 [-2.29440015e+00  6.23554030e+00  5.80987982e-02  7.90362639e-02
   5.37920779e-02]
 [-2.30106868e+00  6.26091466e+00  4.93633524e-02  9.67548737e-02
   5.19385316e-02]
 [-2.23245924e+00  6.32210019e+00  5.95476771e-02  8.63986098e-02
   5.27818188e-02]
 [-2.46030112e+00  6.33513660e+00  4.45454370e-02  7.86472389e-02
   6.47091952e-02]
 [-2.38278531e+00  6.36172351e+00 -2.12203205e-02  1.59150401e-01
   3.29387815e-02]
 [-2.21272754e+00  6.19756511e+00  2.86020701e-02  1.12243754e-01
   8.07910135e-02]
 [-2.27082042e+00  6.24800037e+00  5.28860781e-02  8.35630408e-02
   7.54125779e-02]
 [-2.34705909e+00  6.34145874e+00  4.28743889e-02  8.16058674e-02
   7.60058711e-02]
 [-2.33897291e+00  6.41292117e+00  1.56692736e-02  9.35784241e-02
   6.48964550e-02]
 [-2.34432958e+00  6.29141508e+00 -1.63619444e-03  1.02904398e-01
   5.92798444e-02]
 [-2.30815907e+00  6.28951828e+00  5.36837205e-03  1.08573940e-01
   7.12588782e-02]]

PREPROCESSING (Features Extraction) --> Signals statistics (mean-median-std) for the block: 

 [-2.29400309  6.28007419  0.02449928  0.10873655  0.0593692  -2.29773441
  6.27521647  0.03516939  0.10217947  0.06199452  0.06906326  0.06216448
  0.02977349  0.02672727  0.01311879]

OUTPUT (Recognized Activity) --> Sitting

...
...
...

=========================================================================================================================
 New Individual 1 - Block Number 1 - Block Size = 16 signals measurements - Block Time = 1.0 seconds
=========================================================================================================================

INPUT --> Signals measurements:

 [[ 1.49015985e-01  6.25462328e-01  1.27938275e-01 -2.06128599e-01
   1.08589651e-01]
 [ 1.78453582e-01  5.54469097e-01 -1.20610026e-01 -8.24080933e-02
   7.27283399e-03]
 [-1.33824501e-01  5.76240889e-01 -3.99418272e-02 -1.14318549e-01
   4.54782257e-02]
 [ 2.63926685e-03  4.78947140e-01 -3.54932743e-02 -1.43753799e-01
   6.68661772e-02]
 [-3.41714054e-02  4.63544001e-01 -4.27514870e-02 -1.07912333e-01
   3.85242732e-02]
 [-6.51483360e-03  4.95013138e-01 -4.82443935e-02 -1.16467601e-01
   4.37964831e-02]
 [-2.68100732e-02  4.65860782e-01 -6.61906305e-02 -1.08538076e-01
   1.64220506e-02]
 [-4.16333010e-02  4.32329012e-01 -8.32742439e-02 -1.03783222e-01
   2.33844945e-02]
 [-2.64351962e-02  4.16100167e-01 -9.59285599e-02 -7.84140752e-02
  -2.39937901e-02]
 [ 8.48043553e-03  5.62353793e-01 -4.55814398e-02 -1.00767464e-01
  -1.01985847e-02]
 [ 4.60716020e-02  6.08898047e-01 -7.38822278e-02 -7.46584122e-02
  -1.01951558e-02]
 [-3.17623157e-02  4.80367124e-01 -6.45652174e-02 -1.05561550e-01
   5.09265966e-03]
 [ 2.73892998e-02  5.20883416e-01 -5.45471867e-02 -9.83508851e-02
   1.74810862e-02]
 [ 2.77537785e-02  4.54044838e-01 -6.89263990e-02 -9.60092935e-02
  -3.61435911e-04]
 [ 1.37283422e-02  4.38031142e-01 -6.77213567e-02 -9.59174679e-02
   2.28721998e-02]
 [-1.34388401e-02  4.56645941e-01 -6.26149052e-02 -9.40668758e-02
   1.33490357e-02]]

PREPROCESSING (Features Extraction) --> Signals statistics (mean-median-std) for the block: 

 [ 0.00868386  0.50182443 -0.05264593 -0.10794102  0.02277376 -0.00193778
  0.47965713 -0.06359006 -0.10227534  0.01695157  0.07080554  0.06297231
  0.05125663  0.0299107   0.03174219]

OUTPUT (Recognized Activity) --> Standing

=========================================================================================================================
 New Individual 1 - Block Number 2 - Block Size = 16 signals measurements - Block Time = 1.0 seconds
=========================================================================================================================

INPUT --> Signals measurements:

 [[ 0.03200326  0.39199462 -0.07937056 -0.08255738  0.02944162]
 [ 0.0615302   0.42596383 -0.08545137 -0.06682359  0.03008667]
 [ 0.06988397  0.43066339 -0.12777255 -0.04889449  0.01497135]
 [-0.19379363  0.53975027 -0.08365007 -0.07602923  0.02498634]
 [-0.04025532  0.48246129 -0.02599475 -0.12118733  0.01197572]
 [-0.00444959  0.53620987 -0.04941255 -0.13871684  0.0027299 ]
 [-0.0316027   0.53651514 -0.06411493 -0.11149899 -0.00285924]
 [ 0.06897351  0.491657   -0.06525267 -0.11112671 -0.00486168]
 [ 0.03635293  0.54249719 -0.05041389 -0.10658647  0.02196124]
 [-0.00107888  0.49511685 -0.06887865 -0.09995228  0.03627677]
 [-0.01599631  0.45660556 -0.07351655 -0.09223558  0.03099632]
 [-0.0214132   0.49463079 -0.0686801  -0.09806654  0.04238008]
 [-0.06347804  0.50736366 -0.05413573 -0.12573633  0.03233877]
 [ 0.08797528  0.42845    -0.06887897 -0.09053895 -0.0431557 ]
 [-0.10436169  0.49481175 -0.00090886 -0.10655082 -0.05587816]
 [ 0.07616957  0.2314104  -0.02816534 -0.11419828 -0.08011093]]

PREPROCESSING (Features Extraction) --> Signals statistics (mean-median-std) for the block: 

 [-0.00272129  0.46788135 -0.06216235 -0.09941874  0.00570494 -0.00276423
  0.4931439  -0.06696638 -0.10325155  0.0184663   0.07289855  0.07547054
  0.02790699  0.02221147  0.03471842]

OUTPUT (Recognized Activity) --> Standing

...
...
...

=========================================================================================================================
 New Individual 1 - Block Number 1279 - Block Size = 16 signals measurements - Block Time = 1.0 seconds
=========================================================================================================================

INPUT --> Signals measurements:

 [[-9.7236797   9.78765055 -0.07826886 -0.09296181  0.02324681]
 [-9.71024741  9.78780103 -0.08664864 -0.09836944  0.02550504]
 [-9.71636867  9.78497737 -0.09017462 -0.09398053  0.0185009 ]
 [-9.74493013  9.76237183 -0.07982629 -0.09297332  0.0231035 ]
 [-9.71775349  9.76244408 -0.08836553 -0.09695421  0.02981121]
 [-9.7272314   9.81127016 -0.07738297 -0.10457155  0.02849129]
 [-9.67471676  9.79049724 -0.08205108 -0.09380148  0.02382906]
 [-9.74512381  9.78120827 -0.08782724 -0.08865106  0.02182622]
 [-9.73814035  9.7913648  -0.07957049 -0.094217    0.02260081]
 [-9.73652942  9.7789823  -0.08318082 -0.09491179  0.01888795]
 [-9.74123547  9.79765314 -0.08250326 -0.0942661   0.02984419]
 [-9.71603674  9.77976535 -0.08043434 -0.09989504  0.02592365]
 [-9.74828409  9.78561181 -0.07578871 -0.10300259  0.02604279]
 [-9.72661961  9.75888862 -0.07660528 -0.10082304  0.03151713]
 [-9.71966034  9.77536815 -0.08619835 -0.09632824  0.02101847]
 [-9.73171954  9.79222346 -0.07927821 -0.1035274   0.02352966]]

PREPROCESSING (Features Extraction) --> Signals statistics (mean-median-std) for the block: 

 [-9.72614231e+00  9.78300488e+00 -8.21315430e-02 -9.68271624e-02
  2.46049179e-02 -9.72692550e+00  9.78529459e+00 -8.12427074e-02
 -9.56200146e-02  2.36793608e-02  1.75517813e-02  1.32241770e-02
  4.36834370e-03  4.34430396e-03  3.72872720e-03]

OUTPUT (Recognized Activity) --> Lying

=========================================================================================================================
 New Individual 1 - Block Number 1280 - Block Size = 16 signals measurements - Block Time = 1.0 seconds
=========================================================================================================================

INPUT --> Signals measurements:

 [[-9.72452481  9.791431   -0.08153128 -0.0980363   0.0331189 ]
 [-9.73090227  9.78591682 -0.08123767 -0.09929803  0.02849485]
 [-9.73515962  9.80447441 -0.07396522 -0.10266531  0.02583939]
 [-9.67339756  9.7681223  -0.0779394  -0.09109059  0.01756051]
 [-9.7538064   9.79423185 -0.08265778 -0.09582852  0.01803676]
 [-9.7314615   9.79160866 -0.07242014 -0.10422434  0.02582745]
 [-9.73220698  9.78589767 -0.08785393 -0.10101906  0.02727601]
 [-9.74870293  9.80572515 -0.08128549 -0.09595485  0.02384868]
 [-9.7138149   9.78154173 -0.07537525 -0.10094235  0.02567777]
 [-9.74131755  9.78517082 -0.08488656 -0.10273061  0.02758194]
 [-9.72467397  9.77991673 -0.07497404 -0.10202905  0.02362676]
 [-9.72435314  9.77667271 -0.07676169 -0.09765588  0.02429773]
 [-9.72473248  9.79430621 -0.07405093 -0.09497057  0.02816375]
 [-9.72548542  9.78472375 -0.07841527 -0.09311879  0.02479505]
 [-9.72666993  9.79027435 -0.08678271 -0.09853237  0.0256788 ]
 [-9.75813978  9.78976336 -0.08034093 -0.08749788  0.04036686]]

PREPROCESSING (Features Extraction) --> Signals statistics (mean-median-std) for the block: 

 [-9.72933433e+00  9.78811110e+00 -7.94048925e-02 -9.78496562e-02
  2.62619509e-02 -9.72878610e+00  9.78784009e+00 -7.93780990e-02
 -9.82843392e-02  2.57531237e-02  1.85051914e-02  9.20274041e-03
  4.55362222e-03  4.46202076e-03  5.12673820e-03]

OUTPUT (Recognized Activity) --> Lying

Saving the predictions for the new data in the same format as the original data.

Our pipeline is able to predict the activity done by a human in each second of a given period of time during which their activity is recorded or monitored. Our model predicts the activity for block of signal observations with a temporal size of 1 second, what means 16 observations, since the signingl had a sample frequency of 16 Hz.

But the original data has a periodicity of micro-seconds, specifically of 1/16 seconds. So, in the original format of the data, both signal and activity observations have a periodicity of 1/16 seconds.

In order to set the ou ractivity predictions in the original format we have applied an expansion strategy, what means to extrapolate the block predictions to each signal observation belonging to the block. So that, if the predictions made by our pipeline for a block of signals is 3 (standing), the predictions for each signal observation of that block will be 3 (standing) as well.

The expanded prediction were collected in the above cell and save in the dictionary Y_new_hat_expanded.

Now we save the new data predictions in the original data format:

HAR_new_database = {'__header__': b'MATLAB 5.0 MAT-file, Platform: MACI64, Created on: Thu May 16 17:05:45 2024',
                    '__version__': '1.0',
                    '__globals__': [],}

HAR_new_database['database_test'] = np.array([np.array([HAR_database['database_test'][i][0], Y_new_hat_expanded[i]], dtype=object) for i in range(len(Y_new_hat_expanded))])

# Save the data to a MATLAB file
savemat(r'C:\Users\fscielzo\Documents\DataScience-GitHub\Human-Activity-Recognition\results\HAR_new_database.mat', HAR_new_database)
HAR_new_database
{'__header__': b'MATLAB 5.0 MAT-file, Platform: MACI64, Created on: Thu May 16 17:05:45 2024',
 '__version__': '1.0',
 '__globals__': [],
 'database_test': array([[array([[-0.06516976,  0.0188162 ,  0.02866381, ..., -0.65489655,
                 -0.50250338, -0.59326978],
                [ 0.38268988,  0.56415602,  0.53441247, ...,  3.26943227,
                  3.36463946,  3.41075882],
                [-0.2133753 ,  0.05981534,  0.10957474, ..., -0.04022603,
                 -0.03728265, -0.01322535],
                [ 0.18997728,  0.09126936,  0.06215636, ...,  0.11363941,
                  0.09155738,  0.10077387],
                [ 0.13234735,  0.12937823,  0.15868741, ...,  0.0875492 ,
                  0.0407315 ,  0.06236758]])                             ,
         array([3, 3, 3, ..., 4, 4, 4], dtype=uint8)],
        [array([[-8.41940561e-01, -3.53763629e-02, -3.64637935e-01, ...,
                 -4.72952179e-03, -1.60836501e-02,  3.36982094e-03],
                [ 1.22111782e+00,  1.60088113e+00,  1.29588646e+00, ...,
                  4.35754399e-01,  4.39480351e-01,  4.40240570e-01],
                [-1.21402476e-01, -1.10038144e-01,  8.88294268e-03, ...,
                 -9.24688287e-02, -8.35644004e-02, -8.25075701e-02],
                [-4.60425168e-03, -4.84477458e-02, -9.75501446e-02, ...,
                 -9.66818923e-02, -9.69218460e-02, -1.03798361e-01],
                [ 3.65603734e-02,  1.50398948e-03, -1.90331775e-02, ...,
                  5.09622920e-02,  4.32677086e-02,  4.06927248e-02]])   ,
         array([3, 3, 3, ..., 3, 3, 3], dtype=uint8)]], dtype=object)}