{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " --- This is a regression problem ---\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 1e-10 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.36956548690796 seconds ---\n",
      "[[ 13.          14.           4.         ...  20.          20.\n",
      "   20.        ]\n",
      " [ 14.          20.           4.         ...  20.          20.\n",
      "   20.        ]\n",
      " [  4.           4.          13.         ...  29.          29.\n",
      "   29.        ]\n",
      " ...\n",
      " [ 20.          20.          29.         ... 365.00000001 365.00000001\n",
      "  365.00000001]\n",
      " [ 20.          20.          29.         ... 365.00000001 365.00000001\n",
      "  365.00000001]\n",
      " [ 20.          20.          29.         ... 365.00000001 365.00000001\n",
      "  365.00000002]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  91%|█████████▏| 914/1000 [00:01<00:00, 751.28it/s]\n",
      " Mean performance on train set: 5.993535\n",
      "With standard deviation: 0.356922\n",
      "\n",
      " Mean performance on test set: 7.464904\n",
      "With standard deviation: 1.718585\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 795.88it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 1e-09 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.47467517852783 seconds ---\n",
      "[[ 13.          14.           4.         ...  20.          20.\n",
      "   20.        ]\n",
      " [ 14.          20.00000001   4.         ...  20.          20.\n",
      "   20.        ]\n",
      " [  4.           4.          13.         ...  29.          29.\n",
      "   29.        ]\n",
      " ...\n",
      " [ 20.          20.          29.         ... 365.00000015 365.00000015\n",
      "  365.00000015]\n",
      " [ 20.          20.          29.         ... 365.00000015 365.00000015\n",
      "  365.00000015]\n",
      " [ 20.          20.          29.         ... 365.00000015 365.00000015\n",
      "  365.0000002 ]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  98%|█████████▊| 975/1000 [00:01<00:00, 654.33it/s]\n",
      " Mean performance on train set: 5.963041\n",
      "With standard deviation: 0.374107\n",
      "\n",
      " Mean performance on test set: 7.375105\n",
      "With standard deviation: 1.769252\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 711.24it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 1e-08 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.32968211174011 seconds ---\n",
      "[[ 13.00000004  14.           4.         ...  20.          20.\n",
      "   20.        ]\n",
      " [ 14.          20.00000008   4.         ...  20.          20.\n",
      "   20.        ]\n",
      " [  4.           4.          13.00000004 ...  29.00000004  29.00000004\n",
      "   29.00000004]\n",
      " ...\n",
      " [ 20.          20.          29.00000004 ... 365.00000148 365.00000148\n",
      "  365.00000148]\n",
      " [ 20.          20.          29.00000004 ... 365.00000148 365.00000148\n",
      "  365.00000148]\n",
      " [ 20.          20.          29.00000004 ... 365.00000148 365.00000148\n",
      "  365.00000202]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  97%|█████████▋| 967/1000 [00:01<00:00, 809.48it/s]\n",
      " Mean performance on train set: 5.965110\n",
      "With standard deviation: 0.378249\n",
      "\n",
      " Mean performance on test set: 7.350689\n",
      "With standard deviation: 1.780556\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 786.78it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 1e-07 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.74151062965393 seconds ---\n",
      "[[ 13.0000004  14.          4.        ...  20.         20.\n",
      "   20.       ]\n",
      " [ 14.         20.0000008   4.        ...  20.         20.\n",
      "   20.       ]\n",
      " [  4.          4.         13.0000004 ...  29.0000004  29.0000004\n",
      "   29.0000004]\n",
      " ...\n",
      " [ 20.         20.         29.0000004 ... 365.0000148 365.0000148\n",
      "  365.0000148]\n",
      " [ 20.         20.         29.0000004 ... 365.0000148 365.0000148\n",
      "  365.0000148]\n",
      " [ 20.         20.         29.0000004 ... 365.0000148 365.0000148\n",
      "  365.0000202]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  95%|█████████▌| 954/1000 [00:01<00:00, 735.76it/s]\n",
      " Mean performance on train set: 5.966982\n",
      "With standard deviation: 0.382093\n",
      "\n",
      " Mean performance on test set: 7.350999\n",
      "With standard deviation: 1.781470\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 804.24it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 1e-06 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.52131748199463 seconds ---\n",
      "[[ 13.000004  14.         4.       ...  20.        20.        20.      ]\n",
      " [ 14.        20.000008   4.       ...  20.        20.        20.      ]\n",
      " [  4.         4.        13.000004 ...  29.000004  29.000004  29.000004]\n",
      " ...\n",
      " [ 20.        20.        29.000004 ... 365.000148 365.000148 365.000148]\n",
      " [ 20.        20.        29.000004 ... 365.000148 365.000148 365.000148]\n",
      " [ 20.        20.        29.000004 ... 365.000148 365.000148 365.000202]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  97%|█████████▋| 970/1000 [00:01<00:00, 759.32it/s]\n",
      " Mean performance on train set: 5.969758\n",
      "With standard deviation: 0.386318\n",
      "\n",
      " Mean performance on test set: 7.351225\n",
      "With standard deviation: 1.780522\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 783.42it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 1e-05 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.67099857330322 seconds ---\n",
      "[[ 13.00004     14.           4.         ...  20.          20.\n",
      "   20.        ]\n",
      " [ 14.          20.00008      4.         ...  20.          20.\n",
      "   20.        ]\n",
      " [  4.           4.          13.00004    ...  29.00004     29.00004\n",
      "   29.00004   ]\n",
      " ...\n",
      " [ 20.          20.          29.00004    ... 365.00148001 365.00148001\n",
      "  365.00148   ]\n",
      " [ 20.          20.          29.00004    ... 365.00148001 365.00148001\n",
      "  365.00148   ]\n",
      " [ 20.          20.          29.00004    ... 365.00148    365.00148\n",
      "  365.00202   ]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 801.70it/s]\n",
      " Mean performance on train set: 5.970557\n",
      "With standard deviation: 0.390719\n",
      "\n",
      " Mean performance on test set: 7.348129\n",
      "With standard deviation: 1.780293\n",
      "\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 0.0001 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 36.80127692222595 seconds ---\n",
      "[[ 13.0004      14.           4.         ...  20.          20.\n",
      "   20.        ]\n",
      " [ 14.          20.0008       4.         ...  20.          20.\n",
      "   20.        ]\n",
      " [  4.           4.          13.0004     ...  29.0004      29.0004\n",
      "   29.0004    ]\n",
      " ...\n",
      " [ 20.          20.          29.0004     ... 365.01480072 365.01480072\n",
      "  365.0148    ]\n",
      " [ 20.          20.          29.0004     ... 365.01480072 365.01480072\n",
      "  365.0148    ]\n",
      " [ 20.          20.          29.0004     ... 365.0148     365.0148\n",
      "  365.0202    ]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  98%|█████████▊| 980/1000 [00:01<00:00, 889.41it/s]\n",
      " Mean performance on train set: 5.942495\n",
      "With standard deviation: 0.331983\n",
      "\n",
      " Mean performance on test set: 7.349836\n",
      "With standard deviation: 1.781100\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 883.76it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 0.001 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 35.8681423664093 seconds ---\n",
      "[[ 13.004     14.         4.       ...  20.        20.        20.      ]\n",
      " [ 14.        20.008      4.       ...  20.        20.        20.      ]\n",
      " [  4.         4.        13.004    ...  29.004     29.004     29.004   ]\n",
      " ...\n",
      " [ 20.        20.        29.004    ... 365.148072 365.148072 365.148   ]\n",
      " [ 20.        20.        29.004    ... 365.148072 365.148072 365.148   ]\n",
      " [ 20.        20.        29.004    ... 365.148    365.148    365.202   ]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  99%|█████████▉| 988/1000 [00:01<00:00, 886.54it/s]\n",
      " Mean performance on train set: 5.933395\n",
      "With standard deviation: 0.324965\n",
      "\n",
      " Mean performance on test set: 7.357745\n",
      "With standard deviation: 1.780977\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 888.00it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 0.01 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 36.001843214035034 seconds ---\n",
      "[[ 13.04    14.       4.     ...  20.      20.      20.    ]\n",
      " [ 14.      20.08     4.     ...  20.      20.      20.    ]\n",
      " [  4.       4.      13.04   ...  29.04    29.04    29.04  ]\n",
      " ...\n",
      " [ 20.      20.      29.04   ... 366.4872 366.4872 366.48  ]\n",
      " [ 20.      20.      29.04   ... 366.4872 366.4872 366.48  ]\n",
      " [ 20.      20.      29.04   ... 366.48   366.48   367.02  ]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  98%|█████████▊| 978/1000 [00:01<00:00, 863.94it/s]\n",
      " Mean performance on train set: 5.940695\n",
      "With standard deviation: 0.347431\n",
      "\n",
      " Mean performance on test set: 7.374269\n",
      "With standard deviation: 1.791145\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 878.96it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 0.1 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 36.37146854400635 seconds ---\n",
      "[[ 13.4   14.     4.   ...  20.    20.    20.  ]\n",
      " [ 14.    20.8    4.   ...  20.    20.    20.  ]\n",
      " [  4.     4.    13.4  ...  29.4   29.4   29.4 ]\n",
      " ...\n",
      " [ 20.    20.    29.4  ... 380.52 380.52 379.8 ]\n",
      " [ 20.    20.    29.4  ... 380.52 380.52 379.8 ]\n",
      " [ 20.    20.    29.4  ... 379.8  379.8  385.2 ]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  99%|█████████▉| 993/1000 [00:01<00:00, 860.40it/s]\n",
      " Mean performance on train set: 6.427114\n",
      "With standard deviation: 1.293674\n",
      "\n",
      " Mean performance on test set: 7.329299\n",
      "With standard deviation: 1.913634\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 883.01it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 1.0 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.83972358703613 seconds ---\n",
      "[[ 17.  14.   4. ...  20.  20.  20.]\n",
      " [ 14.  28.   4. ...  20.  20.  20.]\n",
      " [  4.   4.  17. ...  33.  33.  33.]\n",
      " ...\n",
      " [ 20.  20.  33. ... 585. 585. 513.]\n",
      " [ 20.  20.  33. ... 585. 585. 513.]\n",
      " [ 20.  20.  33. ... 513. 513. 567.]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  98%|█████████▊| 979/1000 [00:01<00:00, 616.77it/s]\n",
      " Mean performance on train set: 6.624254\n",
      "With standard deviation: 1.224196\n",
      "\n",
      " Mean performance on test set: 7.271336\n",
      "With standard deviation: 2.207735\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 630.82it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 10.0 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.50818395614624 seconds ---\n",
      "[[5.300e+01 1.400e+01 4.000e+00 ... 2.000e+01 2.000e+01 2.000e+01]\n",
      " [1.400e+01 1.000e+02 4.000e+00 ... 2.000e+01 2.000e+01 2.000e+01]\n",
      " [4.000e+00 4.000e+00 5.300e+01 ... 6.900e+01 6.900e+01 6.900e+01]\n",
      " ...\n",
      " [2.000e+01 2.000e+01 6.900e+01 ... 9.045e+03 9.045e+03 1.845e+03]\n",
      " [2.000e+01 2.000e+01 6.900e+01 ... 9.045e+03 9.045e+03 1.845e+03]\n",
      " [2.000e+01 2.000e+01 6.900e+01 ... 1.845e+03 1.845e+03 2.385e+03]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:   8%|▊         | 77/1000 [00:00<00:01, 764.71it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.069543502626658e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.1303298666315776e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.70249458866672e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.63992169055093e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.438093960487116e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.0002169262936346e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.5920339281975188e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.5874866272574162e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.0599424240471626e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.468773818521402e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.958334441043603e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  27%|██▋       | 267/1000 [00:00<00:01, 654.82it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/sklearn/linear_model/ridge.py:154: UserWarning: Singular matrix in solving dual problem. Using least-squares solution instead.\n",
      "  warnings.warn(\"Singular matrix in solving dual problem. Using \"\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.055618175730539e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.7159074038024934e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.895455126720251e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.400306511546424e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.206478316049589e-19 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.8083631222444177e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.49051280863482e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.339852738992424e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.277544863160196e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.458523723353626e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  48%|████▊     | 477/1000 [00:00<00:00, 685.70it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.6380760737666547e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.3843421259537676e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.890544546973404e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.054758730954765e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.9172765626494813e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.4455093698440067e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.2914256710839066e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.65667341282596e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.852926745577629e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.285092924342139e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  69%|██████▉   | 694/1000 [00:01<00:00, 712.57it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.700250453064005e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.6205193931367065e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.4925504318417794e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.0111387119813346e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.343123723749221e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.0143662852277667e-16 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.206690575125046e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.049999246995425e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.4232350203422674e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.350008400303505e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.251763015291957e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  90%|█████████ | 902/1000 [00:01<00:00, 666.85it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.924869742342744e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.4010401637647583e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.5117924740400373e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.626753798403599e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.911227588173856e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.0660043401009468e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.3099139652029694e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.2680602391853274e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.396574210735164e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  97%|█████████▋| 969/1000 [00:01<00:00, 600.11it/s]\n",
      " Mean performance on train set: 6.816974\n",
      "With standard deviation: 1.501822\n",
      "\n",
      " Mean performance on test set: 7.497870\n",
      "With standard deviation: 2.368148\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:01<00:00, 648.87it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 100.0 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.09455919265747 seconds ---\n",
      "[[4.13000e+02 1.40000e+01 4.00000e+00 ... 2.00000e+01 2.00000e+01\n",
      "  2.00000e+01]\n",
      " [1.40000e+01 8.20000e+02 4.00000e+00 ... 2.00000e+01 2.00000e+01\n",
      "  2.00000e+01]\n",
      " [4.00000e+00 4.00000e+00 4.13000e+02 ... 4.29000e+02 4.29000e+02\n",
      "  4.29000e+02]\n",
      " ...\n",
      " [2.00000e+01 2.00000e+01 4.29000e+02 ... 7.35165e+05 7.35165e+05\n",
      "  1.51650e+04]\n",
      " [2.00000e+01 2.00000e+01 4.29000e+02 ... 7.35165e+05 7.35165e+05\n",
      "  1.51650e+04]\n",
      " [2.00000e+01 2.00000e+01 4.29000e+02 ... 1.51650e+04 1.51650e+04\n",
      "  2.05650e+04]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  10%|▉         | 97/1000 [00:00<00:02, 436.93it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.249229588791739e-20 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.6092761314568358e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.6033357497241564e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.0333531111165975e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.073851980749357e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.497880470461594e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.0349745182117167e-16 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  17%|█▋        | 169/1000 [00:00<00:02, 372.64it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.227908145504113e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.1894008132724887e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.9131474526752795e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.0421770253846576e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.864916618602575e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.663676730244888e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  31%|███▏      | 314/1000 [00:00<00:01, 429.29it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.6989200751598342e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.9988176582222278e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.173259131422707e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.069621878854856e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.087601566853754e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.1827598831940232e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.428244298929586e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.1120965359644164e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.8329496119281176e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.5128147762765525e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.173155329882729e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  50%|█████     | 501/1000 [00:01<00:00, 516.57it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.874621241781873e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.9047959204426696e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.03000007539236e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.8198639503150797e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.679200342495213e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.6211471280327221e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.74280825574767e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.685372827008377e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.9723233156997277e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.142362330339379e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.0042133764798303e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.987833375253946e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  71%|███████   | 706/1000 [00:01<00:00, 471.97it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.63949546549065e-19 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.76170805410039e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.3721058293845662e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.178277242767302e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.4883373934010664e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.526360275338589e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.827383891217367e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  81%|████████  | 807/1000 [00:01<00:00, 457.30it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.052622499085628e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.70793549450487e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.8190124240850417e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.349104192126423e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.132340452050677e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  91%|█████████ | 909/1000 [00:01<00:00, 451.90it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.78695142234395e-20 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.8765535280551442e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.9917255115528226e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.781650263544808e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.581768670551366e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.0493867289518776e-20 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.9787087068181396e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.756012232435961e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.800283208793992e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.468606690086715e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.119459703249427e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  96%|█████████▌| 956/1000 [00:02<00:00, 445.96it/s]\n",
      " Mean performance on train set: 6.687664\n",
      "With standard deviation: 1.348089\n",
      "\n",
      " Mean performance on test set: 7.428867\n",
      "With standard deviation: 2.647892\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:02<00:00, 467.65it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 1000.0 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.517051219940186 seconds ---\n",
      "[[4.0130000e+03 1.4000000e+01 4.0000000e+00 ... 2.0000000e+01\n",
      "  2.0000000e+01 2.0000000e+01]\n",
      " [1.4000000e+01 8.0200000e+03 4.0000000e+00 ... 2.0000000e+01\n",
      "  2.0000000e+01 2.0000000e+01]\n",
      " [4.0000000e+00 4.0000000e+00 4.0130000e+03 ... 4.0290000e+03\n",
      "  4.0290000e+03 4.0290000e+03]\n",
      " ...\n",
      " [2.0000000e+01 2.0000000e+01 4.0290000e+03 ... 7.2148365e+07\n",
      "  7.2148365e+07 1.4836500e+05]\n",
      " [2.0000000e+01 2.0000000e+01 4.0290000e+03 ... 7.2148365e+07\n",
      "  7.2148365e+07 1.4836500e+05]\n",
      " [2.0000000e+01 2.0000000e+01 4.0290000e+03 ... 1.4836500e+05\n",
      "  1.4836500e+05 2.0236500e+05]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  10%|█         | 102/1000 [00:00<00:02, 330.46it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.374017095746491e-19 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.687507275679712e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.7645414168071277e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.8090152927008474e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.474194561968185e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.130856876335615e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  19%|█▉        | 188/1000 [00:00<00:02, 348.40it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.7794644716713837e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.3130943734340723e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.7505566440337117e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.3279670378456666e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.318466984022222e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.418445519765442e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  28%|██▊       | 285/1000 [00:00<00:01, 380.47it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.1356199672921913e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.6464620684950592e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.179430869121561e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.473887201835687e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.570987725305032e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.854640029504099e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  38%|███▊      | 385/1000 [00:00<00:01, 389.24it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.3781828327775562e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.955507306233033e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.109947315270106e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.9378280303294975e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.866942525478256e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  49%|████▉     | 494/1000 [00:01<00:01, 398.83it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.636014964778956e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.6552163232757833e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.312233993243073e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.2794244316598437e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.406028628818668e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  60%|██████    | 604/1000 [00:01<00:00, 407.30it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.184686103929999e-20 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.1281587780183657e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.367013528660628e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.155116554595105e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.443029464120917e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.4923079446940085e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.750703061909557e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  71%|███████   | 707/1000 [00:01<00:00, 402.63it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.4970615125032324e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.39494402062226e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.818999641865095e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.051275910233908e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.688197813410084e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  81%|████████  | 806/1000 [00:01<00:00, 404.11it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.43659662072146e-20 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.4284104102664825e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.900304923444742e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.1112688931900636e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.941184656304436e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.746476431972804e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  91%|█████████ | 906/1000 [00:02<00:00, 407.57it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.327409345420052e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.0589341144557062e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.29154188313992e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.225020130252359e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.327720201864263e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  95%|█████████▌| 951/1000 [00:02<00:00, 373.87it/s]\n",
      " Mean performance on train set: 6.819058\n",
      "With standard deviation: 1.410085\n",
      "\n",
      " Mean performance on test set: 7.249143\n",
      "With standard deviation: 2.655536\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:02<00:00, 414.03it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.193651783291256e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.19984276961351e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.0689487149937185e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.8956869823870564e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.790887064559792e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 10000.0 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.01269268989563 seconds ---\n",
      "[[4.00130000e+04 1.40000000e+01 4.00000000e+00 ... 2.00000000e+01\n",
      "  2.00000000e+01 2.00000000e+01]\n",
      " [1.40000000e+01 8.00200000e+04 4.00000000e+00 ... 2.00000000e+01\n",
      "  2.00000000e+01 2.00000000e+01]\n",
      " [4.00000000e+00 4.00000000e+00 4.00130000e+04 ... 4.00290000e+04\n",
      "  4.00290000e+04 4.00290000e+04]\n",
      " ...\n",
      " [2.00000000e+01 2.00000000e+01 4.00290000e+04 ... 7.20148036e+09\n",
      "  7.20148036e+09 1.48036500e+06]\n",
      " [2.00000000e+01 2.00000000e+01 4.00290000e+04 ... 7.20148036e+09\n",
      "  7.20148036e+09 1.48036500e+06]\n",
      " [2.00000000e+01 2.00000000e+01 4.00290000e+04 ... 1.48036500e+06\n",
      "  1.48036500e+06 2.02036500e+06]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  11%|█▏        | 114/1000 [00:00<00:02, 303.84it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.6978549111114387e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.1828172674052679e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.547017114313022e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.990786470945978e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.8300974250606965e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.727582936838558e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  21%|██        | 208/1000 [00:00<00:02, 342.60it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.569354559683504e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.885865920757663e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.006883677471783e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.2491482969368813e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.596699463334369e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.74024827114128e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.0002891123411383e-16 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  31%|███       | 311/1000 [00:00<00:01, 371.07it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.478112292477647e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.3626069490970097e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.751107853461428e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.007160521891646e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.592912372477283e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  41%|████▏     | 414/1000 [00:01<00:01, 394.40it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.286966904954778e-19 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.330065717080935e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.0639972759819077e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.3250852692883386e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.32507703774876e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.514317701906229e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  51%|█████▏    | 514/1000 [00:01<00:01, 411.17it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.5186106207732215e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.2309907116861648e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.582391203608073e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.638503426307468e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.0580872068659216e-16 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  62%|██████▏   | 615/1000 [00:01<00:00, 424.96it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.633316922861427e-19 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.253166879599146e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.4688155478710103e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.3252803222906435e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.713726552669558e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.934042177466841e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.468592067289146e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  72%|███████▏  | 716/1000 [00:01<00:00, 433.84it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.66227030386163e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.5342528466878185e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.620745355332433e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.5797394734563764e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.109079490079661e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.548426603146641e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.0484899604694826e-16 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  82%|████████▏ | 816/1000 [00:01<00:00, 439.46it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.080827240476694e-20 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.8279322282295696e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.0410721959495632e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.343375151645726e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.351177509861134e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.370583478449445e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  92%|█████████▏| 916/1000 [00:02<00:00, 437.07it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.3677978521118296e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.0227997187914302e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.557088603475233e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.657645350184021e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.990628121216557e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  96%|█████████▌| 962/1000 [00:02<00:00, 393.51it/s]\n",
      " Mean performance on train set: 6.934306\n",
      "With standard deviation: 1.384412\n",
      "\n",
      " Mean performance on test set: 7.081832\n",
      "With standard deviation: 2.624800\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:02<00:00, 420.16it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.2964047050969517e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.089708488833387e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.3234351109582e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.293818265362604e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.44555950404844e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 100000.0 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 35.835275411605835 seconds ---\n",
      "[[4.0001300e+05 1.4000000e+01 4.0000000e+00 ... 2.0000000e+01\n",
      "  2.0000000e+01 2.0000000e+01]\n",
      " [1.4000000e+01 8.0002000e+05 4.0000000e+00 ... 2.0000000e+01\n",
      "  2.0000000e+01 2.0000000e+01]\n",
      " [4.0000000e+00 4.0000000e+00 4.0001300e+05 ... 4.0002900e+05\n",
      "  4.0002900e+05 4.0002900e+05]\n",
      " ...\n",
      " [2.0000000e+01 2.0000000e+01 4.0002900e+05 ... 7.2001480e+11\n",
      "  7.2001480e+11 1.4800365e+07]\n",
      " [2.0000000e+01 2.0000000e+01 4.0002900e+05 ... 7.2001480e+11\n",
      "  7.2001480e+11 1.4800365e+07]\n",
      " [2.0000000e+01 2.0000000e+01 4.0002900e+05 ... 1.4800365e+07\n",
      "  1.4800365e+07 2.0200365e+07]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  13%|█▎        | 126/1000 [00:00<00:03, 261.95it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.0191112815027622e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.232307074954237e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.097885039345644e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.727869526025791e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  21%|██        | 208/1000 [00:00<00:03, 262.44it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.2411064955279154e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.149899322677468e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.642478117522784e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  30%|███       | 305/1000 [00:01<00:02, 265.15it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.785067039039337e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.225934530879337e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.562790184640486e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  41%|████▏     | 414/1000 [00:01<00:01, 297.05it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.135758789917749e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.564182826681079e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.542436590136228e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  50%|█████     | 500/1000 [00:01<00:01, 319.27it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.195315905739342e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.379873880613873e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.630975349505465e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.518071272961898e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  61%|██████▏   | 613/1000 [00:02<00:01, 303.76it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.9460047081015216e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.839254463570563e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.318583704180543e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  73%|███████▎  | 728/1000 [00:02<00:00, 300.34it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.3984244112232524e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.3291156014339405e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.707621088224988e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.0690013288979288e-16 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  81%|████████▏ | 813/1000 [00:02<00:00, 321.97it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.315773170165585e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.138544398203078e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.386508127676171e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  89%|████████▉ | 891/1000 [00:02<00:00, 317.18it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.6842499515474312e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.528434456947986e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.856433851414765e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  96%|█████████▌| 957/1000 [00:03<00:00, 259.36it/s]\n",
      " Mean performance on train set: 9.394995\n",
      "With standard deviation: 1.047066\n",
      "\n",
      " Mean performance on test set: 8.237631\n",
      "With standard deviation: 3.665300\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:03<00:00, 299.25it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 1000000.0 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.056791553686018e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.644703618966645e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.15242050721053e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.77732253074646 seconds ---\n",
      "[[4.00001300e+06 1.40000000e+01 4.00000000e+00 ... 2.00000000e+01\n",
      "  2.00000000e+01 2.00000000e+01]\n",
      " [1.40000000e+01 8.00002000e+06 4.00000000e+00 ... 2.00000000e+01\n",
      "  2.00000000e+01 2.00000000e+01]\n",
      " [4.00000000e+00 4.00000000e+00 4.00001300e+06 ... 4.00002900e+06\n",
      "  4.00002900e+06 4.00002900e+06]\n",
      " ...\n",
      " [2.00000000e+01 2.00000000e+01 4.00002900e+06 ... 7.20001480e+13\n",
      "  7.20001480e+13 1.48000365e+08]\n",
      " [2.00000000e+01 2.00000000e+01 4.00002900e+06 ... 7.20001480e+13\n",
      "  7.20001480e+13 1.48000365e+08]\n",
      " [2.00000000e+01 2.00000000e+01 4.00002900e+06 ... 1.48000365e+08\n",
      "  1.48000365e+08 2.02000365e+08]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  14%|█▎        | 135/1000 [00:00<00:03, 253.06it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.741195162637844e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.5965964498458038e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.983361443347492e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.7922291165206923e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.685526054240851e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  23%|██▎       | 230/1000 [00:00<00:02, 265.75it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.6848871984797616e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.8811603375005575e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.7514073450053307e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.5976314128410034e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.790988115471154e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.477178586927344e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.035215871851048e-16 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  33%|███▎      | 332/1000 [00:01<00:02, 277.35it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.287317576627726e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.886325173924881e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.8372812242318245e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.523017625167697e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.309735186090854e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  43%|████▎     | 431/1000 [00:01<00:02, 258.66it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.2092887442597021e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.444285941342485e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.6650957319224102e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.778343353100153e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.067496740668901e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.832366528737191e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  53%|█████▎    | 534/1000 [00:01<00:01, 252.20it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.2368084459111367e-19 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.625050966790768e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.786992563738048e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.5350081600164477e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.2823286559994256e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.880362578796432e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.1100444346816681e-16 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  64%|██████▎   | 637/1000 [00:02<00:01, 260.77it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.1335408080135885e-20 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.4688002952482946e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.6678722631357644e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.288251804550535e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.895017980474164e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  74%|███████▍  | 741/1000 [00:02<00:00, 276.66it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.209157188853246e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.4519382674684447e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.5748326244710203e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.852436562697074e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.536506069365062e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.969036612017947e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  81%|████████▏ | 813/1000 [00:02<00:00, 297.62it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.309383987394578e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.565067260805818e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.516194197490843e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.041064934861363e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.499601220689098e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.051151158798192e-16 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  92%|█████████▏| 915/1000 [00:03<00:00, 298.37it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.7472428919435347e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.703770718809819e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.2818242346374262e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.102554831016506e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.599188283622467e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.0647003359802031e-16 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  98%|█████████▊| 977/1000 [00:03<00:00, 278.57it/s]\n",
      " Mean performance on train set: 9.635245\n",
      "With standard deviation: 0.687560\n",
      "\n",
      " Mean performance on test set: 8.529828\n",
      "With standard deviation: 3.580591\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:03<00:00, 284.18it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 10000000.0 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.502409510736216e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.0439081147173944e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.4602149061556115e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.9479003259500843e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.34621741763787e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.0245542507930726e-16 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.46095633506775 seconds ---\n",
      "[[4.00000130e+07 1.40000000e+01 4.00000000e+00 ... 2.00000000e+01\n",
      "  2.00000000e+01 2.00000000e+01]\n",
      " [1.40000000e+01 8.00000200e+07 4.00000000e+00 ... 2.00000000e+01\n",
      "  2.00000000e+01 2.00000000e+01]\n",
      " [4.00000000e+00 4.00000000e+00 4.00000130e+07 ... 4.00000290e+07\n",
      "  4.00000290e+07 4.00000290e+07]\n",
      " ...\n",
      " [2.00000000e+01 2.00000000e+01 4.00000290e+07 ... 7.20000148e+15\n",
      "  7.20000148e+15 1.48000036e+09]\n",
      " [2.00000000e+01 2.00000000e+01 4.00000290e+07 ... 7.20000148e+15\n",
      "  7.20000148e+15 1.48000036e+09]\n",
      " [2.00000000e+01 2.00000000e+01 4.00000290e+07 ... 1.48000036e+09\n",
      "  1.48000036e+09 2.02000036e+09]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  12%|█▏        | 122/1000 [00:00<00:03, 231.16it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.200122265640733e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.627297027618617e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.893611596005168e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.1052758523976415e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.158312302718829e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.675650470006637e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  23%|██▎       | 227/1000 [00:00<00:03, 253.57it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.2230286797750079e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.0790289882373515e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.6170735381557016e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.90989130271085e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.4735492461286675e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.544548737558878e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  34%|███▍      | 344/1000 [00:01<00:02, 274.36it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.0569387542185164e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.8929851773550792e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.762490810329375e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.031994076021703e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.380795983197089e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  44%|████▎     | 437/1000 [00:01<00:02, 281.37it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.159845331824398e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.592173545119868e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.0031182975801337e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.315102488294594e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.427690586128571e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.36815306216013e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  52%|█████▎    | 525/1000 [00:01<00:01, 277.96it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.096509347533013e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.2037051514926243e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.641239932076709e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.911654384898199e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.195245830759744e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  61%|██████    | 606/1000 [00:02<00:01, 236.45it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.179739003035368e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.121167134816686e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 2.201750997217992e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.6143396276266097e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.876412427833992e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 8.158416120381036e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  73%|███████▎  | 727/1000 [00:02<00:01, 211.65it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.355737066205781e-20 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 6.778261189640049e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.992328403436096e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.166526583123927e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.566565138343654e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.272056103177315e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  82%|████████▏ | 822/1000 [00:03<00:00, 223.94it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.2435735437353417e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.471379508084743e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.686971341479104e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.827108937015577e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  93%|█████████▎| 931/1000 [00:03<00:00, 255.06it/s]"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.2357280081107672e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.559072238694825e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.45488311322705e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.6616151717441874e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.807701664283496e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "calculate performance:  98%|█████████▊| 983/1000 [00:04<00:00, 220.81it/s]\n",
      " Mean performance on train set: 11.059074\n",
      "With standard deviation: 1.323635\n",
      "\n",
      " Mean performance on test set: 10.964175\n",
      "With standard deviation: 3.358726\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:04<00:00, 242.35it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 100000000.0 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 9.749823872976888e-19 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 5.347208969568296e-18 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 1.9981807042259307e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 3.298232968104139e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 4.391381083354749e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n",
      "/home/ljia/.local/lib/python3.5/site-packages/scipy/linalg/basic.py:40: RuntimeWarning: scipy.linalg.solve\n",
      "Ill-conditioned matrix detected. Result is not guaranteed to be accurate.\n",
      "Reciprocal condition number/precision: 7.328796748008544e-17 / 1.1102230246251565e-16\n",
      "  RuntimeWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.91001057624817 seconds ---\n",
      "[[4.00000013e+08 1.40000000e+01 4.00000000e+00 ... 2.00000000e+01\n",
      "  2.00000000e+01 2.00000000e+01]\n",
      " [1.40000000e+01 8.00000020e+08 4.00000000e+00 ... 2.00000000e+01\n",
      "  2.00000000e+01 2.00000000e+01]\n",
      " [4.00000000e+00 4.00000000e+00 4.00000013e+08 ... 4.00000029e+08\n",
      "  4.00000029e+08 4.00000029e+08]\n",
      " ...\n",
      " [2.00000000e+01 2.00000000e+01 4.00000029e+08 ... 7.20000015e+17\n",
      "  7.20000015e+17 1.48000004e+10]\n",
      " [2.00000000e+01 2.00000000e+01 4.00000029e+08 ... 7.20000015e+17\n",
      "  7.20000015e+17 1.48000004e+10]\n",
      " [2.00000000e+01 2.00000000e+01 4.00000029e+08 ... 1.48000004e+10\n",
      "  1.48000004e+10 2.02000004e+10]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  99%|█████████▉| 992/1000 [00:03<00:00, 267.91it/s]\n",
      " Mean performance on train set: 66.147687\n",
      "With standard deviation: 11.979989\n",
      "\n",
      " Mean performance on test set: 63.221208\n",
      "With standard deviation: 13.381090\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:03<00:00, 252.05it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 1000000000.0 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 38.43676400184631 seconds ---\n",
      "[[4.00000001e+09 1.40000000e+01 4.00000000e+00 ... 2.00000000e+01\n",
      "  2.00000000e+01 2.00000000e+01]\n",
      " [1.40000000e+01 8.00000002e+09 4.00000000e+00 ... 2.00000000e+01\n",
      "  2.00000000e+01 2.00000000e+01]\n",
      " [4.00000000e+00 4.00000000e+00 4.00000001e+09 ... 4.00000003e+09\n",
      "  4.00000003e+09 4.00000003e+09]\n",
      " ...\n",
      " [2.00000000e+01 2.00000000e+01 4.00000003e+09 ... 7.20000001e+19\n",
      "  7.20000001e+19 1.48000000e+11]\n",
      " [2.00000000e+01 2.00000000e+01 4.00000003e+09 ... 7.20000001e+19\n",
      "  7.20000001e+19 1.48000000e+11]\n",
      " [2.00000000e+01 2.00000000e+01 4.00000003e+09 ... 1.48000000e+11\n",
      "  1.48000000e+11 2.02000000e+11]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance:  98%|█████████▊| 976/1000 [00:04<00:00, 268.70it/s]\n",
      " Mean performance on train set: 96.664827\n",
      "With standard deviation: 1.871320\n",
      "\n",
      " Mean performance on test set: 100.134704\n",
      "With standard deviation: 13.845906\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:04<00:00, 236.90it/s]\n",
      "\n",
      "\n",
      " #--- calculating kernel matrix when lmda = 10000000000.0 ---#\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 185 built in 37.32151246070862 seconds ---\n",
      "[[4.00e+10 1.40e+01 4.00e+00 ... 2.00e+01 2.00e+01 2.00e+01]\n",
      " [1.40e+01 8.00e+10 4.00e+00 ... 2.00e+01 2.00e+01 2.00e+01]\n",
      " [4.00e+00 4.00e+00 4.00e+10 ... 4.00e+10 4.00e+10 4.00e+10]\n",
      " ...\n",
      " [2.00e+01 2.00e+01 4.00e+10 ... 7.20e+21 7.20e+21 1.48e+12]\n",
      " [2.00e+01 2.00e+01 4.00e+10 ... 7.20e+21 7.20e+21 1.48e+12]\n",
      " [2.00e+01 2.00e+01 4.00e+10 ... 1.48e+12 1.48e+12 2.02e+12]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance: 100%|█████████▉| 997/1000 [00:03<00:00, 268.42it/s]\n",
      " Mean performance on train set: 98.175092\n",
      "With standard deviation: 4.720613\n",
      "\n",
      " Mean performance on test set: 100.144883\n",
      "With standard deviation: 13.958659\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:03<00:00, 260.49it/s]\n",
      "\n",
      "\n",
      "       lmda    rmse_test    std_test    rmse_train    std_train    k_time\n",
      "-----------  -----------  ----------  ------------  -----------  --------\n",
      "     1e-10       7.4649      1.71858       5.99354     0.356922   37.3696\n",
      "     1e-09       7.37511     1.76925       5.96304     0.374107   37.4747\n",
      "     1e-08       7.35069     1.78056       5.96511     0.378249   37.3297\n",
      "     1e-07       7.351       1.78147       5.96698     0.382093   37.7415\n",
      "     1e-06       7.35123     1.78052       5.96976     0.386318   37.5213\n",
      "     1e-05       7.34813     1.78029       5.97056     0.390719   37.671\n",
      "     0.0001      7.34984     1.7811        5.9425      0.331983   36.8013\n",
      "     0.001       7.35775     1.78098       5.9334      0.324965   35.8681\n",
      "     0.01        7.37427     1.79115       5.94069     0.347431   36.0018\n",
      "     0.1         7.3293      1.91363       6.42711     1.29367    36.3715\n",
      "     1           7.27134     2.20774       6.62425     1.2242     37.8397\n",
      "    10           7.49787     2.36815       6.81697     1.50182    37.5082\n",
      "   100           7.42887     2.64789       6.68766     1.34809    37.0946\n",
      "  1000           7.24914     2.65554       6.81906     1.41008    37.5171\n",
      " 10000           7.08183     2.6248        6.93431     1.38441    37.0127\n",
      "100000           8.23763     3.6653        9.395       1.04707    35.8353\n",
      "     1e+06       8.52983     3.58059       9.63525     0.68756    37.7773\n",
      "     1e+07      10.9642      3.35873      11.0591      1.32363    37.461\n",
      "     1e+08      63.2212     13.3811       66.1477     11.98       37.91\n",
      "     1e+09     100.135      13.8459       96.6648      1.87132    38.4368\n",
      "     1e+10     100.145      13.9587       98.1751      4.72061    37.3215\n"
     ]
    }
   ],
   "source": [
    "# tree pattern kernel, dataset acyclic.\n",
    "%load_ext line_profiler\n",
    "\n",
    "import sys\n",
    "sys.path.insert(0, \"../\")\n",
    "from pygraph.utils.utils import kernel_train_test\n",
    "from pygraph.kernels.treePatternKernel import treepatternkernel\n",
    "\n",
    "import numpy as np\n",
    "\n",
    "datafile = '../../../../datasets/acyclic/Acyclic/dataset_bps.ds'\n",
    "kernel_file_path = 'kernelmatrices_path_acyclic/'\n",
    "\n",
    "\n",
    "kernel_para = dict(node_label = 'atom', edge_label = 'bond_type', labeled = True, \\\n",
    "    kernel_type = 'untiln', h = 2)\n",
    "\n",
    "kernel_train_test(datafile, kernel_file_path, treepatternkernel, kernel_para, \\\n",
    "    hyper_name = 'lmda', hyper_range = np.logspace(-10, 10, num = 21, base = 10), \\\n",
    "    normalize = False, model_type = 'regression')\n",
    "\n",
    "# kernel_para['depth'] = 10\n",
    "# %lprun -f untildpathkernel \\\n",
    "#     kernel_train_test(datafile, kernel_file_path, untildpathkernel, kernel_para, normalize = False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# results\n",
    "\n",
    "# untiln kernel when h = 2\n",
    "       lmda    rmse_test    std_test    rmse_train    std_train    k_time\n",
    "-----------  -----------  ----------  ------------  -----------  --------\n",
    "     1e-10       7.46524     1.71862       5.99486     0.356634   38.1447\n",
    "     1e-09       7.37326     1.77195       5.96155     0.374395   37.4921\n",
    "     1e-08       7.35105     1.78349       5.96481     0.378047   37.9971\n",
    "     1e-07       7.35213     1.77903       5.96728     0.382251   38.3182\n",
    "     1e-06       7.3524      1.77992       5.9696      0.3863     39.6428\n",
    "     1e-05       7.34958     1.78141       5.97114     0.39017    37.3711\n",
    "     0.0001      7.3513      1.78136       5.94251     0.331843   37.3967\n",
    "     0.001       7.35822     1.78119       5.9326      0.32534    36.7357\n",
    "     0.01        7.37552     1.79037       5.94089     0.34763    36.8864\n",
    "     0.1         7.32951     1.91346       6.42634     1.29405    36.8382\n",
    "     1           7.27134     2.20774       6.62425     1.2242     37.2425\n",
    "    10           7.49787     2.36815       6.81697     1.50182    37.8286\n",
    "   100           7.42887     2.64789       6.68766     1.34809    36.3701\n",
    "  1000           7.24914     2.65554       6.81906     1.41008    36.1695\n",
    " 10000           7.08183     2.6248        6.93431     1.38441    37.5723\n",
    "100000           8.021       3.43694       8.69813     0.909839   37.8158\n",
    "     1e+06       8.49625     3.6332        9.59333     0.96626    38.4688\n",
    "     1e+07      10.9067      3.17593      11.5642      2.07792    36.9926\n",
    "     1e+08      61.1524     10.4355       65.3527     13.9538     37.1321\n",
    "     1e+09      99.943      13.6994       98.8848      5.27014    36.7443\n",
    "     1e+10     100.083      13.8503       97.9168      3.22768    37.096\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The line_profiler extension is already loaded. To reload it, use:\n",
      "  %reload_ext line_profiler\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 14408 characters]\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f6be3d4a8d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[(0, {'atom': 'C', 'label': 'C'}), (1, {'atom': 'C', 'label': 'C'}), (2, {'atom': 'C', 'label': 'C'}), (3, {'atom': 'C', 'label': 'C'}), (4, {'atom': 'S', 'label': 'S'})]\n",
      "\n",
      " --- kernel matrix of tree pattern kernel of size 39 built in 3.5270774364471436 seconds ---\n",
      "(array([[1.99007809e+036, 4.00000000e+000, 4.00000000e+000, ...,\n",
      "        1.00000000e+001, 1.00000000e+001, 1.00000000e+001],\n",
      "       [4.00000000e+000, 6.37886713e+019, 4.34000000e+002, ...,\n",
      "        6.37886713e+019, 6.37886713e+019, 6.37886713e+019],\n",
      "       [4.00000000e+000, 4.34000000e+002, 1.99007809e+036, ...,\n",
      "        4.40000000e+002, 4.40000000e+002, 4.40000000e+002],\n",
      "       ...,\n",
      "       [1.00000000e+001, 6.37886713e+019, 4.40000000e+002, ...,\n",
      "        2.94561201e+119, 1.16903692e+080, 4.42354433e+082],\n",
      "       [1.00000000e+001, 6.37886713e+019, 4.40000000e+002, ...,\n",
      "        1.16903692e+080, 4.21212139e+264, 1.66634383e+080],\n",
      "       [1.00000000e+001, 6.37886713e+019, 4.40000000e+002, ...,\n",
      "        4.42354433e+082, 1.66634383e+080, 5.17763068e+117]]), 3.5270774364471436)\n"
     ]
    }
   ],
   "source": [
    "%load_ext line_profiler\n",
    "\n",
    "import networkx as nx\n",
    "import matplotlib.pyplot as plt\n",
    "import sys\n",
    "sys.path.insert(0, \"../\")\n",
    "from pygraph.utils.graphfiles import loadDataset\n",
    "from pygraph.utils.utils import kernel_train_test\n",
    "\n",
    "from pygraph.kernels.treePatternKernel import treepatternkernel, _treepatternkernel_do\n",
    "\n",
    "import numpy as np\n",
    "\n",
    "datafile = '../../../../datasets/acyclic/Acyclic/dataset_bps.ds'\n",
    "\n",
    "dataset, y = loadDataset(datafile)\n",
    "G1 = dataset[100]\n",
    "G2 = dataset[20]\n",
    "data = [G1, G2]\n",
    "# nx.draw_networkx(G1)\n",
    "# plt.show()\n",
    "# print(G1.nodes(data=True)20\n",
    "nx.draw_networkx(G2)\n",
    "plt.show()\n",
    "print(G2.nodes(data=True))\n",
    "\n",
    "\n",
    "%lprun -f _treepatternkernel_do \\\n",
    "    kernel = treepatternkernel(dataset[1:40], node_label = 'atom', edge_label = 'bond_type', labeled = True, \\\n",
    "    kernel_type = 'untiln', lmda = 1, h = 10)\n",
    "\n",
    "print(kernel)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " --- This is a classification problem ---\n",
      "\n",
      "\n",
      " Loading dataset from file...\n",
      "\n",
      " Calculating kernel matrix, this could take a while...\n",
      "retrieve patterns: 100%|██████████| 185/185 [00:00<00:00, 2064.69it/s]\n",
      "calculate kernels: 100%|██████████| 185/185 [00:00<00:00, 11170.00it/s]\n",
      "\n",
      " --- kernel matrix of cyclic pattern kernel of size 185 built in 0.10836505889892578 seconds ---\n",
      "[[0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " ...\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]]\n",
      "\n",
      " Starting calculate accuracy/rmse...\n",
      "calculate performance: 100%|██████████| 1000/1000 [00:24<00:00, 36.41it/s]\n",
      " Mean performance on train set: 0.018072\n",
      "With standard deviation: 0.000000\n",
      "\n",
      " Mean performance on test set: 0.000000\n",
      "With standard deviation: 0.000000\n",
      "\n",
      "\n",
      "  accur_test    std_test    accur_train    std_train    k_time\n",
      "------------  ----------  -------------  -----------  --------\n",
      "           0           0      0.0180723            0  0.108365\n"
     ]
    }
   ],
   "source": [
    "%load_ext line_profiler\n",
    "\n",
    "import sys\n",
    "sys.path.insert(0, \"../\")\n",
    "from pygraph.utils.utils import kernel_train_test\n",
    "from pygraph.kernels.cyclicPatternKernel import cyclicpatternkernel\n",
    "\n",
    "import numpy as np\n",
    "\n",
    "datafile = '../../../../datasets/acyclic/Acyclic/dataset_bps.ds'\n",
    "kernel_file_path = 'kernelmatrices_path_acyclic/'\n",
    "\n",
    "kernel_para = dict(node_label = 'atom', edge_label = 'bond_type', labeled = True, cycle_bound = 200)\n",
    "\n",
    "# kernel_train_test(datafile, kernel_file_path, treeletkernel, kernel_para, normalize = False)\n",
    "\n",
    "kernel_train_test(datafile, kernel_file_path, cyclicpatternkernel, kernel_para, \\\n",
    "    normalize = False , model_type = 'classification')\n",
    "\n",
    "# kernel_para['k_func'] = 'minmax'\n",
    "# kernel_train_test(datafile, kernel_file_path, untildpathkernel, kernel_para, \\\n",
    "#     hyper_name = 'depth', hyper_range = np.linspace(0, 10, 11), normalize = True)\n",
    "# kernel_train_test(datafile, kernel_file_path, untildpathkernel, kernel_para, \\\n",
    "#     hyper_name = 'depth', hyper_range = np.linspace(0, 10, 11), normalize = False)\n",
    "# # kernel_train_test(datafile, kernel_file_path, untildpathkernel, kernel_para, normalize = False)\n",
    "\n",
    "# kernel_para['depth'] = 10\n",
    "# %lprun -f untildpathkernel \\\n",
    "#     kernel_train_test(datafile, kernel_file_path, untildpathkernel, kernel_para, normalize = False)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "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.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
