InferringIntention/keyboard_and_mouse/dataset/.ipynb_checkpoints/02-RandomForest-checkpoint.ipynb

853 lines
47 KiB
Text
Raw Permalink Normal View History

2024-03-24 23:42:27 +01:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "f5cb2ecf",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2021-09-28 16:10:28.497166: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1\n"
]
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import os, pdb\n",
"from sklearn.model_selection import GridSearchCV \n",
"from sklearn.ensemble import RandomForestClassifier\n",
"from sklearn.metrics import accuracy_score\n",
"from tensorflow import keras\n",
"from keras.preprocessing.sequence import pad_sequences"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "459ad77b",
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"study_data_path = \"../IntentData/\"\n",
"data = pd.read_pickle(study_data_path + \"/Preprocessing_data/clean_data.pkl\")\n",
"Task_IDs = np.arange(7).tolist()\n",
"StartIndexOffset = 0 #if set to 5 ignore first 5 elements\n",
"EndIndexOffset = 0 #if set to 5 ignore last 5 elements"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "4ab8c0cc",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array(['Cmd', 'Toolbar'], dtype=object)"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data.Rule.unique()\n",
"data.columns\n",
"data.Type.unique()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "05550387",
"metadata": {},
"outputs": [],
"source": [
"# grouping by part is needed to have one ruleset for the whole part\n",
"# Participant [1,16]\n",
"# Repeat for 5 times [1,5]\n",
"# ???????? [0,6]\n",
"g = data.groupby([\"PID\", \"Part\", \"TaskID\"])"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "7819da48",
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"param_grid = {'n_estimators': [10,50,100], \n",
" 'max_depth': [10,20,30]}\n",
"\n",
"grid = GridSearchCV(RandomForestClassifier(), param_grid, refit = True, verbose = 0, return_train_score=True) "
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "e64a6920",
"metadata": {},
"outputs": [],
"source": [
"def createTrainTest(test_IDs, task_IDs, start_index_offset, end_index_offset, shapes=False):\n",
" assert isinstance(test_IDs, list)\n",
" assert isinstance(task_IDs, list)\n",
" # Fill data arrays\n",
" y_train = []\n",
" x_train = []\n",
" y_test = []\n",
" x_test = []\n",
" for current in g.groups.keys():\n",
" c = g.get_group(current)\n",
" if (c.TaskID.isin(task_IDs).all()):\n",
" new_rule = c.Rule.unique()[0]\n",
" if end_index_offset == 0:\n",
" new_data = c.Event.values[start_index_offset:]\n",
" else:\n",
" new_data = c.Event.values[start_index_offset:-end_index_offset]\n",
" if (c.PID.isin(test_IDs).all()):\n",
" y_test.append(new_rule)\n",
" x_test.append(new_data)\n",
" else:\n",
" y_train.append(new_rule)\n",
" x_train.append(new_data)\n",
" x_train = np.array(x_train)\n",
" y_train = np.array(y_train)\n",
" x_test = np.array(x_test)\n",
" y_test = np.array(y_test)\n",
" print('x_train\\n',x_train)\n",
" print('y_train\\n',y_train)\n",
" print('x_test\\n',x_test)\n",
" print('y_test\\n',y_test)\n",
" pdb.set_trace()\n",
" if (shapes):\n",
" print(x_train.shape)\n",
" print(y_train.shape)\n",
" print(x_test.shape)\n",
" print(y_test.shape)\n",
" print(np.unique(y_test))\n",
" print(np.unique(y_train))\n",
" return (x_train, y_train, x_test, y_test)\n",
"\n",
"def runSVMS(train_test, maxlen=None, plots=False, last_elements=False):\n",
" x_train, y_train, x_test, y_test = train_test\n",
" # Get maxlen to pad and pad\n",
" if (maxlen==None):\n",
" maxlen = 0\n",
" for d in np.concatenate((x_train,x_test)):\n",
" if len(d) > maxlen:\n",
" maxlen = len(d)\n",
" \n",
" truncating_elements = \"post\"\n",
" if last_elements:\n",
" truncating_elements = \"pre\"\n",
"\n",
" x_train = keras.preprocessing.sequence.pad_sequences(x_train, maxlen=maxlen, dtype='int32', padding='post', truncating=truncating_elements, value=0)\n",
" x_test = keras.preprocessing.sequence.pad_sequences(x_test, maxlen=maxlen, dtype='int32', padding='post', truncating=truncating_elements, value=0)\n",
"\n",
" # fitting the model for grid search \n",
" grid.fit(x_train, y_train) \n",
"\n",
" # print how our model looks after hyper-parameter tuning\n",
" if (plots==True):\n",
" print(grid.best_estimator_) \n",
"\n",
" # Predict with best SVM\n",
" pred = grid.predict(x_test)\n",
"\n",
" return accuracy_score(pred, y_test), pred, y_test "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "50dac7db",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_97850/1264473745.py:23: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.\n",
" x_train = np.array(x_train)\n",
"/tmp/ipykernel_97850/1264473745.py:25: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.\n",
" x_test = np.array(x_test)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"x_train\n",
" [array([2, 7, 7, 7, 7, 7, 7, 2, 6, 6, 6, 2, 2, 2])\n",
" array([4, 1, 4, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7])\n",
" array([5, 7, 5, 7, 5, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1])\n",
" array([3, 3, 3, 3, 3, 3, 6, 6, 5, 5, 5, 5, 5, 5, 5])\n",
" array([5, 3, 5, 3, 3, 5, 3, 5, 3, 3, 4, 4, 4, 4, 4, 4])\n",
" array([2, 6, 2, 6, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 3, 2, 3, 2, 2, 2, 4, 4, 4, 4, 4, 4])\n",
" array([6, 6, 6, 2, 2, 2, 7, 7, 7, 7, 7, 7, 7])\n",
" array([1, 4, 4, 7, 4, 1, 1, 4, 4, 4, 7, 7, 7, 7, 7])\n",
" array([7, 5, 7, 1, 5, 7, 7, 5, 7, 7, 1, 1, 1, 1, 1])\n",
" array([3, 6, 3, 5, 3, 6, 3, 6, 3, 6, 3, 5, 5, 5, 5, 5])\n",
" array([3, 5, 3, 4, 3, 5, 3, 3, 3, 4, 4, 4, 4, 4])\n",
" array([2, 6, 2, 1, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1])\n",
" array([2, 3, 3, 4, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 6, 6, 2, 2, 7, 7, 7, 7, 7])\n",
" array([4, 1, 4, 7, 4, 1, 4, 1, 7, 7, 7, 7, 7, 4, 4])\n",
" array([5, 7, 7, 1, 5, 7, 7, 7, 7, 1, 1, 1, 1, 1])\n",
" array([3, 6, 3, 5, 3, 6, 3, 3, 3, 5, 5, 5, 5, 5])\n",
" array([5, 3, 3, 4, 3, 5, 3, 5, 3, 5, 3, 4, 4, 4, 4, 4])\n",
" array([2, 6, 2, 1, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 4, 2, 3, 2, 3, 2, 2, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 6, 6, 6, 2, 2, 7, 2, 7, 7, 7, 7, 7])\n",
" array([4, 1, 4, 7, 4, 1, 4, 4, 4, 7, 7, 7, 7, 7])\n",
" array([5, 7, 7, 1, 5, 7, 5, 7, 7, 7, 1, 1, 1, 1, 1])\n",
" array([3, 6, 3, 5, 2, 2, 6, 3, 3, 6, 3, 3, 4, 4, 4, 4, 4, 4])\n",
" array([5, 3, 3, 4, 3, 5, 3, 5, 3, 3, 3, 4, 4, 4, 4, 4])\n",
" array([2, 6, 2, 1, 1, 1, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 4, 2, 3, 2, 3, 2, 2, 3, 4, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 6, 6, 2, 2, 7, 7, 7, 7, 7])\n",
" array([4, 1, 4, 7, 4, 1, 4, 4, 4, 7, 7, 7, 7, 7])\n",
" array([7, 5, 7, 1, 7, 5, 7, 7, 7, 1, 1, 1, 1, 1])\n",
" array([3, 6, 3, 5, 3, 6, 6, 3, 6, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3])\n",
" array([3, 5, 3, 4, 3, 5, 3, 5, 3, 3, 4, 4, 4, 4, 4])\n",
" array([2, 6, 2, 1, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 4, 2, 3, 2, 3, 2, 2, 4, 4, 4, 4, 4])\n",
" array([2, 6, 2, 2, 6, 2, 2, 6, 2, 1, 1, 1, 1, 1, 1])\n",
" array([6, 2, 2, 2, 2, 6, 7, 7, 7, 7, 7, 7])\n",
" array([1, 4, 4, 7, 1, 4, 1, 4, 4, 4, 7, 7, 7, 7, 7])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 2, 3, 4, 4, 4, 4, 4])\n",
" array([3, 5, 3, 4, 3, 3, 5, 3, 5, 3, 5, 4, 4, 4, 4, 4])\n",
" array([3, 6, 3, 5, 3, 6, 3, 3, 3, 6, 5, 5, 5, 5, 5])\n",
" array([5, 7, 7, 1, 7, 7, 7, 7, 5, 1, 1, 1, 1, 1])\n",
" array([2, 6, 2, 1, 2, 6, 2, 6, 2, 2, 6, 1, 1, 1, 1, 1, 1, 1])\n",
" array([6, 2, 7, 2, 2, 2, 6, 7, 7, 7, 7, 7])\n",
" array([4, 1, 4, 7, 1, 4, 1, 4, 4, 4, 7, 7, 7, 7, 7])\n",
" array([3, 2, 2, 4, 2, 2, 3, 2, 2, 3, 4, 4, 4, 4, 4])\n",
" array([3, 5, 3, 4, 3, 3, 5, 3, 5, 3, 4, 4, 4, 4, 4])\n",
" array([3, 6, 3, 5, 3, 3, 3, 6, 3, 6, 5, 5, 5, 5, 5])\n",
" array([7, 5, 5, 5, 7, 1, 7, 7, 5, 7, 5, 7, 1, 1, 1, 1, 1, 1])\n",
" array([2, 6, 2, 1, 2, 2, 2, 6, 2, 1, 1, 1, 1, 1])\n",
" array([6, 2, 7, 2, 2, 6, 6, 7, 7, 7, 7, 7])\n",
" array([1, 4, 4, 7, 1, 4, 4, 4, 4, 7, 7, 7, 7, 7])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 2, 4, 4, 4, 4, 4])\n",
" array([3, 5, 3, 4, 3, 3, 3, 3, 5, 5, 4, 4, 4, 4, 4])\n",
" array([3, 6, 3, 5, 3, 6, 3, 3, 6, 3, 5, 5, 5, 5, 5])\n",
" array([5, 7, 7, 1, 5, 7, 7, 7, 5, 7, 5, 1, 1, 1, 1, 1])\n",
" array([2, 6, 2, 1, 2, 2, 2, 6, 2, 2, 6, 1, 1, 1, 1, 1])\n",
" array([6, 2, 7, 2, 2, 2, 2, 6, 6, 7, 7, 7, 7, 7])\n",
" array([1, 4, 4, 7, 4, 4, 4, 4, 1, 1, 7, 7, 7, 7, 7])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 2, 4, 4, 4, 4, 4])\n",
" array([3, 5, 3, 4, 3, 5, 3, 3, 3, 3, 3, 5, 3, 5, 4, 4, 4, 4, 4])\n",
" array([3, 6, 3, 5, 3, 3, 6, 3, 3, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 1, 7, 7, 7, 5, 7, 5, 1, 1, 1, 1, 1])\n",
" array([2, 6, 2, 1, 2, 2, 2, 2, 6, 6, 6, 1, 1, 1, 1, 1])\n",
" array([6, 2, 7, 2, 2, 6, 6, 7, 7, 7, 7, 7])\n",
" array([1, 4, 4, 7, 1, 4, 1, 4, 4, 4, 7, 7, 7, 7, 7])\n",
" array([2, 3, 2, 4, 2, 2, 3, 2, 2, 3, 4, 4, 4, 4, 4])\n",
" array([3, 5, 3, 4, 3, 5, 3, 3, 3, 5, 3, 4, 4, 4, 4, 4, 4, 4, 4])\n",
" array([3, 6, 3, 5, 3, 6, 3, 3, 6, 3, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 1, 7, 7, 5, 5, 7, 7, 1, 1, 1, 1, 1])\n",
" array([3, 5, 3, 4, 4, 4, 3, 5, 3, 5, 5, 3, 3])\n",
" array([6, 3, 5, 5, 5, 5, 5, 5, 6, 3, 6, 3, 3, 3, 3])\n",
" array([2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 2, 3, 2, 2, 2, 3])\n",
" array([1, 7, 1, 7, 7, 7, 7, 7])\n",
" array([2, 6, 2, 1, 1, 1, 6, 2, 1, 2, 6, 1, 2, 1])\n",
" array([6, 2, 7, 2, 2, 6, 6, 7, 7, 7, 7, 7])\n",
" array([7, 5, 7, 1, 7, 7, 1, 1, 1, 1, 1, 1, 5, 7, 5, 7])\n",
" array([3, 3, 5, 3, 3, 5, 3, 3, 3, 3, 5])\n",
" array([2, 3, 3, 5, 3, 3, 3, 3, 2]) array([2, 3, 2, 2, 2, 2, 2, 3])\n",
" array([1, 7, 1, 1, 7, 7, 7, 7, 7])\n",
" array([2, 6, 2, 1, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1])\n",
" array([6, 2, 6, 7, 7, 2, 2, 2, 6, 7, 7, 7, 7, 7])\n",
" array([7, 5, 7, 1, 5, 7, 7, 5, 7, 7, 1, 1, 1, 1, 1])\n",
" array([5, 3, 3, 3, 5, 3, 5, 3, 5, 3])\n",
" array([6, 3, 3, 5, 6, 3, 3, 6, 3, 6, 3, 5, 5, 5, 5, 5])\n",
" array([2, 3, 2, 2, 2, 3, 2, 3, 2]) array([1, 7, 1, 1, 7, 7, 7, 7, 7])\n",
" array([2, 6, 2, 1, 2, 2, 2, 2, 6, 1, 1, 1, 1, 1])\n",
" array([6, 2, 7, 7, 7, 2, 2, 7, 6, 7, 7, 2])\n",
" array([5, 7, 7, 1, 1, 7, 5, 7, 1, 1, 7, 1, 7, 1])\n",
" array([3, 5, 3, 3, 5, 3, 5, 3, 5, 3])\n",
" array([3, 6, 3, 5, 3, 6, 6, 3, 3, 6, 3, 6, 5, 5, 5, 5, 5, 6, 6, 6])\n",
" array([2, 2, 3, 2, 2, 3, 2, 2, 3]) array([1, 7, 7, 1, 7, 7, 7, 7, 1])\n",
" array([2, 6, 2, 1, 2, 6, 2, 6, 2, 6, 2, 1, 1, 1, 1, 1])\n",
" array([6, 2, 7, 6, 6, 2, 2, 2, 2, 7, 7, 4, 7, 7, 7])\n",
" array([7, 7, 5, 1, 7, 5, 7, 5, 7, 7, 1, 1, 1, 1, 1, 7])\n",
" array([3, 5, 3, 5, 3, 3, 5, 3, 3])\n",
" array([3, 6, 3, 5, 3, 3, 3, 6, 3, 5, 5, 5, 5, 5])\n",
" array([2, 3, 2, 2, 2, 2, 2, 3]) array([1, 7, 1, 1, 7, 7, 7, 7, 7])\n",
" array([2, 6, 2, 1, 1, 1, 1, 1, 1, 1, 2, 6, 6, 2, 2, 6, 2])\n",
" array([6, 2, 7, 6, 6, 6, 6, 2, 7, 7, 7, 7, 7])\n",
" array([7, 5, 7, 1, 1, 1, 1, 1, 1, 7, 7, 5, 7, 5, 7, 5])\n",
" array([2, 3, 2, 4, 2, 3, 2, 3, 2, 2, 4, 4, 4, 4, 4])\n",
" array([4, 1, 4, 4, 4, 4, 4, 7, 4, 1, 4, 1, 4, 1, 4, 7, 7, 7, 7, 7])\n",
" array([7, 5, 7, 1, 1, 1, 1, 1, 1, 5, 7, 5, 7, 7, 7])\n",
" array([6, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 6])\n",
" array([4, 5, 3, 3, 3, 3, 3, 3, 3, 5, 3, 4, 4, 4, 4, 4])\n",
" array([6, 6, 2, 7, 7, 7, 7, 7, 7, 6, 2, 2, 2])\n",
" array([6, 3, 3, 5, 5, 5, 5, 5, 5, 3, 6, 3, 3, 6, 3])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 3, 2, 4, 4, 4, 4, 4])\n",
" array([4, 1, 4, 7, 4, 4, 4, 1, 4, 1, 7, 7, 7, 7, 7])\n",
" array([1, 5, 7, 7, 1, 7, 7, 7, 7, 5, 5])\n",
" array([6, 2, 2, 1, 1, 2, 1, 2, 6, 1, 2, 1, 2, 6, 1])\n",
" array([5, 4, 3, 4, 5, 3, 4, 3, 4, 3, 4, 5, 3, 4])\n",
" array([6, 2, 7, 7, 6, 7, 2, 6, 7, 7, 6, 7])\n",
" array([6, 3, 3, 5, 5, 1, 1, 3, 5, 6, 3, 5, 6, 3, 5, 6, 3])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 2, 4, 4, 4, 4, 4])\n",
" array([4, 1, 4, 7, 7, 4, 1, 7, 4, 7, 4, 1, 4, 1, 7, 7])\n",
" array([7, 4, 5, 7, 1, 1, 7, 1, 7, 5, 5, 7, 2, 7, 7, 7])\n",
" array([6, 2, 2, 1, 2, 1, 2, 6, 6, 2, 6, 2, 1, 1, 1])\n",
" array([5, 3, 3, 4, 3, 4, 4, 3, 4, 5, 3, 4, 4, 3])\n",
" array([6, 2, 7, 7, 2, 7, 7, 6, 2, 2, 7, 7])\n",
" array([1, 3, 1, 6, 3, 3, 5, 3, 5, 5, 6, 3, 5, 3, 5, 5, 3])\n",
" array([2, 3, 4, 3, 4, 2, 3, 2, 3, 4, 4, 2, 3, 3, 4, 3, 3, 4, 3, 2, 3, 2])\n",
" array([4, 1, 4, 7, 7, 4, 1, 4, 7, 7, 4, 7, 4, 1, 7])\n",
" array([7, 5, 7, 1, 1, 7, 5, 1, 7, 7, 7, 1, 1, 1, 7, 5])\n",
" array([6, 2, 2, 1, 1, 1, 1, 1, 1, 2, 6, 2, 2, 2])\n",
" array([5, 3, 3, 4, 3, 5, 3, 5, 3, 3, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 2, 2, 6, 6, 7, 7, 7, 7, 7])\n",
" array([6, 3, 3, 5, 3, 6, 6, 3, 3, 3, 5, 5, 5, 5, 5])\n",
" array([2, 3, 2, 4, 2, 2, 2, 3, 2, 3, 4, 4, 4, 4, 4])\n",
" array([4, 1, 4, 7, 7, 7, 7, 7, 7, 4, 1, 4, 4, 1, 4, 1])\n",
" array([7, 5, 7, 1, 1, 7, 5, 1, 7, 7, 5, 1, 1, 1, 7])\n",
" array([6, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 6, 1])\n",
" array([5, 3, 3, 4, 3, 3, 3, 3, 5, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 2, 2, 6, 6, 7, 7, 7, 7, 7])\n",
" array([6, 3, 3, 5, 5, 3, 6, 3, 5, 5, 6, 3, 5, 5, 3, 5, 5])\n",
" array([6, 2, 7, 7, 7, 7, 7, 7, 6, 6, 2, 2])\n",
" array([5, 3, 4, 3, 3, 3, 3, 3, 5, 4, 4, 4, 4, 4])\n",
" array([5, 7, 1, 7, 1, 3, 1, 1, 3, 1, 1, 1, 1, 7, 7, 7, 7, 5, 5])\n",
" array([1, 7, 4, 4, 1, 1, 7, 7, 7, 7, 7, 4, 4, 4, 1, 4])\n",
" array([6, 2, 1, 2, 2, 2, 2, 2, 6, 6])\n",
" array([6, 3, 5, 5, 6, 6, 6, 6, 6, 3, 3, 5, 5, 5, 5, 5])\n",
" array([2, 3, 2, 4, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 2, 2, 2, 6, 7, 7, 7, 7, 7])\n",
" array([3, 5, 4, 3, 3, 3, 3, 3, 5, 3, 5, 4, 4, 4, 4, 4])\n",
" array([7, 5, 7, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 5, 5, 5, 5])\n",
" array([1, 4, 7, 4, 7, 7, 7, 7, 7, 1, 1])\n",
" array([6, 2, 2, 1, 2, 2, 2, 2, 6, 6, 1, 1, 1, 1, 1])\n",
" array([6, 3, 3, 5, 3, 6, 6, 3, 3, 3, 6])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 2, 4, 4, 4, 4, 4])\n",
" array([6, 7, 2, 2, 2, 6, 6, 7, 7, 7, 7, 7])\n",
" array([3, 5, 3, 4, 3, 3, 3, 3, 5, 5, 4, 4, 4, 4, 4])\n",
" array([7, 5, 7, 1, 7, 5, 7, 7, 7, 5, 1, 1, 1, 1, 1])\n",
" array([1, 4, 4, 7, 4, 4, 4, 4, 7, 7, 7, 7, 7, 1, 1, 1])\n",
" array([2, 6, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 6, 6])\n",
" array([3, 6, 3, 5, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 6])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 3, 2, 4, 4, 4, 4, 4])\n",
" array([2, 2, 6, 2, 7, 6, 2, 2, 6, 2, 2, 7, 7, 7, 7, 7, 7])\n",
" array([5, 3, 3, 4, 3, 3, 5, 5, 3, 3, 5, 4, 4, 4, 4, 4])\n",
" array([7, 5, 1, 7, 2, 2, 3, 7, 7, 7, 7, 5, 1, 1, 1, 1, 1])\n",
" array([1, 4, 4, 7, 1, 4, 7, 7, 7, 7, 7, 4, 1, 1, 4, 4])\n",
" array([6, 2, 2, 1, 2, 2, 2, 2, 6, 6, 1, 1, 1, 1, 1])\n",
" array([3, 6, 5, 3, 3, 3, 3, 3, 6, 5, 5, 5, 5, 5])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 3, 2, 3, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 2, 2, 2, 6, 7, 7, 7, 7, 7])\n",
" array([5, 3, 3, 4, 3, 3, 3, 3, 5, 5, 4, 4, 4, 4, 4])\n",
" array([7, 5, 7, 1, 1, 1, 1, 1, 1, 5, 5, 7, 4, 7, 7, 7])\n",
" array([4, 1, 4, 7, 7, 7, 7, 7, 7, 4, 1, 4, 1, 4, 4])\n",
" array([6, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 6, 6])\n",
" array([6, 3, 3, 5, 3, 3, 3, 3, 6, 5, 5, 5, 5, 5])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 3, 2, 4, 4, 4, 4, 4])\n",
" array([3, 5, 4, 3, 3, 5, 5, 3, 3, 5, 3, 5, 4, 4, 4, 4, 4, 4])\n",
" array([2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 4, 4, 4, 4, 4, 4])\n",
" array([2, 3, 3, 2, 3, 3, 2, 3, 3])\n",
" array([2, 6, 2, 2, 2, 6, 2, 6, 2, 1, 1, 1, 1, 1, 1])\n",
" array([1, 4, 4, 1, 4, 1, 4, 4, 4, 7, 7, 7, 7, 7, 7])\n",
" array([7, 5, 1, 7, 1, 7, 5, 1, 7, 1, 7, 1, 7, 5, 1])\n",
" array([2, 2, 2, 2, 7, 7, 7, 7, 7, 7, 2, 2, 7, 2, 6, 2, 6, 6, 2, 2, 6])\n",
" array([5, 3, 5, 3, 3, 3, 5, 3, 3, 5, 4, 4, 4, 4, 4, 4])\n",
" array([3, 2, 4, 3, 3, 2, 4, 2, 4, 4, 2, 2, 3, 4, 4, 2, 3, 4])\n",
" array([2, 3, 3, 3, 4, 2, 3, 4, 3, 4, 2, 3, 4])\n",
" array([6, 2, 1, 2, 1, 2, 6, 1, 2, 6, 1, 2, 1, 2, 6, 1])\n",
" array([4, 1, 7, 4, 1, 1, 7, 1, 4, 7, 4, 7, 4, 7, 1, 4, 7])\n",
" array([7, 5, 1, 7, 1, 7, 7, 1, 7, 5, 1, 7, 5, 1, 7, 1])\n",
" array([6, 7, 2, 7, 2, 7, 6, 7, 2, 2, 2, 2, 7, 6])\n",
" array([3, 5, 4, 3, 4, 4, 3, 5, 4, 3, 5, 4, 3, 4, 3, 4])\n",
" array([2, 3, 4, 2, 4, 2, 3, 4, 2, 4, 2, 4, 2, 3, 4])\n",
" array([6, 3, 3, 4, 3, 4, 6, 3, 4, 3, 4, 4, 3])\n",
" array([2, 6, 1, 2, 1, 2, 6, 1, 2, 1, 2, 6, 1, 2, 1, 2])\n",
" array([1, 4, 7, 4, 7, 1, 4, 7, 1, 4, 7, 4, 7, 7, 1, 4])\n",
" array([7, 4, 5, 1, 7, 7, 1, 7, 7, 1, 7, 5, 1, 7, 1, 7, 1])\n",
" array([6, 7, 2, 7, 6, 7, 2, 7, 2, 7, 6, 7])\n",
" array([3, 5, 3, 3, 3, 3, 3, 5, 4, 4, 4, 4, 4, 4])\n",
" array([2, 3, 2, 2, 2, 2, 3, 4, 4, 4, 4, 2, 4, 4])\n",
" array([2, 3, 3, 2, 3, 2, 3, 2, 3, 3, 4, 4, 2, 6, 2, 6, 2, 6, 2, 6])\n",
" array([2, 6, 1, 2, 1, 2, 1, 2, 2, 6, 1, 1, 1, 1, 2, 1])\n",
" array([4, 1, 7, 1, 7, 1, 7, 1, 4, 7, 1, 4, 7, 1, 7, 7])\n",
" array([7, 5, 1, 7, 1, 7, 5, 1, 7, 1, 7, 5, 1, 7, 5, 1])\n",
" array([6, 7, 2, 7, 6, 7, 6, 7, 6, 7, 2, 7])\n",
" array([3, 5, 3, 3, 3, 5, 3, 3, 4, 4, 4, 4, 4, 4])\n",
" array([2, 3, 2, 2, 2, 3, 2, 2, 3, 4, 4, 4, 4, 4, 4])\n",
" array([6, 3, 3, 5, 5, 5, 5, 3, 5, 3, 5, 3, 6, 5, 3, 6, 5])\n",
" array([2, 6, 1, 2, 1, 2, 6, 1, 2, 1, 2, 2, 2, 1, 2, 1])\n",
" array([1, 4, 7, 4, 7, 1, 4, 7, 4, 7, 1, 4, 7, 4, 7])\n",
" array([7, 5, 1, 7, 1, 7, 5, 1, 7, 1, 7, 1, 7, 5])\n",
" array([6, 6, 7, 2, 7, 6, 7, 6, 7, 6, 7, 2, 7])\n",
" array([2, 3, 2, 6, 3, 5, 5, 3, 6, 3, 6, 3, 6, 3, 5, 5, 5, 5])\n",
" array([3, 5, 3, 4, 3, 5, 3, 3, 3, 4, 4, 4, 4, 4])\n",
" array([2, 6, 2, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, 6, 2])\n",
" array([2, 3, 3, 4, 2, 3, 3, 3, 2, 2, 2, 4, 4, 4, 4, 4, 2, 3, 3, 2, 3, 2])\n",
" array([4, 4, 1, 7, 4, 4, 4, 4, 1, 1, 1, 7, 7, 7, 7, 7])\n",
" array([6, 2, 7, 2, 2, 2, 6, 7, 7, 7, 7, 7])\n",
" array([7, 5, 7, 1, 7, 7, 7, 5, 7, 5, 1, 1, 1, 1, 1])\n",
" array([6, 3, 3, 5, 3, 3, 6, 3, 3, 6, 5, 5, 5, 5, 5])\n",
" array([5, 3, 3, 4, 4, 4, 4, 4, 4, 3, 5, 3, 3, 3, 5])\n",
" array([6, 2, 2, 1, 2, 6, 2, 2, 6, 6, 2, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 3, 2, 3, 4, 4, 4, 4, 4])\n",
" array([4, 1, 4, 7, 4, 1, 1, 4, 4, 4, 7, 7, 7, 7, 7])\n",
" array([6, 2, 7, 2, 6, 6, 2, 7, 7, 7, 7, 7])\n",
" array([7, 5, 7, 1, 7, 7, 7, 5, 7, 5, 1, 1, 1, 1, 1])\n",
" array([2, 3, 3, 5, 2, 2, 3, 6, 3, 3, 2, 6, 6, 3, 3, 3, 6, 5, 5, 5, 5, 5])\n",
" array([5, 3, 3, 4, 3, 5, 3, 5, 3, 5, 3, 4, 4, 4, 4, 4])\n",
" array([2, 6, 2, 1, 2, 2, 2, 6, 2, 1, 1, 1, 1, 1])\n",
" array([2, 2, 2, 3, 2, 4, 2, 3, 2, 2, 2, 3, 2, 4, 4, 4, 4, 4])\n",
" array([4, 1, 4, 7, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 1])\n",
" array([6, 2, 7, 6, 6, 2, 2, 7, 7, 7, 7, 7])\n",
" array([7, 5, 7, 1, 1, 7, 1, 7, 5, 1, 7, 1, 7, 1])\n",
" array([6, 3, 3, 5, 3, 6, 5, 5, 3, 6, 5, 3, 5, 3, 5])\n",
" array([3, 5, 3, 4, 3, 3, 5, 3, 3, 5, 4, 4, 4, 4, 4])\n",
" array([2, 6, 2, 1, 2, 2, 6, 2, 6, 2, 2, 6, 3, 3, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 4, 2, 3, 4, 4, 2, 3, 4, 2, 3, 3, 4, 2, 3, 4])\n",
" array([3, 3, 1, 4, 4, 7, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7])\n",
" array([6, 2, 7, 2, 2, 7, 7, 6, 6, 7, 7, 7, 7, 7])\n",
" array([7, 5, 7, 1, 7, 7, 5, 5, 5, 7, 7, 5, 1, 1, 1, 1, 1])\n",
" array([3, 6, 3, 5, 5, 3, 5, 5, 3, 6, 5, 3, 5, 3, 6, 5])\n",
" array([5, 3, 3, 3, 4, 4, 3, 5, 4, 3, 4, 3, 5, 4])\n",
" array([6, 2, 2, 1, 2, 2, 6, 2, 6, 2, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 4, 2, 2, 3, 2, 3, 2, 4, 4, 4, 4, 4])\n",
" array([1, 4, 4, 7, 1, 4, 1, 4, 1, 4, 4, 7, 7, 7, 7, 7])\n",
" array([6, 2, 7, 7, 2, 7, 2, 7, 6, 7, 6, 7, 7, 6])\n",
" array([7, 5, 7, 1, 7, 1, 1, 7, 1, 7, 5, 1, 7, 5, 1])\n",
" array([7, 5, 1, 7, 2, 2, 5, 5, 5, 5, 5, 2, 2, 2, 2, 1, 5, 5, 5, 5, 2, 7,\n",
" 2, 7, 1, 1, 1, 1])\n",
" array([2, 3, 2, 4, 4, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 2])\n",
" array([2, 6, 2, 1, 2, 2, 2, 2, 6, 6, 1, 1, 1, 1, 1])\n",
" array([3, 5, 4, 3, 4, 3, 5, 4, 3, 3, 4, 3, 5, 4, 4, 3, 3, 5, 4])\n",
" array([2, 6, 7, 2, 7, 2, 2, 2, 6, 7, 2, 6, 7, 2, 7, 2, 6, 7])\n",
" array([2, 3, 5, 3, 3, 5, 2, 3, 5, 2, 3, 3, 5, 3, 4, 5, 2, 3, 5])\n",
" array([1, 4, 7, 4, 7, 4, 1, 7, 4, 7, 1, 4, 7, 4, 7])\n",
" array([5, 7, 1, 7, 1, 5, 7, 1, 7, 5, 1, 7, 1, 7, 1])\n",
" array([2, 3, 1, 2, 1, 2, 1, 2, 1, 3, 2, 3, 1])\n",
" array([2, 6, 1, 6, 1, 6, 1, 2, 6, 1, 2, 6, 1, 6, 1])\n",
" array([5, 3, 4, 3, 3, 3, 4, 3, 4, 3, 4, 4, 3, 5, 4, 3, 5, 4])\n",
" array([6, 7, 2, 7, 2, 7, 6, 7, 6, 7, 2, 7])\n",
" array([2, 3, 5, 3, 5, 3, 5, 3, 5, 6, 3, 2, 6, 5, 5, 3])\n",
" array([1, 4, 7, 4, 7, 4, 1, 7, 1, 4, 7, 4, 7, 4, 7])\n",
" array([5, 7, 1, 7, 1, 5, 7, 1, 7, 5, 1, 7, 1, 1, 5, 7])\n",
" array([3, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 3, 4])\n",
" array([2, 6, 1, 2, 1, 2, 6, 1, 2, 6, 1, 2, 6, 1, 2, 1])\n",
" array([3, 5, 4, 5, 4, 5, 4, 5, 4, 5, 3, 4, 4, 5])\n",
" array([7, 2, 6, 7, 7, 2, 2, 6, 7, 2, 7, 2, 7, 6, 7])\n",
" array([6, 3, 5, 3, 5, 6, 5, 5, 3, 5, 3, 5, 5, 5, 3, 3, 5, 3, 5])\n",
" array([1, 4, 7, 4, 7, 4, 1, 7, 4, 1, 7, 4, 7, 4, 1, 7])\n",
" array([5, 7, 1, 7, 1, 7, 1, 5, 7, 1, 5, 7, 1, 7, 1])\n",
" array([3, 2, 4, 2, 4, 4, 2, 4, 2, 3, 4, 2, 3, 4, 4, 2, 3])\n",
" array([2, 6, 1, 2, 1, 2, 6, 1, 2, 6, 1, 2, 1, 2, 1])\n",
" array([5, 3, 5, 5, 4, 3, 4, 3, 4, 3, 5, 4, 3, 5, 4, 4, 3, 5])\n",
" array([3, 6, 3, 7, 2, 7, 6, 7, 2, 7, 6, 2, 6, 7])\n",
" array([6, 3, 5, 3, 5, 6, 3, 5, 5, 3, 5, 6, 3, 5, 5, 3, 6])\n",
" array([1, 4, 7, 4, 7, 4, 1, 7, 4, 1, 7, 4, 7, 4, 7])\n",
" array([5, 7, 1, 7, 1, 7, 1, 7, 7, 1, 5, 7, 1, 5, 7, 1])\n",
" array([3, 2, 4, 2, 4, 3, 2, 4, 2, 4, 3, 2, 4, 2, 4])\n",
" array([2, 6, 1, 2, 1, 2, 6, 1, 2, 6, 1, 2, 1, 2, 6, 1])\n",
" array([5, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 4])\n",
" array([6, 7, 2, 7, 2, 6, 2, 6, 2, 2, 5, 7, 6, 7, 2, 7, 2, 7])\n",
" array([6, 3, 5, 3, 5, 3, 6, 5, 5, 3, 5, 3, 6, 5, 6, 3, 5])\n",
" array([1, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 1, 4, 7])\n",
" array([7, 5, 5, 7, 5, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1])\n",
" array([5, 5, 5, 3, 3, 3, 3, 3, 3, 3])\n",
" array([7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 2, 2])\n",
" array([2, 3, 2, 3, 2, 3, 2, 2, 2])\n",
" array([1, 1, 1, 4, 1, 4, 4, 4, 7, 7, 7, 7, 7, 7])\n",
" array([2, 6, 2, 6, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1, 1])\n",
" array([3, 6, 3, 6, 3, 6, 3, 3, 3, 5, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 5, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1])\n",
" array([5, 3, 5, 3, 3, 3, 3, 3, 4, 4, 4, 4])\n",
" array([6, 6, 2, 2, 2, 2, 7, 7, 7, 7, 7, 7])\n",
" array([2, 3, 2, 3, 2, 3, 2, 3, 2, 2, 4, 4, 4, 4, 4, 4])\n",
" array([1, 4, 1, 4, 1, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7])\n",
" array([6, 2, 6, 2, 6, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1])\n",
" array([6, 3, 6, 3, 6, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 5, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1])\n",
" array([5, 3, 5, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4])\n",
" array([6, 6, 6, 6, 2, 2, 2, 7, 7, 7, 7, 7, 7])\n",
" array([2, 3, 2, 3, 2, 3, 2, 2, 2, 4, 4, 4, 4, 4, 4])\n",
" array([1, 1, 1, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7])\n",
" array([6, 2, 2, 6, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1, 1])\n",
" array([3, 6, 3, 6, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5])\n",
" array([5, 7, 5, 7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1])\n",
" array([5, 3, 3, 5, 3, 5, 3, 3, 3, 4, 4, 4, 4, 4, 4])\n",
" array([6, 6, 6, 6, 2, 2, 7, 7, 7, 7, 7, 7, 7])\n",
" array([2, 3, 3, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4])\n",
" array([1, 1, 1, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7])\n",
" array([2, 2, 2, 2, 2, 2, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1])\n",
" array([3, 3, 3, 3, 3, 3, 6, 6, 7, 5, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 5, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1])\n",
" array([5, 3, 3, 3, 5, 3, 3, 5, 3, 5, 4, 4, 4, 4, 4, 4])\n",
" array([6, 6, 6, 6, 2, 2, 7, 7, 7, 7, 7, 7])\n",
" array([2, 3, 2, 2, 3, 2, 2, 3, 2, 4, 4, 4, 4, 4, 4])\n",
" array([4, 4, 4, 4, 4, 4, 1, 1, 7, 7, 7, 7, 7, 7])\n",
" array([2, 2, 2, 2, 2, 2, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1])\n",
" array([5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6])\n",
" array([7, 5, 7, 1, 1, 7, 7, 7, 7, 5, 1, 1, 1, 1])\n",
" array([2, 6, 1, 2, 1, 2, 1, 2, 6, 2, 6, 1, 1, 1, 2])\n",
" array([6, 2, 7, 7, 2, 6, 2, 2, 7, 7, 7, 7, 2, 6])\n",
" array([5, 3, 3, 4, 4, 3, 4, 3, 3, 4, 3, 5, 4, 3, 5, 4])\n",
" array([2, 3, 2, 4, 2, 3, 2, 3, 2, 2, 4, 4, 4, 4, 4])\n",
" array([3, 6, 3, 5, 3, 3, 6, 3, 6, 3, 6, 5, 5, 5, 5, 5])\n",
" array([4, 1, 4, 7, 7, 4, 7, 4, 7, 1, 4, 7, 4, 6, 6, 7, 6])\n",
" array([7, 5, 7, 1, 1, 7, 5, 1, 7, 1, 7, 5, 1, 7, 1, 5])\n",
" array([2, 6, 2, 1, 1, 2, 1, 2, 1, 2, 6, 1, 2, 6, 1])\n",
" array([6, 2, 7, 7, 6, 7, 2, 7, 6, 7, 2, 7])\n",
" array([5, 3, 3, 4, 4, 3, 5, 3, 3, 5, 3, 4, 4, 4, 4])\n",
" array([2, 3, 1, 1, 2, 4, 4, 2, 4, 2, 3, 2, 3, 4, 4, 2, 4])\n",
" array([3, 6, 3, 5, 5, 3, 6, 5, 3, 5, 6, 3, 5, 3, 5])\n",
" array([1, 4, 4, 7, 7, 1, 4, 5, 5, 7, 4, 7, 4, 7, 1, 4, 7])\n",
" array([7, 5, 7, 1, 7, 5, 1, 7, 5, 1, 7, 5, 1, 7, 1, 7, 1])\n",
" array([2, 6, 2, 1, 1, 2, 6, 2, 1, 1, 2, 1, 2, 1])\n",
" array([6, 2, 7, 7, 6, 2, 7, 6, 7, 2, 7, 6, 7])\n",
" array([5, 3, 3, 4, 4, 3, 4, 3, 5, 3, 5, 4, 4, 3, 4])\n",
" array([2, 3, 2, 4, 4, 2, 3, 4, 2, 4, 2, 3, 4, 2, 3, 3, 4])\n",
" array([6, 3, 3, 5, 5, 3, 3, 6, 3, 3, 5, 5, 5, 5])\n",
" array([4, 1, 4, 7, 7, 4, 7, 4, 7, 4, 7, 1, 4, 7])\n",
" array([7, 5, 7, 1, 7, 5, 1, 7, 1, 5, 7, 1, 7, 1, 1, 5, 1, 7, 1])\n",
" array([2, 6, 2, 1, 1, 2, 1, 2, 1, 2, 6, 1, 2, 1])\n",
" array([6, 2, 7, 7, 6, 7, 2, 7, 6, 7, 2, 7])\n",
" array([5, 3, 3, 4, 5, 3, 4, 5, 3, 4, 3, 4, 3, 4, 3, 5, 4])\n",
" array([2, 3, 2, 4, 4, 2, 3, 4, 2, 4, 2, 3, 4, 2, 4])\n",
" array([3, 6, 3, 5, 5, 3, 5, 3, 6, 5, 3, 6, 5, 3, 3, 5])\n",
" array([4, 1, 4, 7, 4, 7, 7, 4, 7, 4, 1, 1, 4, 7, 7])\n",
" array([7, 5, 7, 1, 1, 7, 1, 7, 5, 5, 1, 7, 1, 7, 5, 1])\n",
" array([2, 6, 2, 1, 1, 1, 1, 1, 1, 2, 6, 2, 2, 2, 6])\n",
" array([6, 2, 7, 7, 6, 7, 6, 7, 2, 7, 2, 7])\n",
" array([3, 5, 3, 4, 4, 5, 3, 4, 3, 4, 5, 3, 4, 3, 4])\n",
" array([2, 3, 2, 4, 4, 2, 4, 2, 4, 2, 3, 4, 2, 4])\n",
" array([6, 3, 3, 5, 5, 3, 6, 3, 5, 5, 3, 6, 5, 3, 6, 5])\n",
" array([1, 4, 4, 7, 7, 4, 1, 7, 4, 4, 4, 7, 7, 7, 1])\n",
" array([2, 3, 2, 2, 3, 2, 3, 2, 2])\n",
" array([7, 5, 7, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 5, 7, 5])\n",
" array([2, 6, 1, 2, 1, 1, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1])\n",
" array([5, 3, 3, 3, 3, 3, 5, 5, 3, 4, 4, 4, 4])\n",
" array([3, 6, 3, 5, 3, 6, 3, 6, 3, 3, 5, 5, 5, 5, 5])\n",
" array([6, 2, 7, 2, 2, 2, 6, 7, 7, 7, 7, 7, 7])\n",
" array([1, 4, 4, 7, 7, 7, 7, 7, 7, 1, 4, 4, 4])\n",
" array([2, 3, 2, 4, 4, 4, 4, 4, 4, 2, 3, 2, 3, 2, 2])\n",
" array([1, 7, 5, 7, 7, 5, 7, 5, 7, 5, 7, 1, 1, 1, 1, 1])\n",
" array([2, 6, 2, 1, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1])\n",
" array([4, 3, 5, 3, 4, 3, 5, 5, 3, 3, 5, 3, 4, 4, 4, 4, 4])\n",
" array([6, 3, 3, 5, 3, 3, 3, 6, 3, 6, 5, 5, 5, 5, 5])\n",
" array([6, 2, 7, 2, 2, 2, 6, 7, 7, 7, 7, 7])\n",
" array([4, 4, 7, 3, 7, 3, 1, 1, 4, 4, 1, 4, 4, 7, 7, 7, 7])\n",
" array([2, 3, 2, 4, 2, 2, 2, 3, 3, 2, 3, 4, 4, 4, 4, 4])\n",
" array([7, 5, 7, 1, 7, 5, 7, 7, 5, 7, 1, 1, 1, 1, 1])\n",
" array([2, 6, 2, 1, 2, 6, 2, 6, 2, 6, 2, 1, 1, 1, 1, 1])\n",
" array([3, 3, 5, 4, 3, 5, 3, 5, 3, 3, 4, 4, 4, 4, 4])\n",
" array([5, 6, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 6, 6, 6])\n",
" array([6, 2, 7, 6, 6, 2, 2, 7, 7, 7, 7, 7])\n",
" array([4, 1, 4, 7, 4, 4, 4, 4, 1, 1, 7, 7, 7, 7, 7])\n",
" array([2, 3, 2, 4, 3, 2, 2, 2, 2, 4, 4, 4, 4, 4])\n",
" array([1, 7, 5, 7, 7, 7, 7, 7, 5, 1, 1, 1, 1, 1])\n",
" array([2, 6, 2, 1, 2, 6, 2, 6, 2, 2, 6, 1, 1, 1, 1, 1])\n",
" array([4, 3, 3, 5, 3, 3, 5, 3, 5, 3, 4, 4, 4, 4, 4])\n",
" array([3, 6, 3, 5, 3, 3, 3, 3, 6, 6, 5, 5, 5, 5, 5])\n",
" array([6, 2, 7, 6, 6, 6, 2, 7, 7, 7, 7, 7])\n",
" array([4, 4, 1, 7, 4, 4, 4, 4, 1, 1, 7, 7, 7, 7, 7])\n",
" array([4, 2, 3, 2, 2, 3, 2, 3, 2, 2, 4, 4, 4, 4, 4])\n",
" array([1, 7, 5, 7, 1, 1, 1, 1, 1, 7, 7, 7, 7, 5])\n",
" array([2, 6, 2, 1, 2, 2, 2, 2, 6, 1, 1, 1, 1, 1])\n",
" array([5, 3, 3, 4, 3, 5, 3, 5, 5, 3, 3, 4, 4, 4, 4, 4])\n",
" array([2, 3, 3, 5, 2, 3, 2, 6, 6, 3, 2, 6, 3, 3, 3, 6, 5, 5, 5, 5, 5])\n",
" array([6, 2, 7, 2, 2, 6, 6, 7, 7, 7, 7, 7])\n",
" array([4, 1, 4, 7, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 4])\n",
" array([4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7, 1, 1])\n",
" array([2, 6, 2, 2, 2, 6, 2, 6, 2, 6, 1, 1, 1, 1, 1, 1])\n",
" array([4, 4, 4, 4, 4, 4, 4, 5, 2, 5, 5, 5, 5, 5, 2, 2, 2])\n",
" array([6, 3, 3, 6, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 7, 7, 7, 7, 5, 1, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 3, 2, 3, 2, 3, 2, 2, 4, 4, 4, 4, 4, 4])\n",
" array([6, 6, 6, 6, 2, 2, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7])\n",
" array([4, 4, 4, 4, 4, 4, 1, 1, 1, 7, 7, 7, 7, 7, 7])\n",
" array([6, 2, 2, 6, 2, 2, 6, 2, 2, 1, 1, 1, 1, 1, 1])\n",
" array([5, 3, 4, 5, 5, 3, 3, 3, 5, 5, 5, 4, 4, 4, 4, 4, 4])\n",
" array([6, 3, 3, 3, 6, 3, 3, 3, 6, 5, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 5, 7, 5, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 2, 2, 3, 2, 2, 4, 4, 4, 4, 4, 4])\n",
" array([6, 2, 6, 6, 2, 2, 7, 7, 7, 7, 7, 7])\n",
" array([1, 4, 4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7])\n",
" array([2, 6, 2, 2, 6, 2, 2, 6, 2, 1, 1, 1, 1, 1, 1])\n",
" array([5, 3, 3, 3, 3, 3, 3, 5, 3, 5, 4, 4, 4, 4, 4, 4])\n",
" array([6, 3, 3, 3, 6, 3, 3, 3, 5, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 7, 5, 7, 7, 5, 7, 1, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 2, 3, 2, 3, 3, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4])\n",
" array([6, 2, 2, 6, 2, 2, 7, 7, 7, 7, 7, 7])\n",
" array([1, 4, 4, 1, 4, 4, 4, 1, 4, 7, 7, 7, 7, 7, 7])\n",
" array([2, 6, 2, 2, 2, 2, 6, 2, 6, 1, 1, 1, 1, 1, 1, 1])\n",
" array([5, 3, 3, 3, 5, 3, 3, 3, 5, 4, 4, 4, 4, 4, 4])\n",
" array([6, 3, 3, 3, 6, 3, 3, 3, 6, 5, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 7, 7, 7, 5, 7, 5, 1, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 2, 3, 2, 2, 3, 2, 4, 4, 4, 4, 4, 4])\n",
" array([6, 7, 2, 7, 2, 2, 6, 6, 6, 7, 6, 7, 7, 7])\n",
" array([1, 4, 4, 4, 4, 1, 1, 1, 4, 4, 7, 7, 7, 7, 7, 7])\n",
" array([2, 6, 2, 2, 2, 6, 2, 2, 1, 1, 1, 1, 1, 1])\n",
" array([3, 5, 3, 3, 3, 3, 5, 4, 4, 4, 4, 4])\n",
" array([3, 6, 3, 6, 3, 3, 6, 3, 3, 5, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 7, 5, 7, 5, 7, 7, 5, 1, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 2, 3, 2, 2, 3, 2, 3, 4, 4, 4, 4, 4, 4])\n",
" array([6, 2, 6, 6, 2, 2, 7, 7, 7, 7, 7, 7])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 2, 4, 4, 4, 4, 4])\n",
" array([7, 6, 2, 6, 2, 2, 2, 6, 2, 7, 7, 7, 7, 7])\n",
" array([4, 4, 1, 7, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7])\n",
" array([1, 7, 5, 7, 5, 7, 1, 1, 1, 1, 1, 5, 7, 7, 7])\n",
" array([4, 3, 3, 5, 3, 4, 4, 4, 3, 3, 3, 5, 5, 4, 4, 4])\n",
" array([6, 3, 3, 5, 2, 3, 2, 3, 3, 3, 5, 5, 5, 5, 5])\n",
" array([2, 2, 6, 1, 1, 1, 1, 1, 1, 2, 6, 2, 6, 2, 2])\n",
" array([2, 2, 3, 4, 2, 2, 3, 2, 2, 4, 4, 4, 4, 4])\n",
" array([2, 6, 7, 6, 2, 6, 2, 7, 7, 7, 7, 7, 7])\n",
" array([4, 1, 4, 4, 4, 7, 4, 1, 4, 1, 4, 4, 1, 7, 7, 7, 7, 7])\n",
" array([1, 7, 5, 7, 7, 7, 5, 5, 7, 7, 1, 1, 1, 1, 1])\n",
" array([3, 4, 5, 3, 3, 5, 4, 4, 4, 4, 4, 3, 3, 3, 5])\n",
" array([3, 3, 6, 5, 3, 3, 6, 3, 6, 3, 5, 5, 5, 5, 5])\n",
" array([1, 2, 2, 6, 2, 2, 6, 2, 2, 6, 1, 1, 1, 1, 1])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 3, 2, 4, 4, 4, 4, 4])\n",
" array([2, 6, 7, 2, 2, 6, 6, 7, 7, 7, 7, 7])\n",
" array([4, 4, 7, 1, 4, 1, 4, 4, 1, 1, 4, 7, 7, 7, 7, 7])\n",
" array([1, 7, 7, 5, 7, 5, 7, 7, 7, 1, 1, 1, 1, 1, 5])\n",
" array([3, 3, 5, 4, 3, 3, 3, 5, 3, 5, 4, 4, 4, 4, 4])\n",
" array([5, 6, 3, 3, 3, 6, 3, 3, 3, 6, 5, 5, 5, 5, 5])\n",
" array([2, 1, 2, 6, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1])\n",
" array([2, 4, 2, 3, 2, 2, 2, 3, 2, 3, 4, 4, 4, 4, 4])\n",
" array([2, 6, 7, 2, 2, 6, 2, 7, 7, 7, 7, 7])\n",
" array([4, 4, 1, 1, 7, 4, 1, 4, 1, 4, 4, 7, 7, 7, 7, 7])\n",
" array([7, 7, 5, 1, 7, 5, 7, 7, 7, 1, 1, 1, 1, 1])\n",
" array([3, 5, 3, 4, 3, 5, 3, 3, 3, 5, 3, 4, 4, 4, 4, 4])\n",
" array([3, 3, 6, 5, 3, 6, 3, 6, 3, 3, 5, 5, 5, 5, 5])\n",
" array([2, 2, 6, 1, 2, 2, 2, 2, 1, 2, 2, 6, 1, 1, 1, 1])\n",
" array([2, 4, 2, 3, 2, 3, 2, 3, 2, 2, 4, 4, 4, 4, 4])\n",
" array([2, 6, 7, 2, 6, 6, 6, 7, 7, 7, 7, 7])\n",
" array([4, 4, 1, 7, 4, 4, 1, 4, 1, 4, 7, 7, 7, 7, 7])\n",
" array([1, 7, 7, 5, 7, 5, 7, 5, 7, 5, 7, 1, 1, 1, 1, 1])\n",
" array([4, 5, 3, 3, 3, 5, 3, 3, 5, 3, 5, 4, 4, 4, 4, 4])\n",
" array([5, 6, 3, 3, 3, 6, 6, 3, 3, 6, 3, 5, 5, 5, 5, 5])\n",
" array([2, 1, 2, 6, 2, 2, 6, 2, 2, 6, 1, 1, 1, 1, 1])\n",
" array([1, 2, 3, 1, 2, 2, 2, 3, 2, 3, 2, 4, 4, 4, 4, 4, 4])\n",
" array([6, 2, 2, 2, 6, 6, 7, 7, 7, 7, 7, 7])\n",
" array([1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 4])\n",
" array([3, 3, 3, 3, 3, 3, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4])\n",
" array([5, 2, 2, 6, 3, 3, 3, 3, 6, 6, 3, 3, 5, 5, 5, 5, 5, 5])\n",
" array([2, 6, 2, 2, 2, 2, 2, 6, 1, 1, 1, 1, 1, 1])\n",
" array([7, 5, 7, 7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 5, 5])\n",
" array([2, 3, 2, 2, 3, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 7, 7, 7, 7, 7, 6, 6, 2, 2])\n",
" array([1, 1, 1, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 4])\n",
" array([5, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 4, 4, 4, 4, 4, 4, 5, 5, 4, 5, 5,\n",
" 4])\n",
" array([3, 6, 3, 5, 5, 5, 5, 5, 5, 6, 3, 3, 6, 3, 3])\n",
" array([2, 6, 2, 1, 2, 2, 6, 2, 6, 2])\n",
" array([1, 7, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 5, 5, 5, 5, 5, 5, 5])\n",
" array([2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 4, 4, 4, 4, 4, 4])\n",
" array([6, 2, 2, 2, 6, 6, 7, 7, 7, 7, 7, 7])\n",
" array([1, 7, 1, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 4])\n",
" array([3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5])\n",
" array([3, 6, 3, 3, 3, 6, 3, 6, 3, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5])\n",
" array([6, 2, 2, 1, 2, 2, 2, 2, 6, 2, 6, 1, 1, 1, 1, 1])\n",
" array([7, 1, 1, 7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 5, 5, 5])\n",
" array([2, 3, 2, 2, 2, 2, 3, 2, 3, 4, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 6, 2, 2, 2, 7, 7, 7, 7, 7])\n",
" array([1, 7, 1, 1, 1, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 4, 4, 4])\n",
" array([3, 3, 3, 3, 3, 3, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4])\n",
" array([3, 6, 3, 3, 6, 3, 3, 6, 3, 6, 3, 6, 5, 5, 5, 5, 5, 5, 5])\n",
" array([2, 6, 2, 2, 2, 2, 6, 2, 6, 1, 1, 1, 1, 1, 1])\n",
" array([7, 1, 7, 7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 5, 5])\n",
" array([2, 3, 2, 2, 3, 2, 2, 3, 2, 3, 2, 4, 4, 4, 4, 4, 4])\n",
" array([3, 3, 6, 2, 2, 2, 6, 6, 6, 7, 7, 7, 7, 7, 7])\n",
" array([1, 7, 7, 7, 7, 7, 7, 1, 1, 4, 4, 4, 4, 4, 4])\n",
" array([3, 3, 3, 3, 3, 3, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4])\n",
" array([3, 6, 3, 3, 3, 3, 3, 6, 5, 5, 5, 5, 5, 5, 5])\n",
" array([2, 6, 2, 2, 6, 2, 2, 2, 2, 6, 1, 1, 1, 1, 1, 1])\n",
" array([7, 7, 1, 7, 7, 7, 7, 1, 1, 1, 1, 1, 5, 5])\n",
" array([5, 3, 6, 3, 5, 3, 5, 3, 5, 6, 3, 5, 3, 6, 5])\n",
" array([2, 1, 2, 6, 1, 2, 1, 2, 6, 1, 2, 6, 2, 2, 2, 6, 6, 6, 2, 6, 1, 2,\n",
" 1])\n",
" array([7, 5, 7, 1, 1, 1, 1, 1, 1, 7, 5, 7, 5, 7, 7, 5])\n",
" array([2, 2, 3, 3, 3, 2, 2, 3, 4, 4, 4, 4, 4, 2, 2])\n",
" array([3, 3, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 5, 5])\n",
" array([1, 4, 7, 5, 5, 7, 4, 1, 4, 4, 1, 4, 4, 7, 7, 7, 7, 7, 7])\n",
" array([2, 2, 6, 7, 7, 7, 7, 7, 7, 6, 6, 6, 2, 2, 6])\n",
" array([2, 3, 6, 2, 6, 5, 5, 5, 5, 5, 5, 6, 3, 3, 6, 3, 6, 6])\n",
" array([2, 6, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 6, 6])\n",
" array([7, 5, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 5, 7, 5, 7, 7])\n",
" array([2, 2, 3, 4, 4, 4, 4, 4, 4, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3])\n",
" array([5, 3, 3, 4, 4, 4, 4, 4, 4, 3, 5, 3, 5, 3, 3])\n",
" array([1, 4, 4, 7, 7, 4, 1, 7, 4, 7, 4, 1, 7, 4, 7])\n",
" array([6, 2, 7, 7, 7, 7, 7, 7, 6, 2, 6, 2])\n",
" array([2, 3, 2, 5, 5, 5, 5, 5, 5, 2, 3, 2, 3, 2, 2])\n",
" array([2, 2, 6, 1, 2, 2, 2, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1])\n",
" array([7, 5, 7, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 5])\n",
" array([2, 3, 4, 2, 4, 4, 4, 4, 4, 2, 3, 2, 2, 2])\n",
" array([3, 5, 3, 4, 4, 4, 4, 4, 4, 3, 5, 3, 5, 3, 5, 3])\n",
" array([4, 1, 4, 7, 7, 7, 7, 7, 7, 4, 4, 1, 4, 1, 1, 1, 4])\n",
" array([6, 2, 7, 7, 7, 7, 7, 7, 2, 2, 6, 6])\n",
" array([6, 3, 3, 3, 5, 3, 5, 5, 5, 5, 5, 3, 6, 3, 3, 3])\n",
" array([6, 2, 2, 1, 1, 1, 1, 1, 1, 2, 6, 2, 2, 2])\n",
" array([7, 5, 7, 1, 7, 7, 1, 1, 1, 1, 1, 7, 7, 7, 5, 7, 5])\n",
" array([2, 3, 2, 4, 4, 4, 4, 4, 4, 2, 3, 2, 2, 2, 2])\n",
" array([5, 3, 3, 4, 4, 4, 4, 4, 4, 3, 5, 3, 5, 3, 5, 3])\n",
" array([4, 1, 4, 7, 7, 7, 7, 7, 7, 4, 1, 1, 4, 4, 4])\n",
" array([6, 2, 7, 7, 7, 7, 7, 7, 2, 6, 6, 2])\n",
" array([6, 3, 3, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 6])\n",
" array([6, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 6, 6])\n",
" array([7, 5, 7, 1, 1, 1, 1, 1, 1, 7, 5, 7, 5, 7, 7, 5])\n",
" array([2, 3, 2, 4, 4, 4, 4, 4, 4, 2, 3, 2, 3, 2, 2])\n",
" array([5, 3, 3, 4, 4, 4, 4, 4, 4, 3, 5, 3, 5, 3, 5, 3])\n",
" array([4, 1, 4, 7, 7, 7, 7, 7, 7, 4, 1, 4, 1, 1, 4, 4])\n",
" array([6, 2, 7, 7, 7, 7, 7, 7, 2, 2, 6, 6])]\n",
"y_train\n",
" [5. 3. 6. 1. 0. 4. 2. 5. 3. 6. 1. 0. 4. 2. 5. 3. 6. 1. 0. 4. 2. 5. 3. 6.\n",
" 1. 0. 4. 2. 5. 3. 6. 1. 0. 4. 2. 4. 5. 3. 2. 0. 1. 6. 4. 5. 3. 2. 0. 1.\n",
" 6. 4. 5. 3. 2. 0. 1. 6. 4. 5. 3. 2. 0. 1. 6. 4. 5. 3. 2. 0. 1. 6. 0. 1.\n",
" 2. 3. 4. 5. 6. 0. 1. 2. 3. 4. 5. 6. 0. 1. 2. 3. 4. 5. 6. 0. 1. 2. 3. 4.\n",
" 5. 6. 0. 1. 2. 3. 4. 5. 6. 2. 3. 6. 4. 0. 5. 1. 2. 3. 6. 4. 0. 5. 1. 2.\n",
" 3. 6. 4. 0. 5. 1. 2. 3. 6. 4. 0. 5. 1. 2. 3. 6. 4. 0. 5. 1. 5. 0. 6. 3.\n",
" 4. 1. 2. 5. 0. 6. 3. 4. 1. 2. 5. 0. 6. 3. 4. 1. 2. 5. 0. 6. 3. 4. 1. 2.\n",
" 5. 0. 6. 3. 4. 1. 2. 0. 2. 1. 4. 3. 6. 5. 0. 2. 1. 4. 3. 6. 5. 0. 2. 1.\n",
" 4. 3. 6. 5. 0. 2. 1. 4. 3. 6. 5. 0. 2. 1. 4. 3. 6. 5. 1. 0. 4. 2. 3. 5.\n",
" 6. 1. 0. 4. 2. 3. 5. 6. 1. 0. 4. 2. 3. 5. 6. 1. 0. 4. 2. 3. 5. 6. 1. 0.\n",
" 4. 2. 3. 5. 6. 6. 2. 4. 0. 5. 1. 3. 6. 2. 4. 0. 5. 1. 3. 6. 2. 4. 0. 5.\n",
" 1. 3. 6. 2. 4. 0. 5. 1. 3. 6. 2. 4. 0. 5. 1. 3. 6. 0. 5. 2. 3. 4. 1. 6.\n",
" 0. 5. 2. 3. 4. 1. 6. 0. 5. 2. 3. 4. 1. 6. 0. 5. 2. 3. 4. 1. 6. 0. 5. 2.\n",
" 3. 4. 1. 6. 4. 5. 0. 2. 1. 3. 6. 4. 5. 0. 2. 1. 3. 6. 4. 5. 0. 2. 1. 3.\n",
" 6. 4. 5. 0. 2. 1. 3. 6. 4. 5. 0. 2. 1. 3. 2. 6. 4. 0. 1. 5. 3. 2. 6. 4.\n",
" 0. 1. 5. 3. 2. 6. 4. 0. 1. 5. 3. 2. 6. 4. 0. 1. 5. 3. 2. 6. 4. 0. 1. 5.\n",
" 3. 3. 4. 0. 1. 6. 2. 5. 3. 4. 0. 1. 6. 2. 5. 3. 4. 0. 1. 6. 2. 5. 3. 4.\n",
" 0. 1. 6. 2. 5. 3. 4. 0. 1. 6. 2. 5. 2. 5. 3. 6. 0. 1. 4. 2. 5. 3. 6. 0.\n",
" 1. 4. 2. 5. 3. 6. 0. 1. 4. 2. 5. 3. 6. 0. 1. 4. 2. 5. 3. 6. 0. 1. 4. 2.\n",
" 5. 3. 0. 1. 4. 6. 2. 5. 3. 0. 1. 4. 6. 2. 5. 3. 0. 1. 4. 6. 2. 5. 3. 0.\n",
" 1. 4. 6. 2. 5. 3. 0. 1. 4. 6. 1. 4. 6. 2. 0. 3. 5. 1. 4. 6. 2. 0. 3. 5.\n",
" 1. 4. 6. 2. 0. 3. 5. 1. 4. 6. 2. 0. 3. 5. 1. 4. 6. 2. 0. 3. 5.]\n",
"x_test\n",
" [array([4, 1, 1, 4, 4, 7, 7, 7, 7, 7, 7, 4, 1, 4, 4, 4])\n",
" array([2, 3, 2, 4, 4, 4, 4, 4, 4, 2, 2, 2, 3, 2, 3])\n",
" array([5, 3, 3, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5])\n",
" array([6, 2, 7, 6, 6, 2, 2, 7, 7, 7, 7])\n",
" array([2, 6, 2, 1, 2, 2, 2, 2, 6, 6, 1, 1, 1, 1, 1])\n",
" array([3, 3, 6, 5, 3, 3, 3, 3, 6, 5, 5, 5, 5, 5])\n",
" array([7, 7, 5, 1, 7, 7, 5, 7, 7, 1, 1, 1, 1, 1, 5, 5])\n",
" array([1, 4, 7, 4, 4, 4, 4, 4, 1, 1, 7, 7, 7, 7, 7])\n",
" array([2, 3, 2, 2, 4, 3, 2, 2, 3, 2, 2, 4, 4, 4, 4, 4])\n",
" array([3, 5, 3, 4, 4, 3, 3, 3, 3, 5, 5, 4, 4, 4, 4])\n",
" array([6, 2, 7, 2, 2, 7, 7, 7, 6, 6, 7, 6, 6, 7, 7, 7, 7, 7])\n",
" array([2, 2, 6, 1, 1, 2, 2, 2, 2, 6, 6, 6, 1, 1, 1, 1])\n",
" array([3, 6, 3, 5, 2, 2, 3, 6, 3, 3, 3, 6, 5, 5, 5, 5, 5])\n",
" array([1, 5, 7, 7, 7, 5, 7, 5, 7, 7, 1, 1, 1, 1, 1])\n",
" array([7, 4, 4, 7, 4, 4, 4, 4, 7, 1, 7, 7, 7, 7, 1, 1, 7])\n",
" array([2, 3, 2, 4, 2, 3, 2, 2, 2, 4, 4, 4, 4, 4])\n",
" array([3, 5, 3, 4, 3, 3, 3, 3, 5, 5, 5, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 7, 7, 7, 7, 7, 2, 2, 6, 6])\n",
" array([2, 2, 1, 6, 2, 2, 2, 2, 6, 6, 1, 1, 1, 1, 1])\n",
" array([3, 6, 3, 5, 3, 3, 3, 3, 6, 6, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 7, 7, 7, 7, 7, 5, 1, 1, 1, 1, 1, 1])\n",
" array([4, 1, 4, 4, 4, 4, 4, 1, 1, 1, 7, 7, 7, 7, 7, 7])\n",
" array([2, 3, 2, 4, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4])\n",
" array([5, 3, 3, 4, 5, 3, 3, 3, 3, 5, 3, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 6, 6, 2, 2, 7, 7, 7, 7, 7])\n",
" array([2, 6, 2, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 6, 6])\n",
" array([3, 6, 3, 5, 3, 3, 3, 3, 6, 5, 5, 5, 5, 5])\n",
" array([5, 7, 7, 1, 7, 7, 5, 7, 5, 7, 1, 1, 1, 1, 1])\n",
" array([1, 4, 4, 7, 7, 4, 4, 4, 4, 1, 1, 7, 7, 7, 7])\n",
" array([2, 3, 2, 4, 4, 4, 4, 4, 4, 2, 3, 2, 2, 2])\n",
" array([4, 3, 5, 3, 3, 5, 3, 3, 3, 5, 4, 4, 4, 4, 4])\n",
" array([6, 2, 7, 6, 6, 6, 2, 7, 7, 7, 7, 7])\n",
" array([2, 2, 6, 1, 2, 6, 2, 6, 2, 2, 1, 1, 1, 1, 1])\n",
" array([3, 6, 3, 5, 3, 6, 3, 6, 3, 3, 6, 5, 5, 5, 5, 5])\n",
" array([7, 5, 7, 1, 7, 5, 1, 1, 1, 1, 1, 7, 7, 7, 5])]\n",
"y_test\n",
" [3. 2. 0. 5. 4. 1. 6. 3. 2. 0. 5. 4. 1. 6. 3. 2. 0. 5. 4. 1. 6. 3. 2. 0.\n",
" 5. 4. 1. 6. 3. 2. 0. 5. 4. 1. 6.]\n",
"> \u001b[0;32m/tmp/ipykernel_97850/1264473745.py\u001b[0m(32)\u001b[0;36mcreateTrainTest\u001b[0;34m()\u001b[0m\n",
"\u001b[0;32m 30 \u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'y_test\\n'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0my_test\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0m\u001b[0;32m 31 \u001b[0;31m \u001b[0mpdb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_trace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0m\u001b[0;32m---> 32 \u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mshapes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0m\u001b[0;32m 33 \u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx_train\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0m\u001b[0;32m 34 \u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0my_train\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0m\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"ipdb> x_train.shape\n",
"(525,)\n",
"ipdb> x_test.shape\n",
"(35,)\n"
]
}
],
"source": [
"accuracies_full = dict()\n",
"accuracies_small = dict()\n",
"accuracies_last = dict()\n",
"\n",
"for current_PID in sorted(data.PID.unique()):\n",
" accuracies_full[current_PID], pred_label, test_label = runSVMS(createTrainTest([current_PID], Task_IDs, StartIndexOffset, EndIndexOffset, shapes=True))\n",
" # Only the first 5\n",
" accuracies_small[current_PID], pred_label, test_label = runSVMS(createTrainTest([current_PID], Task_IDs, StartIndexOffset, EndIndexOffset, shapes=True), 5)\n",
" # Only the last 5\n",
" accuracies_last[current_PID], pred_label, test_label = runSVMS(createTrainTest([current_PID], Task_IDs, StartIndexOffset, EndIndexOffset, shapes=True), 5, last_elements=True)\n",
" #pdb.set_trace()\n",
"print(accuracies_full)\n",
"print(accuracies_small)\n",
"print(accuracies_last)\n",
"print(\"mean full\", np.array(list(accuracies_full.values())).mean())\n",
"print(\"mean small\", np.array(list(accuracies_small.values())).mean())\n",
"print(\"mean last\", np.array(list(accuracies_last.values())).mean())"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fdd4c915",
"metadata": {},
"outputs": [],
"source": [
"len(g.groups.keys())\n",
"g.groups.keys()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}