mirea-projects/Third term/Artificial intelligence systems and big data/5.ipynb

1434 lines
235 KiB
Plaintext
Raw Normal View History

2024-09-23 23:22:33 +00:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Рабочая тетрадь No 5"
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 1,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"from sklearn import tree, metrics\n",
"from sklearn.tree import DecisionTreeRegressor\n",
"from sklearn.tree import DecisionTreeClassifier\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.metrics import classification_report, confusion_matrix"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1.2.3 Задание\n",
"\n",
"Создайте класс по работе с тригонометрическими функциями. В классе \n",
"должны быть реализованы функции вычисления: \n",
"- косинуса; \n",
"- синуса; \n",
"- тангенса; \n",
"- арксинуса; \n",
"- арккосинуса; \n",
"- арктангенса; \n",
"- перевода из градусов в радианы."
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 2,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [],
"source": [
"class TrigFunctions:\n",
" def __init__(self, precision=10):\n",
" # Константа для pi\n",
" self.pi = 3.141592653589793\n",
" # Переменная точности для вычислений\n",
" self.precision = precision\n",
"\n",
" # Факториал для ряда Тейлора\n",
" def factorial(self, n):\n",
" result = 1\n",
" for i in range(2, n + 1):\n",
" result *= i\n",
" return result\n",
"\n",
" # Приближенное вычисление синуса с помощью ряда Тейлора\n",
" def sin(self, angle_radians):\n",
" sin_approx = 0\n",
" \n",
" for n in range(self.precision):\n",
" sign = (-1) ** n\n",
" term = (angle_radians ** (2 * n + 1)) / self.factorial(2 * n + 1)\n",
" sin_approx += sign * term\n",
" \n",
" return sin_approx\n",
"\n",
" # Приближенное вычисление косинуса с помощью ряда Тейлора\n",
" def cos(self, angle_radians):\n",
" cos_approx = 0\n",
" \n",
" for n in range(self.precision):\n",
" sign = (-1) ** n\n",
" term = (angle_radians ** (2 * n)) / self.factorial(2 * n)\n",
" cos_approx += sign * term\n",
" \n",
" return cos_approx\n",
"\n",
" # Приближенное вычисление тангенса как sin/cos\n",
" def tan(self, angle_radians):\n",
" return self.sin(angle_radians) / self.cos(angle_radians)\n",
"\n",
" # Приближенное вычисление арксинуса с использованием метода Ньютона\n",
" def arcsin(self, value):\n",
" if value < -1 or value > 1:\n",
" return None # Арксинус определен только на отрезке [-1, 1]\n",
" \n",
" x = value\n",
" \n",
" for _ in range(self.precision):\n",
" x -= (self.sin(x) - value) / self.cos(x)\n",
" \n",
" return x\n",
"\n",
" # Арккосинус как pi/2 - арксинус\n",
" def arccos(self, value):\n",
" return self.pi / 2 - self.arcsin(value)\n",
"\n",
" # Приближенное вычисление арктангенса с использованием метода Ньютона\n",
" def arctan(self, value):\n",
" x = value\n",
" \n",
" for _ in range(self.precision):\n",
" x -= (self.tan(x) - value) / (1 + value ** 2)\n",
" \n",
" return x"
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 3,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Угол (рад): 0.7853981633974483\n",
"sin: 0.7071067811865475\n",
"cos: 0.7071067811865475\n",
"tan: 1.0\n",
"arcsin (рад): 0.7853981633974483\n",
"arccos (рад): 0.7853981633974483\n",
"arctan (рад): 0.7853981633974483\n"
]
}
],
"source": [
"trig_functions = TrigFunctions(precision=10)\n",
"\n",
"angle = 3.141592653589793 / 4 # pi/4 радиан (45 градусов)\n",
"\n",
"sin_value = trig_functions.sin(angle)\n",
"cos_value = trig_functions.cos(angle)\n",
"tan_value = trig_functions.tan(angle)\n",
"arcsin_value = trig_functions.arcsin(sin_value)\n",
"arccos_value = trig_functions.arccos(cos_value)\n",
"arctan_value = trig_functions.arctan(tan_value)\n",
"\n",
"print(\"Угол (рад):\", angle)\n",
"print(\"sin:\", sin_value)\n",
"print(\"cos:\", cos_value)\n",
"print(\"tan:\", tan_value)\n",
"print(\"arcsin (рад):\", arcsin_value)\n",
"print(\"arccos (рад):\", arccos_value)\n",
"print(\"arctan (рад):\", arctan_value)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1.2.2 Задание 1\n",
"\n",
"Представьте дерево показанное на рисунке с использованием списка из \n",
"списков. Выведите на печать корень дерева, а также его левое и правое \n",
"поддеревья."
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 4,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Корень: a\n",
"Левое поддерево: ['b', ['d', []], ['e', []]]\n",
"Правое поддерево: ['c', ['f', []]]\n"
]
}
],
"source": [
"tr = ['a', ['b', ['d', []], ['e', []]], ['c', ['f', []]]]\n",
"\n",
"print(f\"Корень: {tr[0]}\")\n",
"print(f\"Левое поддерево: {tr[1]}\")\n",
"print(f\"Правое поддерево: {tr[2]}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1.2.2 Задание 2\n",
"\n",
"Дан класс, описывающий бинарное дерево. \n",
"\n",
"\n",
"```python\n",
"class Tree: \n",
" def __init__(self, data): \n",
" self.left = None \n",
" self.right = None \n",
" self.data = data \n",
" def PrintTree(self): \n",
" print(self.data) \n",
"```\n",
"Реализуйте в классе функцию для вставки нового элемента в дерево по \n",
"следующим правилам: \n",
" \n",
"- Левое поддерево узла содержит только узлы со значениями меньше, \n",
"чем значение в узле. \n",
"- Правое поддерево узла содержит только узлы со значениями меньше, \n",
"чем значение в узле. \n",
"- Каждое из левого и правого поддеревьев также должно быть \n",
"бинарным деревом поиска. \n",
"- Не должно быть повторяющихся узлов. \n",
"\n",
"Метод вставки сравнивает значение узла с родительским узлом и решает \n",
"куда доваить элемент (в левое или правое поддерево). Перепишите, метод \n",
"PrintTree для печати полной версии дерева."
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 5,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [],
"source": [
"class BinaryTree: \n",
" def __init__(self, data): \n",
" self.left = None \n",
" self.right = None \n",
" self.data = data\n",
"\n",
" def insert(self, data):\n",
" if data < self.data:\n",
" if self.left is None:\n",
" self.left = BinaryTree(data)\n",
" else:\n",
" self.left.insert(data)\n",
" elif data > self.data:\n",
" if self.right is None:\n",
" self.right = BinaryTree(data)\n",
" else:\n",
" self.right.insert(data)\n",
"\n",
" def Print(self, level=0):\n",
" if self.right:\n",
" self.right.Print(level + 1)\n",
" \n",
" print(' ' * 4 * level + '->', self.data)\n",
" if self.left:\n",
" self.left.Print(level + 1) "
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 18,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" -> 17\n",
" -> 15\n",
" -> 12\n",
"-> 10\n",
" -> 7\n",
" -> 5\n",
2024-09-27 05:31:03 +00:00
" -> 3\n",
" -> 1\n"
2024-09-23 23:22:33 +00:00
]
}
],
"source": [
"root = BinaryTree(10)\n",
"root.insert(5)\n",
2024-09-27 05:31:03 +00:00
"root.insert(1)\n",
2024-09-23 23:22:33 +00:00
"root.insert(15)\n",
2024-09-27 05:31:03 +00:00
"root.insert(7)\n",
2024-09-23 23:22:33 +00:00
"root.insert(3)\n",
"root.insert(7)\n",
"root.insert(12)\n",
"root.insert(17)\n",
"\n",
"root.Print()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1.3.1 Задание\n",
"\n",
"Постройте классификатор на основе дерева принятия решений следующего датасета:\n",
"\n",
"```python\n",
"X = np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1], [2, 1], [3, 2]])\n",
"target = [0, 0, 0, 1, 1, 1]\n",
"```"
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 7,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [],
"source": [
"ds = pd.DataFrame(np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1], [2, 1], [3, 2]]))\n",
"target = [0, 0, 0, 1, 1, 1]"
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 8,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [],
"source": [
"x_train, x_test, y_train, y_test = train_test_split(ds, target, test_size=0.2)"
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 9,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2024-09-27 05:31:03 +00:00
"[Text(0.5, 0.75, 'x[1] <= 0.0\\ngini = 0.375\\nsamples = 4\\nvalue = [3, 1]'),\n",
" Text(0.25, 0.25, 'gini = 0.0\\nsamples = 3\\nvalue = [3, 0]'),\n",
2024-09-23 23:22:33 +00:00
" Text(0.375, 0.5, 'True '),\n",
2024-09-27 05:31:03 +00:00
" Text(0.75, 0.25, 'gini = 0.0\\nsamples = 1\\nvalue = [0, 1]'),\n",
2024-09-23 23:22:33 +00:00
" Text(0.625, 0.5, ' False')]"
]
},
2024-09-27 05:31:03 +00:00
"execution_count": 9,
2024-09-23 23:22:33 +00:00
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
2024-09-27 05:31:03 +00:00
"image/png": "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
2024-09-23 23:22:33 +00:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"classifier = DecisionTreeClassifier()\n",
"classifier.fit(x_train, y_train)\n",
"\n",
"tree.plot_tree(classifier)"
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 10,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2024-09-27 05:31:03 +00:00
"[1 1]\n",
2024-09-23 23:22:33 +00:00
"[[2]]\n",
" precision recall f1-score support\n",
"\n",
2024-09-27 05:31:03 +00:00
" 1 1.00 1.00 1.00 2\n",
2024-09-23 23:22:33 +00:00
"\n",
" accuracy 1.00 2\n",
" macro avg 1.00 1.00 1.00 2\n",
"weighted avg 1.00 1.00 1.00 2\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
2024-09-27 05:31:03 +00:00
"/home/nktkln/.local/lib/python3.12/site-packages/sklearn/metrics/_classification.py:409: UserWarning: A single label was found in 'y_true' and 'y_pred'. For the confusion matrix to have the correct shape, use the 'labels' parameter to pass all known labels.\n",
2024-09-23 23:22:33 +00:00
" warnings.warn(\n"
]
}
],
"source": [
"y_pred = classifier.predict(x_test)\n",
"\n",
"print(y_pred)\n",
"print(confusion_matrix(y_test, y_pred))\n",
"print(classification_report(y_test, y_pred))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1.4.1 Задание\n",
"\n",
"Задание. Постройте модель регрессии для данных из предыдущей рабочей \n",
"тетради.Для примера можно взять потребления газа (в миллионах \n",
"галлонов) в 48 штатах США или набор данных о качестве красного вина: \n",
"https://raw.githubusercontent.com/likarajo/petrol_consumption/master/data/petrol_consumption.csv \n",
"https://raw.githubusercontent.com/aniruddhachoudhury/Red-Wine-Quality/master/winequality-red.csv \n",
"\n",
"Постройте прогноз. Оцените точность модели."
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 11,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>fixed acidity</th>\n",
" <th>volatile acidity</th>\n",
" <th>citric acid</th>\n",
" <th>residual sugar</th>\n",
" <th>chlorides</th>\n",
" <th>free sulfur dioxide</th>\n",
" <th>total sulfur dioxide</th>\n",
" <th>density</th>\n",
" <th>pH</th>\n",
" <th>sulphates</th>\n",
" <th>alcohol</th>\n",
" <th>quality</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>1599.000000</td>\n",
" <td>1599.000000</td>\n",
" <td>1599.000000</td>\n",
" <td>1599.000000</td>\n",
" <td>1599.000000</td>\n",
" <td>1599.000000</td>\n",
" <td>1599.000000</td>\n",
" <td>1599.000000</td>\n",
" <td>1599.000000</td>\n",
" <td>1599.000000</td>\n",
" <td>1599.000000</td>\n",
" <td>1599.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>8.319637</td>\n",
" <td>0.527821</td>\n",
" <td>0.270976</td>\n",
" <td>2.538806</td>\n",
" <td>0.087467</td>\n",
" <td>15.874922</td>\n",
" <td>46.467792</td>\n",
" <td>0.996747</td>\n",
" <td>3.311113</td>\n",
" <td>0.658149</td>\n",
" <td>10.422983</td>\n",
" <td>5.636023</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>1.741096</td>\n",
" <td>0.179060</td>\n",
" <td>0.194801</td>\n",
" <td>1.409928</td>\n",
" <td>0.047065</td>\n",
" <td>10.460157</td>\n",
" <td>32.895324</td>\n",
" <td>0.001887</td>\n",
" <td>0.154386</td>\n",
" <td>0.169507</td>\n",
" <td>1.065668</td>\n",
" <td>0.807569</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>4.600000</td>\n",
" <td>0.120000</td>\n",
" <td>0.000000</td>\n",
" <td>0.900000</td>\n",
" <td>0.012000</td>\n",
" <td>1.000000</td>\n",
" <td>6.000000</td>\n",
" <td>0.990070</td>\n",
" <td>2.740000</td>\n",
" <td>0.330000</td>\n",
" <td>8.400000</td>\n",
" <td>3.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>7.100000</td>\n",
" <td>0.390000</td>\n",
" <td>0.090000</td>\n",
" <td>1.900000</td>\n",
" <td>0.070000</td>\n",
" <td>7.000000</td>\n",
" <td>22.000000</td>\n",
" <td>0.995600</td>\n",
" <td>3.210000</td>\n",
" <td>0.550000</td>\n",
" <td>9.500000</td>\n",
" <td>5.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>7.900000</td>\n",
" <td>0.520000</td>\n",
" <td>0.260000</td>\n",
" <td>2.200000</td>\n",
" <td>0.079000</td>\n",
" <td>14.000000</td>\n",
" <td>38.000000</td>\n",
" <td>0.996750</td>\n",
" <td>3.310000</td>\n",
" <td>0.620000</td>\n",
" <td>10.200000</td>\n",
" <td>6.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>9.200000</td>\n",
" <td>0.640000</td>\n",
" <td>0.420000</td>\n",
" <td>2.600000</td>\n",
" <td>0.090000</td>\n",
" <td>21.000000</td>\n",
" <td>62.000000</td>\n",
" <td>0.997835</td>\n",
" <td>3.400000</td>\n",
" <td>0.730000</td>\n",
" <td>11.100000</td>\n",
" <td>6.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>15.900000</td>\n",
" <td>1.580000</td>\n",
" <td>1.000000</td>\n",
" <td>15.500000</td>\n",
" <td>0.611000</td>\n",
" <td>72.000000</td>\n",
" <td>289.000000</td>\n",
" <td>1.003690</td>\n",
" <td>4.010000</td>\n",
" <td>2.000000</td>\n",
" <td>14.900000</td>\n",
" <td>8.000000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
2024-09-27 05:31:03 +00:00
" fixed acidity volatile acidity citric acid residual sugar \\\n",
"count 1599.000000 1599.000000 1599.000000 1599.000000 \n",
2024-09-23 23:22:33 +00:00
"mean 8.319637 0.527821 0.270976 2.538806 \n",
"std 1.741096 0.179060 0.194801 1.409928 \n",
"min 4.600000 0.120000 0.000000 0.900000 \n",
"25% 7.100000 0.390000 0.090000 1.900000 \n",
"50% 7.900000 0.520000 0.260000 2.200000 \n",
"75% 9.200000 0.640000 0.420000 2.600000 \n",
"max 15.900000 1.580000 1.000000 15.500000 \n",
"\n",
2024-09-27 05:31:03 +00:00
" chlorides free sulfur dioxide total sulfur dioxide density \\\n",
"count 1599.000000 1599.000000 1599.000000 1599.000000 \n",
2024-09-23 23:22:33 +00:00
"mean 0.087467 15.874922 46.467792 0.996747 \n",
"std 0.047065 10.460157 32.895324 0.001887 \n",
"min 0.012000 1.000000 6.000000 0.990070 \n",
"25% 0.070000 7.000000 22.000000 0.995600 \n",
"50% 0.079000 14.000000 38.000000 0.996750 \n",
"75% 0.090000 21.000000 62.000000 0.997835 \n",
"max 0.611000 72.000000 289.000000 1.003690 \n",
"\n",
" pH sulphates alcohol quality \n",
"count 1599.000000 1599.000000 1599.000000 1599.000000 \n",
"mean 3.311113 0.658149 10.422983 5.636023 \n",
"std 0.154386 0.169507 1.065668 0.807569 \n",
"min 2.740000 0.330000 8.400000 3.000000 \n",
"25% 3.210000 0.550000 9.500000 5.000000 \n",
"50% 3.310000 0.620000 10.200000 6.000000 \n",
"75% 3.400000 0.730000 11.100000 6.000000 \n",
"max 4.010000 2.000000 14.900000 8.000000 "
]
},
2024-09-27 05:31:03 +00:00
"execution_count": 11,
2024-09-23 23:22:33 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url = 'https://raw.githubusercontent.com/aniruddhachoudhury/Red-Wine-Quality/master/winequality-red.csv'\n",
"\n",
"ds = pd.read_csv(url)\n",
"\n",
"ds.describe()"
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 12,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [],
"source": [
"X = ds.iloc[:, :-1].values\n",
"y = ds.iloc[:, -1].values\n",
"\n",
"X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)"
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 13,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2024-09-27 05:31:03 +00:00
"[Text(0.502204871251947, 0.9736842105263158, 'x[10] <= 10.525\\nsquared_error = 0.671\\nsamples = 1279\\nvalue = 5.647'),\n",
" Text(0.21956988658489096, 0.9210526315789473, 'x[9] <= 0.575\\nsquared_error = 0.431\\nsamples = 789\\nvalue = 5.373'),\n",
" Text(0.360887378918419, 0.9473684210526316, 'True '),\n",
" Text(0.10922897196261683, 0.868421052631579, 'x[4] <= 0.251\\nsquared_error = 0.329\\nsamples = 323\\nvalue = 5.164'),\n",
" Text(0.10611370716510904, 0.8157894736842105, 'x[1] <= 0.587\\nsquared_error = 0.316\\nsamples = 322\\nvalue = 5.171'),\n",
" Text(0.07515576323987538, 0.7631578947368421, 'x[10] <= 10.05\\nsquared_error = 0.338\\nsamples = 148\\nvalue = 5.284'),\n",
" Text(0.045171339563862926, 0.7105263157894737, 'x[4] <= 0.08\\nsquared_error = 0.267\\nsamples = 114\\nvalue = 5.175'),\n",
" Text(0.028037383177570093, 0.6578947368421053, 'x[7] <= 0.996\\nsquared_error = 0.38\\nsamples = 58\\nvalue = 5.293'),\n",
" Text(0.01557632398753894, 0.6052631578947368, 'x[8] <= 3.365\\nsquared_error = 0.196\\nsamples = 15\\nvalue = 4.933'),\n",
" Text(0.009345794392523364, 0.5526315789473685, 'x[1] <= 0.44\\nsquared_error = 0.083\\nsamples = 11\\nvalue = 5.091'),\n",
" Text(0.006230529595015576, 0.5, 'x[9] <= 0.46\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 5.5'),\n",
" Text(0.003115264797507788, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.009345794392523364, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.012461059190031152, 0.5, 'squared_error = 0.0\\nsamples = 9\\nvalue = 5.0'),\n",
" Text(0.021806853582554516, 0.5526315789473685, 'x[5] <= 13.5\\nsquared_error = 0.25\\nsamples = 4\\nvalue = 4.5'),\n",
" Text(0.018691588785046728, 0.5, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.024922118380062305, 0.5, 'squared_error = 0.0\\nsamples = 2\\nvalue = 4.0'),\n",
" Text(0.040498442367601244, 0.6052631578947368, 'x[2] <= 0.075\\nsquared_error = 0.383\\nsamples = 43\\nvalue = 5.419'),\n",
" Text(0.03426791277258567, 0.5526315789473685, 'x[1] <= 0.555\\nsquared_error = 0.16\\nsamples = 5\\nvalue = 6.2'),\n",
" Text(0.03115264797507788, 0.5, 'squared_error = 0.0\\nsamples = 4\\nvalue = 6.0'),\n",
" Text(0.037383177570093455, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.04672897196261682, 0.5526315789473685, 'x[8] <= 3.375\\nsquared_error = 0.321\\nsamples = 38\\nvalue = 5.316'),\n",
" Text(0.04361370716510903, 0.5, 'x[4] <= 0.058\\nsquared_error = 0.298\\nsamples = 34\\nvalue = 5.235'),\n",
" Text(0.040498442367601244, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.04672897196261682, 0.4473684210526316, 'x[3] <= 3.9\\nsquared_error = 0.259\\nsamples = 33\\nvalue = 5.273'),\n",
" Text(0.04361370716510903, 0.39473684210526316, 'x[7] <= 1.0\\nsquared_error = 0.215\\nsamples = 32\\nvalue = 5.312'),\n",
" Text(0.040498442367601244, 0.34210526315789475, 'x[7] <= 0.996\\nsquared_error = 0.196\\nsamples = 30\\nvalue = 5.267'),\n",
" Text(0.03426791277258567, 0.2894736842105263, 'x[5] <= 5.5\\nsquared_error = 0.222\\nsamples = 6\\nvalue = 5.667'),\n",
" Text(0.03115264797507788, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.037383177570093455, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 4\\nvalue = 6.0'),\n",
" Text(0.04672897196261682, 0.2894736842105263, 'x[5] <= 5.5\\nsquared_error = 0.139\\nsamples = 24\\nvalue = 5.167'),\n",
" Text(0.04361370716510903, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.04984423676012461, 0.23684210526315788, 'x[0] <= 7.25\\nsquared_error = 0.113\\nsamples = 23\\nvalue = 5.13'),\n",
" Text(0.04672897196261682, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.0529595015576324, 0.18421052631578946, 'x[5] <= 20.5\\nsquared_error = 0.083\\nsamples = 22\\nvalue = 5.091'),\n",
" Text(0.04984423676012461, 0.13157894736842105, 'squared_error = 0.0\\nsamples = 15\\nvalue = 5.0'),\n",
" Text(0.056074766355140186, 0.13157894736842105, 'x[6] <= 117.0\\nsquared_error = 0.204\\nsamples = 7\\nvalue = 5.286'),\n",
" Text(0.0529595015576324, 0.07894736842105263, 'x[7] <= 0.997\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.667'),\n",
" Text(0.04984423676012461, 0.02631578947368421, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.056074766355140186, 0.02631578947368421, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.059190031152647975, 0.07894736842105263, 'squared_error = 0.0\\nsamples = 4\\nvalue = 5.0'),\n",
" Text(0.04672897196261682, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.04984423676012461, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.04984423676012461, 0.5, 'squared_error = 0.0\\nsamples = 4\\nvalue = 6.0'),\n",
" Text(0.06230529595015576, 0.6578947368421053, 'x[6] <= 14.5\\nsquared_error = 0.122\\nsamples = 56\\nvalue = 5.054'),\n",
" Text(0.059190031152647975, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.06542056074766354, 0.6052631578947368, 'x[10] <= 9.75\\nsquared_error = 0.104\\nsamples = 55\\nvalue = 5.073'),\n",
" Text(0.059190031152647975, 0.5526315789473685, 'x[10] <= 9.025\\nsquared_error = 0.06\\nsamples = 50\\nvalue = 5.02'),\n",
" Text(0.056074766355140186, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.06230529595015576, 0.5, 'x[10] <= 9.075\\nsquared_error = 0.041\\nsamples = 49\\nvalue = 5.0'),\n",
" Text(0.059190031152647975, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.06542056074766354, 0.4473684210526316, 'x[8] <= 3.36\\nsquared_error = 0.02\\nsamples = 48\\nvalue = 5.021'),\n",
" Text(0.06230529595015576, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 41\\nvalue = 5.0'),\n",
" Text(0.06853582554517133, 0.39473684210526316, 'x[5] <= 14.0\\nsquared_error = 0.122\\nsamples = 7\\nvalue = 5.143'),\n",
" Text(0.06542056074766354, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.07165109034267912, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 6\\nvalue = 5.0'),\n",
" Text(0.07165109034267912, 0.5526315789473685, 'x[0] <= 7.45\\nsquared_error = 0.24\\nsamples = 5\\nvalue = 5.6'),\n",
" Text(0.06853582554517133, 0.5, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.07476635514018691, 0.5, 'squared_error = 0.0\\nsamples = 3\\nvalue = 6.0'),\n",
" Text(0.10514018691588785, 0.7105263157894737, 'x[2] <= 0.015\\nsquared_error = 0.405\\nsamples = 34\\nvalue = 5.647'),\n",
" Text(0.10202492211838006, 0.6578947368421053, 'squared_error = 0.0\\nsamples = 2\\nvalue = 7.0'),\n",
" Text(0.10825545171339564, 0.6578947368421053, 'x[1] <= 0.565\\nsquared_error = 0.309\\nsamples = 32\\nvalue = 5.562'),\n",
" Text(0.09813084112149532, 0.6052631578947368, 'x[10] <= 10.45\\nsquared_error = 0.226\\nsamples = 29\\nvalue = 5.655'),\n",
" Text(0.08722741433021806, 0.5526315789473685, 'x[9] <= 0.485\\nsquared_error = 0.166\\nsamples = 19\\nvalue = 5.789'),\n",
" Text(0.08099688473520249, 0.5, 'x[7] <= 0.996\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.333'),\n",
" Text(0.0778816199376947, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.08411214953271028, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.09345794392523364, 0.5, 'x[3] <= 1.65\\nsquared_error = 0.109\\nsamples = 16\\nvalue = 5.875'),\n",
" Text(0.09034267912772585, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.09657320872274143, 0.4473684210526316, 'x[6] <= 17.5\\nsquared_error = 0.062\\nsamples = 15\\nvalue = 5.933'),\n",
" Text(0.09345794392523364, 0.39473684210526316, 'x[6] <= 15.5\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.667'),\n",
" Text(0.09034267912772585, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.09657320872274143, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.09968847352024922, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 12\\nvalue = 6.0'),\n",
" Text(0.10903426791277258, 0.5526315789473685, 'x[5] <= 11.5\\nsquared_error = 0.24\\nsamples = 10\\nvalue = 5.4'),\n",
" Text(0.1059190031152648, 0.5, 'squared_error = 0.0\\nsamples = 4\\nvalue = 5.0'),\n",
" Text(0.11214953271028037, 0.5, 'x[9] <= 0.555\\nsquared_error = 0.222\\nsamples = 6\\nvalue = 5.667'),\n",
" Text(0.10903426791277258, 0.4473684210526316, 'x[8] <= 3.365\\nsquared_error = 0.16\\nsamples = 5\\nvalue = 5.8'),\n",
" Text(0.1059190031152648, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 3\\nvalue = 6.0'),\n",
" Text(0.11214953271028037, 0.39473684210526316, 'x[7] <= 0.997\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 5.5'),\n",
" Text(0.10903426791277258, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.11526479750778816, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.11526479750778816, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.11838006230529595, 0.6052631578947368, 'x[4] <= 0.102\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 4.667'),\n",
" Text(0.11526479750778816, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.12149532710280374, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.13707165109034267, 0.7631578947368421, 'x[3] <= 1.25\\nsquared_error = 0.276\\nsamples = 174\\nvalue = 5.075'),\n",
" Text(0.13395638629283488, 0.7105263157894737, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.14018691588785046, 0.7105263157894737, 'x[7] <= 0.994\\nsquared_error = 0.256\\nsamples = 173\\nvalue = 5.064'),\n",
" Text(0.13707165109034267, 0.6578947368421053, 'squared_error = 0.0\\nsamples = 3\\nvalue = 4.0'),\n",
" Text(0.14330218068535824, 0.6578947368421053, 'x[5] <= 3.5\\nsquared_error = 0.24\\nsamples = 170\\nvalue = 5.082'),\n",
" Text(0.1308411214953271, 0.6052631578947368, 'x[3] <= 3.7\\nsquared_error = 1.0\\nsamples = 2\\nvalue = 4.0'),\n",
" Text(0.1277258566978193, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.13395638629283488, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 3.0'),\n",
" Text(0.1557632398753894, 0.6052631578947368, 'x[9] <= 0.495\\nsquared_error = 0.217\\nsamples = 168\\nvalue = 5.095'),\n",
" Text(0.14018691588785046, 0.5526315789473685, 'x[0] <= 8.85\\nsquared_error = 0.126\\nsamples = 47\\nvalue = 4.957'),\n",
" Text(0.13395638629283488, 0.5, 'x[1] <= 0.752\\nsquared_error = 0.09\\nsamples = 40\\nvalue = 4.9'),\n",
" Text(0.1308411214953271, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 25\\nvalue = 5.0'),\n",
" Text(0.13707165109034267, 0.4473684210526316, 'x[2] <= 0.265\\nsquared_error = 0.196\\nsamples = 15\\nvalue = 4.733'),\n",
" Text(0.13395638629283488, 0.39473684210526316, 'x[2] <= 0.015\\nsquared_error = 0.13\\nsamples = 13\\nvalue = 4.846'),\n",
" Text(0.1308411214953271, 0.34210526315789475, 'x[8] <= 3.4\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 4.333'),\n",
" Text(0.1277258566978193, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 2\\nvalue = 4.0'),\n",
" Text(0.13395638629283488, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.13707165109034267, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 10\\nvalue = 5.0'),\n",
" Text(0.14018691588785046, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 2\\nvalue = 4.0'),\n",
" Text(0.14641744548286603, 0.5, 'x[0] <= 9.1\\nsquared_error = 0.204\\nsamples = 7\\nvalue = 5.286'),\n",
" Text(0.14330218068535824, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.14953271028037382, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 5\\nvalue = 5.0'),\n",
" Text(0.17133956386292834, 0.5526315789473685, 'x[4] <= 0.062\\nsquared_error = 0.242\\nsamples = 121\\nvalue = 5.149'),\n",
" Text(0.1588785046728972, 0.5, 'x[1] <= 0.825\\nsquared_error = 1.0\\nsamples = 2\\nvalue = 4.0'),\n",
" Text(0.1557632398753894, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.16199376947040497, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 3.0'),\n",
" Text(0.1838006230529595, 0.5, 'x[2] <= 0.23\\nsquared_error = 0.207\\nsamples = 119\\nvalue = 5.168'),\n",
" Text(0.16822429906542055, 0.4473684210526316, 'x[8] <= 3.345\\nsquared_error = 0.186\\nsamples = 81\\nvalue = 5.247'),\n",
" Text(0.1573208722741433, 0.39473684210526316, 'x[8] <= 3.305\\nsquared_error = 0.232\\nsamples = 41\\nvalue = 5.366'),\n",
" Text(0.15109034267912771, 0.34210526315789475, 'x[8] <= 3.245\\nsquared_error = 0.175\\nsamples = 31\\nvalue = 5.226'),\n",
" Text(0.14797507788161993, 0.2894736842105263, 'x[8] <= 3.21\\nsquared_error = 0.249\\nsamples = 15\\nvalue = 5.467'),\n",
" Text(0.14174454828660435, 0.23684210526315788, 'x[0] <= 7.5\\nsquared_error = 0.173\\nsamples = 9\\nvalue = 5.222'),\n",
" Text(0.13862928348909656, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.14485981308411214, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 7\\nvalue = 5.0'),\n",
" Text(0.1542056074766355, 0.23684210526315788, 'x[6] <= 105.5\\nsquared_error = 0.139\\nsamples = 6\\nvalue = 5.833'),\n",
" Text(0.15109034267912771, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 5\\nvalue = 6.0'),\n",
" Text(0.1573208722741433, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.1542056074766355, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 16\\nvalue = 5.0'),\n",
" Text(0.16355140186915887, 0.34210526315789475, 'x[8] <= 3.33\\nsquared_error = 0.16\\nsamples = 10\\nvalue = 5.8'),\n",
" Text(0.16043613707165108, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 7\\nvalue = 6.0'),\n",
" Text(0.16666666666666666, 0.2894736842105263, 'x[1] <= 0.665\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.333'),\n",
" Text(0.16355140186915887, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.16978193146417445, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.1791277258566978, 0.39473684210526316, 'x[1] <= 0.595\\nsquared_error = 0.109\\nsamples = 40\\nvalue = 5.125'),\n",
" Text(0.17601246105919002, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.1822429906542056, 0.34210526315789475, 'x[3] <= 9.3\\nsquared_error = 0.073\\nsamples = 38\\nvalue = 5.079'),\n",
" Text(0.1791277258566978, 0.2894736842105263, 'x[10] <= 10.25\\nsquared_error = 0.051\\nsamples = 37\\nvalue = 5.054'),\n",
" Text(0.17601246105919002, 0.23684210526315788, 'x[7] <= 0.998\\nsquared_error = 0.027\\nsamples = 36\\nvalue = 5.028'),\n",
" Text(0.17289719626168223, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 33\\nvalue = 5.0'),\n",
" Text(0.1791277258566978, 0.18421052631578946, 'x[7] <= 0.999\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.333'),\n",
" Text(0.17601246105919002, 0.13157894736842105, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.1822429906542056, 0.13157894736842105, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.1822429906542056, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.1853582554517134, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.19937694704049844, 0.4473684210526316, 'x[6] <= 59.5\\nsquared_error = 0.211\\nsamples = 38\\nvalue = 5.0'),\n",
" Text(0.19158878504672897, 0.39473684210526316, 'x[5] <= 10.0\\nsquared_error = 0.247\\nsamples = 9\\nvalue = 4.556'),\n",
" Text(0.18847352024922118, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 5\\nvalue = 5.0'),\n",
" Text(0.19470404984423675, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 4\\nvalue = 4.0'),\n",
" Text(0.2071651090342679, 0.39473684210526316, 'x[5] <= 17.5\\nsquared_error = 0.119\\nsamples = 29\\nvalue = 5.138'),\n",
" Text(0.20093457943925233, 0.34210526315789475, 'x[4] <= 0.085\\nsquared_error = 0.25\\nsamples = 6\\nvalue = 5.5'),\n",
" Text(0.19781931464174454, 0.2894736842105263, 'x[3] <= 2.05\\nsquared_error = 0.188\\nsamples = 4\\nvalue = 5.75'),\n",
" Text(0.19470404984423675, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.20093457943925233, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 3\\nvalue = 6.0'),\n",
" Text(0.20404984423676012, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.21339563862928349, 0.34210526315789475, 'x[10] <= 10.05\\nsquared_error = 0.042\\nsamples = 23\\nvalue = 5.043'),\n",
" Text(0.2102803738317757, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 21\\nvalue = 5.0'),\n",
" Text(0.21651090342679127, 0.2894736842105263, 'x[7] <= 0.998\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 5.5'),\n",
" Text(0.21339563862928349, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.21962616822429906, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.11234423676012462, 0.8157894736842105, 'squared_error = 0.0\\nsamples = 1\\nvalue = 3.0'),\n",
" Text(0.3299108012071651, 0.868421052631579, 'x[1] <= 0.365\\nsquared_error = 0.451\\nsamples = 466\\nvalue = 5.517'),\n",
" Text(0.205607476635514, 0.8157894736842105, 'x[9] <= 0.65\\nsquared_error = 0.457\\nsamples = 72\\nvalue = 5.958'),\n",
" Text(0.19314641744548286, 0.7631578947368421, 'x[1] <= 0.355\\nsquared_error = 0.249\\nsamples = 17\\nvalue = 5.471'),\n",
" Text(0.19003115264797507, 0.7105263157894737, 'x[0] <= 10.75\\nsquared_error = 0.213\\nsamples = 13\\nvalue = 5.308'),\n",
" Text(0.18691588785046728, 0.6578947368421053, 'x[5] <= 4.0\\nsquared_error = 0.149\\nsamples = 11\\nvalue = 5.182'),\n",
" Text(0.1838006230529595, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.19003115264797507, 0.6052631578947368, 'x[8] <= 3.33\\nsquared_error = 0.09\\nsamples = 10\\nvalue = 5.1'),\n",
" Text(0.18691588785046728, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 6\\nvalue = 5.0'),\n",
" Text(0.19314641744548286, 0.5526315789473685, 'x[4] <= 0.077\\nsquared_error = 0.188\\nsamples = 4\\nvalue = 5.25'),\n",
" Text(0.19003115264797507, 0.5, 'squared_error = 0.0\\nsamples = 3\\nvalue = 5.0'),\n",
" Text(0.19626168224299065, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.19314641744548286, 0.6578947368421053, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.19626168224299065, 0.7105263157894737, 'squared_error = 0.0\\nsamples = 4\\nvalue = 6.0'),\n",
" Text(0.21806853582554517, 0.7631578947368421, 'x[10] <= 9.75\\nsquared_error = 0.424\\nsamples = 55\\nvalue = 6.109'),\n",
" Text(0.205607476635514, 0.7105263157894737, 'x[1] <= 0.225\\nsquared_error = 0.332\\nsamples = 24\\nvalue = 5.792'),\n",
" Text(0.20249221183800623, 0.6578947368421053, 'squared_error = 0.0\\nsamples = 2\\nvalue = 7.0'),\n",
" Text(0.2087227414330218, 0.6578947368421053, 'x[10] <= 9.45\\nsquared_error = 0.217\\nsamples = 22\\nvalue = 5.682'),\n",
" Text(0.20249221183800623, 0.6052631578947368, 'x[2] <= 0.395\\nsquared_error = 0.076\\nsamples = 12\\nvalue = 5.917'),\n",
" Text(0.19937694704049844, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.205607476635514, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 11\\nvalue = 6.0'),\n",
" Text(0.21495327102803738, 0.6052631578947368, 'x[0] <= 11.65\\nsquared_error = 0.24\\nsamples = 10\\nvalue = 5.4'),\n",
" Text(0.2118380062305296, 0.5526315789473685, 'x[2] <= 0.385\\nsquared_error = 0.188\\nsamples = 8\\nvalue = 5.25'),\n",
" Text(0.2087227414330218, 0.5, 'x[7] <= 0.997\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.667'),\n",
" Text(0.205607476635514, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.2118380062305296, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.21495327102803738, 0.5, 'squared_error = 0.0\\nsamples = 5\\nvalue = 5.0'),\n",
" Text(0.21806853582554517, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.23052959501557632, 0.7105263157894737, 'x[1] <= 0.245\\nsquared_error = 0.358\\nsamples = 31\\nvalue = 6.355'),\n",
" Text(0.22429906542056074, 0.6578947368421053, 'x[4] <= 0.223\\nsquared_error = 0.109\\nsamples = 8\\nvalue = 5.875'),\n",
" Text(0.22118380062305296, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 7\\nvalue = 6.0'),\n",
" Text(0.22741433021806853, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.2367601246105919, 0.6578947368421053, 'x[5] <= 4.0\\nsquared_error = 0.336\\nsamples = 23\\nvalue = 6.522'),\n",
" Text(0.2336448598130841, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 8.0'),\n",
" Text(0.2398753894080997, 0.6052631578947368, 'x[2] <= 0.515\\nsquared_error = 0.248\\nsamples = 22\\nvalue = 6.455'),\n",
" Text(0.2336448598130841, 0.5526315789473685, 'x[7] <= 0.998\\nsquared_error = 0.215\\nsamples = 16\\nvalue = 6.312'),\n",
" Text(0.23052959501557632, 0.5, 'x[7] <= 0.998\\nsquared_error = 0.248\\nsamples = 11\\nvalue = 6.455'),\n",
" Text(0.22741433021806853, 0.4473684210526316, 'x[3] <= 1.5\\nsquared_error = 0.188\\nsamples = 8\\nvalue = 6.25'),\n",
" Text(0.22429906542056074, 0.39473684210526316, 'x[7] <= 0.996\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 6.667'),\n",
" Text(0.22118380062305296, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.22741433021806853, 0.34210526315789475, 'x[5] <= 10.0\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 6.5'),\n",
" Text(0.22429906542056074, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.23052959501557632, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.23052959501557632, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 5\\nvalue = 6.0'),\n",
" Text(0.2336448598130841, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 3\\nvalue = 7.0'),\n",
" Text(0.2367601246105919, 0.5, 'squared_error = 0.0\\nsamples = 5\\nvalue = 6.0'),\n",
" Text(0.24610591900311526, 0.5526315789473685, 'x[8] <= 3.155\\nsquared_error = 0.139\\nsamples = 6\\nvalue = 6.833'),\n",
" Text(0.24299065420560748, 0.5, 'x[0] <= 12.0\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 6.5'),\n",
" Text(0.2398753894080997, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.24610591900311526, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.24922118380062305, 0.5, 'squared_error = 0.0\\nsamples = 4\\nvalue = 7.0'),\n",
" Text(0.4542141257788162, 0.8157894736842105, 'x[6] <= 55.5\\nsquared_error = 0.408\\nsamples = 394\\nvalue = 5.437'),\n",
" Text(0.413879964953271, 0.7631578947368421, 'x[8] <= 3.535\\nsquared_error = 0.463\\nsamples = 249\\nvalue = 5.558'),\n",
" Text(0.38227706386292837, 0.7105263157894737, 'x[5] <= 33.0\\nsquared_error = 0.43\\nsamples = 227\\nvalue = 5.617'),\n",
" Text(0.3408781152647975, 0.6578947368421053, 'x[9] <= 0.685\\nsquared_error = 0.393\\nsamples = 222\\nvalue = 5.64'),\n",
" Text(0.29156931464174457, 0.6052631578947368, 'x[3] <= 1.85\\nsquared_error = 0.348\\nsamples = 142\\nvalue = 5.528'),\n",
" Text(0.2616822429906542, 0.5526315789473685, 'x[4] <= 0.083\\nsquared_error = 0.227\\nsamples = 30\\nvalue = 5.2'),\n",
" Text(0.2554517133956386, 0.5, 'x[7] <= 0.998\\nsquared_error = 0.141\\nsamples = 21\\nvalue = 5.048'),\n",
" Text(0.2523364485981308, 0.4473684210526316, 'x[7] <= 0.996\\nsquared_error = 0.09\\nsamples = 20\\nvalue = 5.1'),\n",
" Text(0.24922118380062305, 0.39473684210526316, 'x[5] <= 10.0\\nsquared_error = 0.24\\nsamples = 5\\nvalue = 5.4'),\n",
" Text(0.24610591900311526, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 3\\nvalue = 5.0'),\n",
" Text(0.2523364485981308, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.2554517133956386, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 15\\nvalue = 5.0'),\n",
" Text(0.2585669781931464, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.26791277258566976, 0.5, 'x[7] <= 0.996\\nsquared_error = 0.247\\nsamples = 9\\nvalue = 5.556'),\n",
" Text(0.26479750778816197, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 4\\nvalue = 5.0'),\n",
" Text(0.27102803738317754, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 5\\nvalue = 6.0'),\n",
" Text(0.3214563862928349, 0.5526315789473685, 'x[3] <= 2.65\\nsquared_error = 0.344\\nsamples = 112\\nvalue = 5.616'),\n",
" Text(0.2955607476635514, 0.5, 'x[4] <= 0.076\\nsquared_error = 0.349\\nsamples = 94\\nvalue = 5.67'),\n",
" Text(0.2772585669781931, 0.4473684210526316, 'x[5] <= 26.5\\nsquared_error = 0.358\\nsamples = 37\\nvalue = 5.514'),\n",
" Text(0.27414330218068533, 0.39473684210526316, 'x[6] <= 25.5\\nsquared_error = 0.245\\nsamples = 35\\nvalue = 5.429'),\n",
" Text(0.2632398753894081, 0.34210526315789475, 'x[10] <= 9.25\\nsquared_error = 0.18\\nsamples = 17\\nvalue = 5.765'),\n",
" Text(0.2570093457943925, 0.2894736842105263, 'x[1] <= 0.46\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.333'),\n",
" Text(0.2538940809968847, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.2601246105919003, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.26947040498442365, 0.2894736842105263, 'x[7] <= 0.996\\nsquared_error = 0.122\\nsamples = 14\\nvalue = 5.857'),\n",
" Text(0.26635514018691586, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.27258566978193144, 0.23684210526315788, 'x[7] <= 0.998\\nsquared_error = 0.071\\nsamples = 13\\nvalue = 5.923'),\n",
" Text(0.26947040498442365, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 10\\nvalue = 6.0'),\n",
" Text(0.2757009345794392, 0.18421052631578946, 'x[9] <= 0.61\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.667'),\n",
" Text(0.27258566978193144, 0.13157894736842105, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.278816199376947, 0.13157894736842105, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.2850467289719626, 0.34210526315789475, 'x[2] <= 0.135\\nsquared_error = 0.099\\nsamples = 18\\nvalue = 5.111'),\n",
" Text(0.2819314641744548, 0.2894736842105263, 'x[3] <= 2.15\\nsquared_error = 0.24\\nsamples = 5\\nvalue = 5.4'),\n",
" Text(0.278816199376947, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 3\\nvalue = 5.0'),\n",
" Text(0.2850467289719626, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.2881619937694704, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 13\\nvalue = 5.0'),\n",
" Text(0.2803738317757009, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 2\\nvalue = 7.0'),\n",
" Text(0.31386292834890966, 0.4473684210526316, 'x[10] <= 10.45\\nsquared_error = 0.316\\nsamples = 57\\nvalue = 5.772'),\n",
" Text(0.3107476635514019, 0.39473684210526316, 'x[7] <= 0.997\\nsquared_error = 0.299\\nsamples = 54\\nvalue = 5.815'),\n",
" Text(0.29750778816199375, 0.34210526315789475, 'x[8] <= 3.475\\nsquared_error = 0.094\\nsamples = 19\\nvalue = 6.105'),\n",
" Text(0.29439252336448596, 0.2894736842105263, 'x[7] <= 0.997\\nsquared_error = 0.052\\nsamples = 18\\nvalue = 6.056'),\n",
" Text(0.29127725856697817, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 15\\nvalue = 6.0'),\n",
" Text(0.29750778816199375, 0.23684210526315788, 'x[6] <= 37.5\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 6.333'),\n",
" Text(0.29439252336448596, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.30062305295950154, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.30062305295950154, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.32398753894080995, 0.34210526315789475, 'x[5] <= 14.5\\nsquared_error = 0.34\\nsamples = 35\\nvalue = 5.657'),\n",
" Text(0.32087227414330216, 0.2894736842105263, 'x[0] <= 9.7\\nsquared_error = 0.302\\nsamples = 29\\nvalue = 5.793'),\n",
" Text(0.3130841121495327, 0.23684210526315788, 'x[8] <= 3.265\\nsquared_error = 0.231\\nsamples = 22\\nvalue = 5.636'),\n",
" Text(0.3068535825545171, 0.18421052631578946, 'x[2] <= 0.085\\nsquared_error = 0.139\\nsamples = 6\\nvalue = 5.167'),\n",
" Text(0.3037383177570093, 0.13157894736842105, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.3099688473520249, 0.13157894736842105, 'squared_error = 0.0\\nsamples = 5\\nvalue = 5.0'),\n",
" Text(0.31931464174454827, 0.18421052631578946, 'x[2] <= 0.33\\nsquared_error = 0.152\\nsamples = 16\\nvalue = 5.812'),\n",
" Text(0.3161993769470405, 0.13157894736842105, 'x[2] <= 0.085\\nsquared_error = 0.066\\nsamples = 14\\nvalue = 5.929'),\n",
" Text(0.3130841121495327, 0.07894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.31931464174454827, 0.07894736842105263, 'squared_error = 0.0\\nsamples = 13\\nvalue = 6.0'),\n",
" Text(0.32242990654205606, 0.13157894736842105, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.32866043613707163, 0.23684210526315788, 'x[6] <= 43.0\\nsquared_error = 0.204\\nsamples = 7\\nvalue = 6.286'),\n",
" Text(0.32554517133956384, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 5\\nvalue = 6.0'),\n",
" Text(0.3317757009345794, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 2\\nvalue = 7.0'),\n",
" Text(0.32710280373831774, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 6\\nvalue = 5.0'),\n",
" Text(0.31697819314641745, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 3\\nvalue = 5.0'),\n",
" Text(0.34735202492211836, 0.5, 'x[10] <= 10.35\\nsquared_error = 0.222\\nsamples = 18\\nvalue = 5.333'),\n",
" Text(0.3411214953271028, 0.4473684210526316, 'x[3] <= 7.45\\nsquared_error = 0.13\\nsamples = 13\\nvalue = 5.154'),\n",
" Text(0.338006230529595, 0.39473684210526316, 'x[6] <= 47.5\\nsquared_error = 0.076\\nsamples = 12\\nvalue = 5.083'),\n",
" Text(0.3348909657320872, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 8\\nvalue = 5.0'),\n",
" Text(0.3411214953271028, 0.34210526315789475, 'x[1] <= 0.595\\nsquared_error = 0.188\\nsamples = 4\\nvalue = 5.25'),\n",
" Text(0.338006230529595, 0.2894736842105263, 'x[7] <= 0.998\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 5.5'),\n",
" Text(0.3348909657320872, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.3411214953271028, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.3442367601246106, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.3442367601246106, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.35358255451713394, 0.4473684210526316, 'x[3] <= 3.3\\nsquared_error = 0.16\\nsamples = 5\\nvalue = 5.8'),\n",
" Text(0.35046728971962615, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 4\\nvalue = 6.0'),\n",
" Text(0.35669781931464173, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.3901869158878505, 0.6052631578947368, 'x[10] <= 9.85\\nsquared_error = 0.411\\nsamples = 80\\nvalue = 5.838'),\n",
" Text(0.37227414330218067, 0.5526315789473685, 'x[7] <= 0.997\\nsquared_error = 0.287\\nsamples = 44\\nvalue = 5.591'),\n",
" Text(0.3629283489096573, 0.5, 'x[1] <= 0.385\\nsquared_error = 0.312\\nsamples = 16\\nvalue = 5.25'),\n",
" Text(0.3598130841121495, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.3660436137071651, 0.4473684210526316, 'x[8] <= 3.41\\nsquared_error = 0.116\\nsamples = 15\\nvalue = 5.133'),\n",
" Text(0.3629283489096573, 0.39473684210526316, 'x[10] <= 9.15\\nsquared_error = 0.066\\nsamples = 14\\nvalue = 5.071'),\n",
" Text(0.3598130841121495, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.3660436137071651, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 13\\nvalue = 5.0'),\n",
" Text(0.3691588785046729, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.38161993769470404, 0.5, 'x[10] <= 9.45\\nsquared_error = 0.168\\nsamples = 28\\nvalue = 5.786'),\n",
" Text(0.37850467289719625, 0.4473684210526316, 'x[7] <= 0.998\\nsquared_error = 0.24\\nsamples = 15\\nvalue = 5.6'),\n",
" Text(0.37538940809968846, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 3\\nvalue = 5.0'),\n",
" Text(0.38161993769470404, 0.39473684210526316, 'x[2] <= 0.27\\nsquared_error = 0.188\\nsamples = 12\\nvalue = 5.75'),\n",
" Text(0.37850467289719625, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 6\\nvalue = 6.0'),\n",
" Text(0.3847352024922118, 0.34210526315789475, 'x[2] <= 0.43\\nsquared_error = 0.25\\nsamples = 6\\nvalue = 5.5'),\n",
" Text(0.38161993769470404, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.3878504672897196, 0.2894736842105263, 'x[4] <= 0.079\\nsquared_error = 0.188\\nsamples = 4\\nvalue = 5.75'),\n",
" Text(0.3847352024922118, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.3909657320872274, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 3\\nvalue = 6.0'),\n",
" Text(0.3847352024922118, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 13\\nvalue = 6.0'),\n",
" Text(0.40809968847352024, 0.5526315789473685, 'x[3] <= 3.05\\nsquared_error = 0.397\\nsamples = 36\\nvalue = 6.139'),\n",
" Text(0.40031152647975077, 0.5, 'x[1] <= 0.412\\nsquared_error = 0.333\\nsamples = 30\\nvalue = 6.0'),\n",
" Text(0.3940809968847352, 0.4473684210526316, 'x[10] <= 10.15\\nsquared_error = 0.25\\nsamples = 8\\nvalue = 6.5'),\n",
" Text(0.3909657320872274, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 4\\nvalue = 7.0'),\n",
" Text(0.397196261682243, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 4\\nvalue = 6.0'),\n",
" Text(0.40654205607476634, 0.4473684210526316, 'x[5] <= 3.5\\nsquared_error = 0.24\\nsamples = 22\\nvalue = 5.818'),\n",
" Text(0.40342679127725856, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.40965732087227413, 0.39473684210526316, 'x[2] <= 0.465\\nsquared_error = 0.181\\nsamples = 21\\nvalue = 5.762'),\n",
" Text(0.40342679127725856, 0.34210526315789475, 'x[9] <= 1.09\\nsquared_error = 0.109\\nsamples = 16\\nvalue = 5.875'),\n",
" Text(0.40031152647975077, 0.2894736842105263, 'x[8] <= 3.49\\nsquared_error = 0.062\\nsamples = 15\\nvalue = 5.933'),\n",
" Text(0.397196261682243, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 14\\nvalue = 6.0'),\n",
" Text(0.40342679127725856, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.40654205607476634, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.4158878504672897, 0.34210526315789475, 'x[1] <= 0.455\\nsquared_error = 0.24\\nsamples = 5\\nvalue = 5.4'),\n",
" Text(0.4127725856697819, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.4190031152647975, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 3\\nvalue = 5.0'),\n",
" Text(0.4158878504672897, 0.5, 'x[6] <= 50.5\\nsquared_error = 0.139\\nsamples = 6\\nvalue = 6.833'),\n",
" Text(0.4127725856697819, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 5\\nvalue = 7.0'),\n",
" Text(0.4190031152647975, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.4236760124610592, 0.6578947368421053, 'x[4] <= 0.112\\nsquared_error = 1.04\\nsamples = 5\\nvalue = 4.6'),\n",
" Text(0.4174454828660436, 0.6052631578947368, 'x[4] <= 0.067\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.333'),\n",
" Text(0.4143302180685358, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.4205607476635514, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.42990654205607476, 0.6052631578947368, 'x[2] <= 0.43\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 3.5'),\n",
" Text(0.42679127725856697, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 3.0'),\n",
" Text(0.43302180685358255, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.4454828660436137, 0.7105263157894737, 'x[9] <= 0.635\\nsquared_error = 0.407\\nsamples = 22\\nvalue = 4.955'),\n",
" Text(0.4392523364485981, 0.6578947368421053, 'x[10] <= 9.975\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 3.667'),\n",
" Text(0.43613707165109034, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 3.0'),\n",
" Text(0.4423676012461059, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 2\\nvalue = 4.0'),\n",
" Text(0.4517133956386293, 0.6578947368421053, 'x[5] <= 7.5\\nsquared_error = 0.133\\nsamples = 19\\nvalue = 5.158'),\n",
" Text(0.4485981308411215, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.45482866043613707, 0.6052631578947368, 'x[7] <= 0.995\\nsquared_error = 0.055\\nsamples = 17\\nvalue = 5.059'),\n",
" Text(0.4517133956386293, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.45794392523364486, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 16\\nvalue = 5.0'),\n",
" Text(0.4945482866043614, 0.7631578947368421, 'x[6] <= 105.5\\nsquared_error = 0.245\\nsamples = 145\\nvalue = 5.228'),\n",
" Text(0.48130841121495327, 0.7105263157894737, 'x[10] <= 10.35\\nsquared_error = 0.286\\nsamples = 106\\nvalue = 5.302'),\n",
" Text(0.4735202492211838, 0.6578947368421053, 'x[1] <= 0.855\\nsquared_error = 0.27\\nsamples = 94\\nvalue = 5.245'),\n",
" Text(0.4672897196261682, 0.6052631578947368, 'x[2] <= 0.85\\nsquared_error = 0.245\\nsamples = 90\\nvalue = 5.278'),\n",
" Text(0.46417445482866043, 0.5526315789473685, 'x[5] <= 18.5\\nsquared_error = 0.229\\nsamples = 89\\nvalue = 5.292'),\n",
" Text(0.44042056074766356, 0.5, 'x[7] <= 0.997\\nsquared_error = 0.245\\nsamples = 35\\nvalue = 5.429'),\n",
" Text(0.4326323987538941, 0.4473684210526316, 'x[9] <= 0.595\\nsquared_error = 0.149\\nsamples = 11\\nvalue = 5.182'),\n",
" Text(0.4295171339563863, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.4357476635514019, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 9\\nvalue = 5.0'),\n",
" Text(0.44820872274143303, 0.4473684210526316, 'x[1] <= 0.615\\nsquared_error = 0.248\\nsamples = 24\\nvalue = 5.542'),\n",
" Text(0.44197819314641745, 0.39473684210526316, 'x[4] <= 0.098\\nsquared_error = 0.23\\nsamples = 14\\nvalue = 5.357'),\n",
" Text(0.43886292834890966, 0.34210526315789475, 'x[8] <= 3.355\\nsquared_error = 0.247\\nsamples = 9\\nvalue = 5.556'),\n",
" Text(0.4357476635514019, 0.2894736842105263, 'x[10] <= 9.9\\nsquared_error = 0.139\\nsamples = 6\\nvalue = 5.833'),\n",
" Text(0.4326323987538941, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 5\\nvalue = 6.0'),\n",
" Text(0.43886292834890966, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.44197819314641745, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 3\\nvalue = 5.0'),\n",
" Text(0.44509345794392524, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 5\\nvalue = 5.0'),\n",
" Text(0.4544392523364486, 0.39473684210526316, 'x[6] <= 59.0\\nsquared_error = 0.16\\nsamples = 10\\nvalue = 5.8'),\n",
" Text(0.4513239875389408, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.4575545171339564, 0.34210526315789475, 'x[0] <= 9.45\\nsquared_error = 0.099\\nsamples = 9\\nvalue = 5.889'),\n",
" Text(0.4544392523364486, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 8\\nvalue = 6.0'),\n",
" Text(0.4606697819314642, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.4879283489096573, 0.5, 'x[10] <= 9.55\\nsquared_error = 0.199\\nsamples = 54\\nvalue = 5.204'),\n",
" Text(0.47468847352024923, 0.4473684210526316, 'x[10] <= 9.45\\nsquared_error = 0.226\\nsamples = 32\\nvalue = 5.344'),\n",
" Text(0.46690031152647976, 0.39473684210526316, 'x[3] <= 14.6\\nsquared_error = 0.094\\nsamples = 19\\nvalue = 5.105'),\n",
" Text(0.463785046728972, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 17\\nvalue = 5.0'),\n",
" Text(0.47001557632398755, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.4824766355140187, 0.39473684210526316, 'x[4] <= 0.076\\nsquared_error = 0.213\\nsamples = 13\\nvalue = 5.692'),\n",
" Text(0.4762461059190031, 0.34210526315789475, 'x[9] <= 0.61\\nsquared_error = 0.188\\nsamples = 4\\nvalue = 5.25'),\n",
" Text(0.47313084112149534, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.4793613707165109, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 3\\nvalue = 5.0'),\n",
" Text(0.4887071651090343, 0.34210526315789475, 'x[0] <= 9.05\\nsquared_error = 0.099\\nsamples = 9\\nvalue = 5.889'),\n",
" Text(0.4855919003115265, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 7\\nvalue = 6.0'),\n",
" Text(0.49182242990654207, 0.2894736842105263, 'x[6] <= 75.5\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 5.5'),\n",
" Text(0.4887071651090343, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.49493769470404986, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.5011682242990654, 0.4473684210526316, 'x[2] <= 0.435\\nsquared_error = 0.091\\nsamples = 22\\nvalue = 5.0'),\n",
" Text(0.49805295950155765, 0.39473684210526316, 'x[0] <= 9.95\\nsquared_error = 0.045\\nsamples = 21\\nvalue = 5.048'),\n",
" Text(0.49493769470404986, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 19\\nvalue = 5.0'),\n",
" Text(0.5011682242990654, 0.34210526315789475, 'x[9] <= 0.655\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 5.5'),\n",
" Text(0.49805295950155765, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.5042834890965732, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.5042834890965732, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.470404984423676, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.4797507788161994, 0.6052631578947368, 'x[8] <= 3.285\\nsquared_error = 0.25\\nsamples = 4\\nvalue = 4.5'),\n",
" Text(0.4766355140186916, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.48286604361370716, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 2\\nvalue = 4.0'),\n",
" Text(0.48909657320872274, 0.6578947368421053, 'x[3] <= 5.5\\nsquared_error = 0.188\\nsamples = 12\\nvalue = 5.75'),\n",
" Text(0.48598130841121495, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 9\\nvalue = 6.0'),\n",
" Text(0.49221183800623053, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 3\\nvalue = 5.0'),\n",
" Text(0.5077881619937694, 0.7105263157894737, 'x[9] <= 1.585\\nsquared_error = 0.076\\nsamples = 39\\nvalue = 5.026'),\n",
" Text(0.5015576323987538, 0.6578947368421053, 'x[3] <= 1.65\\nsquared_error = 0.027\\nsamples = 36\\nvalue = 4.972'),\n",
" Text(0.4984423676012461, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.5046728971962616, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 35\\nvalue = 5.0'),\n",
" Text(0.514018691588785, 0.6578947368421053, 'x[5] <= 19.5\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.667'),\n",
" Text(0.5109034267912772, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.5171339563862928, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.7848398559190031, 0.9210526315789473, 'x[9] <= 0.645\\nsquared_error = 0.741\\nsamples = 490\\nvalue = 6.088'),\n",
" Text(0.643522363585475, 0.9473684210526316, ' False'),\n",
" Text(0.6843117211838006, 0.868421052631579, 'x[1] <= 1.015\\nsquared_error = 0.726\\nsamples = 215\\nvalue = 5.712'),\n",
" Text(0.6365362149532711, 0.8157894736842105, 'x[10] <= 11.45\\nsquared_error = 0.583\\nsamples = 206\\nvalue = 5.791'),\n",
" Text(0.5818730529595015, 0.7631578947368421, 'x[1] <= 0.635\\nsquared_error = 0.527\\nsamples = 108\\nvalue = 5.528'),\n",
" Text(0.5578271028037384, 0.7105263157894737, 'x[8] <= 3.475\\nsquared_error = 0.439\\nsamples = 70\\nvalue = 5.7'),\n",
" Text(0.5432242990654206, 0.6578947368421053, 'x[4] <= 0.067\\nsquared_error = 0.427\\nsamples = 60\\nvalue = 5.8'),\n",
" Text(0.5233644859813084, 0.6052631578947368, 'x[4] <= 0.059\\nsquared_error = 0.61\\nsamples = 10\\nvalue = 6.3'),\n",
" Text(0.5171339563862928, 0.5526315789473685, 'x[6] <= 25.5\\nsquared_error = 0.25\\nsamples = 4\\nvalue = 5.5'),\n",
" Text(0.514018691588785, 0.5, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.5202492211838006, 0.5, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.5295950155763239, 0.5526315789473685, 'x[8] <= 3.43\\nsquared_error = 0.139\\nsamples = 6\\nvalue = 6.833'),\n",
" Text(0.5264797507788161, 0.5, 'squared_error = 0.0\\nsamples = 5\\nvalue = 7.0'),\n",
" Text(0.5327102803738317, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.5630841121495327, 0.6052631578947368, 'x[9] <= 0.585\\nsquared_error = 0.33\\nsamples = 50\\nvalue = 5.7'),\n",
" Text(0.5498442367601246, 0.5526315789473685, 'x[10] <= 11.05\\nsquared_error = 0.402\\nsamples = 26\\nvalue = 5.462'),\n",
" Text(0.5389408099688473, 0.5, 'x[10] <= 10.85\\nsquared_error = 0.277\\nsamples = 16\\nvalue = 5.188'),\n",
" Text(0.5327102803738317, 0.4473684210526316, 'x[3] <= 2.75\\nsquared_error = 0.245\\nsamples = 7\\nvalue = 5.571'),\n",
" Text(0.5295950155763239, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 3\\nvalue = 6.0'),\n",
" Text(0.5358255451713395, 0.39473684210526316, 'x[3] <= 3.2\\nsquared_error = 0.188\\nsamples = 4\\nvalue = 5.25'),\n",
" Text(0.5327102803738317, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 3\\nvalue = 5.0'),\n",
" Text(0.5389408099688473, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.5451713395638629, 0.4473684210526316, 'x[2] <= 0.04\\nsquared_error = 0.099\\nsamples = 9\\nvalue = 4.889'),\n",
" Text(0.5420560747663551, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.5482866043613707, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 8\\nvalue = 5.0'),\n",
" Text(0.5607476635514018, 0.5, 'x[0] <= 9.45\\nsquared_error = 0.29\\nsamples = 10\\nvalue = 5.9'),\n",
" Text(0.557632398753894, 0.4473684210526316, 'x[3] <= 1.65\\nsquared_error = 0.109\\nsamples = 8\\nvalue = 6.125'),\n",
" Text(0.5545171339563862, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.5607476635514018, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 7\\nvalue = 6.0'),\n",
" Text(0.5638629283489096, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.5763239875389408, 0.5526315789473685, 'x[3] <= 2.9\\nsquared_error = 0.123\\nsamples = 24\\nvalue = 5.958'),\n",
" Text(0.573208722741433, 0.5, 'x[0] <= 12.45\\nsquared_error = 0.079\\nsamples = 23\\nvalue = 5.913'),\n",
" Text(0.5700934579439252, 0.4473684210526316, 'x[5] <= 27.5\\nsquared_error = 0.043\\nsamples = 22\\nvalue = 5.955'),\n",
" Text(0.5669781931464174, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 20\\nvalue = 6.0'),\n",
" Text(0.573208722741433, 0.39473684210526316, 'x[6] <= 56.5\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 5.5'),\n",
" Text(0.5700934579439252, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.5763239875389408, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.5763239875389408, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.5794392523364486, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.572429906542056, 0.6578947368421053, 'x[3] <= 2.3\\nsquared_error = 0.09\\nsamples = 10\\nvalue = 5.1'),\n",
" Text(0.5693146417445483, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 9\\nvalue = 5.0'),\n",
" Text(0.5755451713395638, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.6059190031152648, 0.7105263157894737, 'x[5] <= 6.5\\nsquared_error = 0.535\\nsamples = 38\\nvalue = 5.211'),\n",
" Text(0.5919003115264797, 0.6578947368421053, 'x[1] <= 0.81\\nsquared_error = 0.222\\nsamples = 12\\nvalue = 4.667'),\n",
" Text(0.5856697819314641, 0.6052631578947368, 'x[4] <= 0.058\\nsquared_error = 0.109\\nsamples = 8\\nvalue = 4.875'),\n",
" Text(0.5825545171339563, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.5887850467289719, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 7\\nvalue = 5.0'),\n",
" Text(0.5981308411214953, 0.6052631578947368, 'x[8] <= 3.545\\nsquared_error = 0.188\\nsamples = 4\\nvalue = 4.25'),\n",
" Text(0.5950155763239875, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 3\\nvalue = 4.0'),\n",
" Text(0.6012461059190031, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.6199376947040498, 0.6578947368421053, 'x[6] <= 45.5\\nsquared_error = 0.479\\nsamples = 26\\nvalue = 5.462'),\n",
" Text(0.6105919003115264, 0.6052631578947368, 'x[2] <= 0.08\\nsquared_error = 0.312\\nsamples = 16\\nvalue = 5.75'),\n",
" Text(0.6074766355140186, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 11\\nvalue = 6.0'),\n",
" Text(0.6137071651090342, 0.5526315789473685, 'x[6] <= 23.0\\nsquared_error = 0.56\\nsamples = 5\\nvalue = 5.2'),\n",
" Text(0.6105919003115264, 0.5, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.616822429906542, 0.5, 'x[7] <= 0.996\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 4.667'),\n",
" Text(0.6137071651090342, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.6199376947040498, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.6292834890965732, 0.6052631578947368, 'x[3] <= 3.0\\nsquared_error = 0.4\\nsamples = 10\\nvalue = 5.0'),\n",
" Text(0.6261682242990654, 0.5526315789473685, 'x[8] <= 3.48\\nsquared_error = 0.188\\nsamples = 8\\nvalue = 5.25'),\n",
" Text(0.6230529595015576, 0.5, 'squared_error = 0.0\\nsamples = 5\\nvalue = 5.0'),\n",
" Text(0.6292834890965732, 0.5, 'x[5] <= 13.0\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.667'),\n",
" Text(0.6261682242990654, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.632398753894081, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.632398753894081, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 2\\nvalue = 4.0'),\n",
" Text(0.6911993769470405, 0.7631578947368421, 'x[1] <= 0.485\\nsquared_error = 0.483\\nsamples = 98\\nvalue = 6.082'),\n",
" Text(0.6658878504672897, 0.7105263157894737, 'x[8] <= 3.275\\nsquared_error = 0.436\\nsamples = 50\\nvalue = 6.38'),\n",
" Text(0.6557632398753894, 0.6578947368421053, 'x[0] <= 10.1\\nsquared_error = 0.38\\nsamples = 29\\nvalue = 6.586'),\n",
" Text(0.6448598130841121, 0.6052631578947368, 'x[1] <= 0.245\\nsquared_error = 0.28\\nsamples = 23\\nvalue = 6.739'),\n",
" Text(0.6417445482866043, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 3\\nvalue = 6.0'),\n",
" Text(0.6479750778816199, 0.5526315789473685, 'x[1] <= 0.32\\nsquared_error = 0.228\\nsamples = 20\\nvalue = 6.85'),\n",
" Text(0.6417445482866043, 0.5, 'x[0] <= 9.95\\nsquared_error = 0.076\\nsamples = 12\\nvalue = 7.083'),\n",
" Text(0.6386292834890965, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 11\\nvalue = 7.0'),\n",
" Text(0.6448598130841121, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 8.0'),\n",
" Text(0.6542056074766355, 0.5, 'x[1] <= 0.4\\nsquared_error = 0.25\\nsamples = 8\\nvalue = 6.5'),\n",
" Text(0.6510903426791277, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 4\\nvalue = 6.0'),\n",
" Text(0.6573208722741433, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 4\\nvalue = 7.0'),\n",
" Text(0.6666666666666666, 0.6052631578947368, 'x[6] <= 31.5\\nsquared_error = 0.333\\nsamples = 6\\nvalue = 6.0'),\n",
" Text(0.6635514018691588, 0.5526315789473685, 'x[2] <= 0.67\\nsquared_error = 0.16\\nsamples = 5\\nvalue = 5.8'),\n",
" Text(0.660436137071651, 0.5, 'squared_error = 0.0\\nsamples = 4\\nvalue = 6.0'),\n",
" Text(0.6666666666666666, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.6697819314641744, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.67601246105919, 0.6578947368421053, 'x[5] <= 3.5\\nsquared_error = 0.372\\nsamples = 21\\nvalue = 6.095'),\n",
" Text(0.6728971962616822, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.6791277258566978, 0.6052631578947368, 'x[0] <= 5.8\\nsquared_error = 0.16\\nsamples = 20\\nvalue = 6.2'),\n",
" Text(0.67601246105919, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 2\\nvalue = 7.0'),\n",
" Text(0.6822429906542056, 0.5526315789473685, 'x[3] <= 5.25\\nsquared_error = 0.099\\nsamples = 18\\nvalue = 6.111'),\n",
" Text(0.6791277258566978, 0.5, 'x[10] <= 12.65\\nsquared_error = 0.055\\nsamples = 17\\nvalue = 6.059'),\n",
" Text(0.67601246105919, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 15\\nvalue = 6.0'),\n",
" Text(0.6822429906542056, 0.4473684210526316, 'x[2] <= 0.22\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 6.5'),\n",
" Text(0.6791277258566978, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.6853582554517134, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.6853582554517134, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.7165109034267912, 0.7105263157894737, 'x[4] <= 0.058\\nsquared_error = 0.343\\nsamples = 48\\nvalue = 5.771'),\n",
" Text(0.7040498442367601, 0.6578947368421053, 'x[1] <= 0.68\\nsquared_error = 0.373\\nsamples = 15\\nvalue = 5.4'),\n",
" Text(0.6978193146417445, 0.6052631578947368, 'x[7] <= 0.994\\nsquared_error = 0.25\\nsamples = 8\\nvalue = 5.0'),\n",
" Text(0.6947040498442367, 0.5526315789473685, 'x[6] <= 102.5\\nsquared_error = 0.122\\nsamples = 7\\nvalue = 5.143'),\n",
" Text(0.6915887850467289, 0.5, 'squared_error = 0.0\\nsamples = 6\\nvalue = 5.0'),\n",
" Text(0.6978193146417445, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.7009345794392523, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.7102803738317757, 0.6052631578947368, 'x[3] <= 2.45\\nsquared_error = 0.122\\nsamples = 7\\nvalue = 5.857'),\n",
" Text(0.7071651090342679, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 6\\nvalue = 6.0'),\n",
" Text(0.7133956386292835, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.7289719626168224, 0.6578947368421053, 'x[10] <= 12.85\\nsquared_error = 0.239\\nsamples = 33\\nvalue = 5.939'),\n",
" Text(0.7258566978193146, 0.6052631578947368, 'x[9] <= 0.525\\nsquared_error = 0.194\\nsamples = 31\\nvalue = 6.0'),\n",
" Text(0.719626168224299, 0.5526315789473685, 'x[9] <= 0.515\\nsquared_error = 0.25\\nsamples = 6\\nvalue = 5.5'),\n",
" Text(0.7165109034267912, 0.5, 'squared_error = 0.0\\nsamples = 3\\nvalue = 6.0'),\n",
" Text(0.7227414330218068, 0.5, 'squared_error = 0.0\\nsamples = 3\\nvalue = 5.0'),\n",
" Text(0.7320872274143302, 0.5526315789473685, 'x[4] <= 0.059\\nsquared_error = 0.106\\nsamples = 25\\nvalue = 6.12'),\n",
" Text(0.7289719626168224, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.735202492211838, 0.5, 'x[5] <= 4.0\\nsquared_error = 0.076\\nsamples = 24\\nvalue = 6.083'),\n",
" Text(0.7320872274143302, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.7383177570093458, 0.4473684210526316, 'x[9] <= 0.555\\nsquared_error = 0.042\\nsamples = 23\\nvalue = 6.043'),\n",
" Text(0.735202492211838, 0.39473684210526316, 'x[8] <= 3.44\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 6.333'),\n",
" Text(0.7320872274143302, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.7383177570093458, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.7414330218068536, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 20\\nvalue = 6.0'),\n",
" Text(0.7320872274143302, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.7320872274143302, 0.8157894736842105, 'x[3] <= 1.9\\nsquared_error = 0.543\\nsamples = 9\\nvalue = 3.889'),\n",
" Text(0.7289719626168224, 0.7631578947368421, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.735202492211838, 0.7631578947368421, 'x[4] <= 0.083\\nsquared_error = 0.245\\nsamples = 7\\nvalue = 3.571'),\n",
" Text(0.7320872274143302, 0.7105263157894737, 'squared_error = 0.0\\nsamples = 3\\nvalue = 4.0'),\n",
" Text(0.7383177570093458, 0.7105263157894737, 'x[2] <= 0.06\\nsquared_error = 0.188\\nsamples = 4\\nvalue = 3.25'),\n",
" Text(0.735202492211838, 0.6578947368421053, 'squared_error = 0.0\\nsamples = 3\\nvalue = 3.0'),\n",
" Text(0.7414330218068536, 0.6578947368421053, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.8853679906542056, 0.868421052631579, 'x[10] <= 11.55\\nsquared_error = 0.556\\nsamples = 275\\nvalue = 6.382'),\n",
" Text(0.8309968847352025, 0.8157894736842105, 'x[1] <= 0.395\\nsquared_error = 0.559\\nsamples = 158\\nvalue = 6.171'),\n",
" Text(0.7842679127725857, 0.7631578947368421, 'x[8] <= 3.255\\nsquared_error = 0.605\\nsamples = 73\\nvalue = 6.466'),\n",
" Text(0.7538940809968847, 0.7105263157894737, 'x[9] <= 0.705\\nsquared_error = 0.37\\nsamples = 31\\nvalue = 6.871'),\n",
" Text(0.7476635514018691, 0.6578947368421053, 'x[4] <= 0.079\\nsquared_error = 0.25\\nsamples = 6\\nvalue = 7.5'),\n",
" Text(0.7445482866043613, 0.6052631578947368, 'x[6] <= 28.0\\nsquared_error = 0.188\\nsamples = 4\\nvalue = 7.75'),\n",
" Text(0.7414330218068536, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 3\\nvalue = 8.0'),\n",
" Text(0.7476635514018691, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.7507788161993769, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 2\\nvalue = 7.0'),\n",
" Text(0.7601246105919003, 0.6578947368421053, 'x[0] <= 7.45\\nsquared_error = 0.282\\nsamples = 25\\nvalue = 6.72'),\n",
" Text(0.7570093457943925, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 8.0'),\n",
" Text(0.7632398753894081, 0.6052631578947368, 'x[0] <= 8.3\\nsquared_error = 0.222\\nsamples = 24\\nvalue = 6.667'),\n",
" Text(0.7601246105919003, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 3\\nvalue = 6.0'),\n",
" Text(0.7663551401869159, 0.5526315789473685, 'x[5] <= 23.0\\nsquared_error = 0.181\\nsamples = 21\\nvalue = 6.762'),\n",
" Text(0.7632398753894081, 0.5, 'x[9] <= 0.75\\nsquared_error = 0.133\\nsamples = 19\\nvalue = 6.842'),\n",
" Text(0.7570093457943925, 0.4473684210526316, 'x[3] <= 2.2\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 6.333'),\n",
" Text(0.7538940809968847, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.7601246105919003, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.7694704049844237, 0.4473684210526316, 'x[9] <= 1.055\\nsquared_error = 0.059\\nsamples = 16\\nvalue = 6.938'),\n",
" Text(0.7663551401869159, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 15\\nvalue = 7.0'),\n",
" Text(0.7725856697819314, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.7694704049844237, 0.5, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.8146417445482866, 0.7105263157894737, 'x[6] <= 52.0\\nsquared_error = 0.567\\nsamples = 42\\nvalue = 6.167'),\n",
" Text(0.7975077881619937, 0.6578947368421053, 'x[2] <= 0.47\\nsquared_error = 0.444\\nsamples = 28\\nvalue = 6.357'),\n",
" Text(0.7850467289719626, 0.6052631578947368, 'x[7] <= 0.994\\nsquared_error = 0.349\\nsamples = 18\\nvalue = 6.611'),\n",
" Text(0.778816199376947, 0.5526315789473685, 'x[7] <= 0.994\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.667'),\n",
" Text(0.7757009345794392, 0.5, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.7819314641744548, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.7912772585669782, 0.5526315789473685, 'x[2] <= 0.335\\nsquared_error = 0.16\\nsamples = 15\\nvalue = 6.8'),\n",
" Text(0.7881619937694704, 0.5, 'x[1] <= 0.315\\nsquared_error = 0.24\\nsamples = 5\\nvalue = 6.4'),\n",
" Text(0.7850467289719626, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 2\\nvalue = 7.0'),\n",
" Text(0.7912772585669782, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 3\\nvalue = 6.0'),\n",
" Text(0.794392523364486, 0.5, 'squared_error = 0.0\\nsamples = 10\\nvalue = 7.0'),\n",
" Text(0.8099688473520249, 0.6052631578947368, 'x[10] <= 10.65\\nsquared_error = 0.29\\nsamples = 10\\nvalue = 5.9'),\n",
" Text(0.8037383177570093, 0.5526315789473685, 'x[9] <= 0.915\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.333'),\n",
" Text(0.8006230529595015, 0.5, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.8068535825545171, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.8161993769470405, 0.5526315789473685, 'x[5] <= 5.5\\nsquared_error = 0.122\\nsamples = 7\\nvalue = 6.143'),\n",
" Text(0.8130841121495327, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.8193146417445483, 0.5, 'squared_error = 0.0\\nsamples = 6\\nvalue = 6.0'),\n",
" Text(0.8317757009345794, 0.6578947368421053, 'x[0] <= 8.05\\nsquared_error = 0.597\\nsamples = 14\\nvalue = 5.786'),\n",
" Text(0.8255451713395638, 0.6052631578947368, 'x[1] <= 0.373\\nsquared_error = 0.139\\nsamples = 6\\nvalue = 5.167'),\n",
" Text(0.822429906542056, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 5\\nvalue = 5.0'),\n",
" Text(0.8286604361370716, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.838006230529595, 0.6052631578947368, 'x[2] <= 0.56\\nsquared_error = 0.438\\nsamples = 8\\nvalue = 6.25'),\n",
" Text(0.8348909657320872, 0.5526315789473685, 'x[1] <= 0.345\\nsquared_error = 0.245\\nsamples = 7\\nvalue = 6.429'),\n",
" Text(0.8317757009345794, 0.5, 'squared_error = 0.0\\nsamples = 3\\nvalue = 7.0'),\n",
" Text(0.838006230529595, 0.5, 'squared_error = 0.0\\nsamples = 4\\nvalue = 6.0'),\n",
" Text(0.8411214953271028, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.8777258566978193, 0.7631578947368421, 'x[4] <= 0.093\\nsquared_error = 0.381\\nsamples = 85\\nvalue = 5.918'),\n",
" Text(0.8644859813084113, 0.7105263157894737, 'x[6] <= 73.5\\nsquared_error = 0.279\\nsamples = 68\\nvalue = 6.015'),\n",
" Text(0.8566978193146417, 0.6578947368421053, 'x[10] <= 11.45\\nsquared_error = 0.235\\nsamples = 62\\nvalue = 6.081'),\n",
" Text(0.8504672897196262, 0.6052631578947368, 'x[8] <= 3.57\\nsquared_error = 0.206\\nsamples = 58\\nvalue = 6.034'),\n",
" Text(0.8473520249221184, 0.5526315789473685, 'x[4] <= 0.09\\nsquared_error = 0.179\\nsamples = 56\\nvalue = 6.0'),\n",
" Text(0.8442367601246106, 0.5, 'x[10] <= 10.575\\nsquared_error = 0.147\\nsamples = 54\\nvalue = 5.963'),\n",
" Text(0.8411214953271028, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.8473520249221184, 0.4473684210526316, 'x[7] <= 1.0\\nsquared_error = 0.129\\nsamples = 53\\nvalue = 5.943'),\n",
" Text(0.8387850467289719, 0.39473684210526316, 'x[2] <= 0.29\\nsquared_error = 0.104\\nsamples = 48\\nvalue = 5.979'),\n",
" Text(0.8309968847352025, 0.34210526315789475, 'x[6] <= 36.5\\nsquared_error = 0.09\\nsamples = 30\\nvalue = 5.9'),\n",
" Text(0.8278816199376947, 0.2894736842105263, 'x[0] <= 7.7\\nsquared_error = 0.152\\nsamples = 16\\nvalue = 5.812'),\n",
" Text(0.8216510903426791, 0.23684210526315788, 'x[10] <= 10.7\\nsquared_error = 0.071\\nsamples = 13\\nvalue = 5.923'),\n",
" Text(0.8185358255451713, 0.18421052631578946, 'x[1] <= 0.535\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 5.5'),\n",
" Text(0.8154205607476636, 0.13157894736842105, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.8216510903426791, 0.13157894736842105, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.8247663551401869, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 11\\nvalue = 6.0'),\n",
" Text(0.8341121495327103, 0.23684210526315788, 'x[10] <= 10.8\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 5.333'),\n",
" Text(0.8309968847352025, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.8372274143302181, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.8341121495327103, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 14\\nvalue = 6.0'),\n",
" Text(0.8465732087227414, 0.34210526315789475, 'x[2] <= 0.315\\nsquared_error = 0.099\\nsamples = 18\\nvalue = 6.111'),\n",
" Text(0.8434579439252337, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.8496884735202492, 0.2894736842105263, 'x[7] <= 0.996\\nsquared_error = 0.055\\nsamples = 17\\nvalue = 6.059'),\n",
" Text(0.8465732087227414, 0.23684210526315788, 'x[2] <= 0.375\\nsquared_error = 0.25\\nsamples = 2\\nvalue = 6.5'),\n",
" Text(0.8434579439252337, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.8496884735202492, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.852803738317757, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 15\\nvalue = 6.0'),\n",
" Text(0.8559190031152648, 0.39473684210526316, 'x[7] <= 1.0\\nsquared_error = 0.24\\nsamples = 5\\nvalue = 5.6'),\n",
" Text(0.852803738317757, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.8590342679127726, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 3\\nvalue = 6.0'),\n",
" Text(0.8504672897196262, 0.5, 'squared_error = 0.0\\nsamples = 2\\nvalue = 7.0'),\n",
" Text(0.8535825545171339, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 2\\nvalue = 7.0'),\n",
" Text(0.8629283489096573, 0.6052631578947368, 'x[0] <= 10.05\\nsquared_error = 0.188\\nsamples = 4\\nvalue = 6.75'),\n",
" Text(0.8598130841121495, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 3\\nvalue = 7.0'),\n",
" Text(0.8660436137071651, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.8722741433021807, 0.6578947368421053, 'x[5] <= 24.0\\nsquared_error = 0.222\\nsamples = 6\\nvalue = 5.333'),\n",
" Text(0.8691588785046729, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 4\\nvalue = 5.0'),\n",
" Text(0.8753894080996885, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.8909657320872274, 0.7105263157894737, 'x[10] <= 11.15\\nsquared_error = 0.602\\nsamples = 17\\nvalue = 5.529'),\n",
" Text(0.8847352024922118, 0.6578947368421053, 'x[0] <= 8.0\\nsquared_error = 0.286\\nsamples = 7\\nvalue = 5.0'),\n",
" Text(0.881619937694704, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 4.0'),\n",
" Text(0.8878504672897196, 0.6052631578947368, 'x[8] <= 3.275\\nsquared_error = 0.139\\nsamples = 6\\nvalue = 5.167'),\n",
" Text(0.8847352024922118, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 5\\nvalue = 5.0'),\n",
" Text(0.8909657320872274, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.897196261682243, 0.6578947368421053, 'x[6] <= 18.0\\nsquared_error = 0.49\\nsamples = 10\\nvalue = 5.9'),\n",
" Text(0.8940809968847352, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 2\\nvalue = 5.0'),\n",
" Text(0.9003115264797508, 0.6052631578947368, 'x[1] <= 0.782\\nsquared_error = 0.359\\nsamples = 8\\nvalue = 6.125'),\n",
" Text(0.897196261682243, 0.5526315789473685, 'x[7] <= 0.995\\nsquared_error = 0.204\\nsamples = 7\\nvalue = 6.286'),\n",
" Text(0.8940809968847352, 0.5, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.9003115264797508, 0.5, 'x[5] <= 9.5\\nsquared_error = 0.139\\nsamples = 6\\nvalue = 6.167'),\n",
" Text(0.897196261682243, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.9034267912772586, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 5\\nvalue = 6.0'),\n",
" Text(0.9034267912772586, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.9397390965732088, 0.8157894736842105, 'x[7] <= 0.993\\nsquared_error = 0.41\\nsamples = 117\\nvalue = 6.667'),\n",
" Text(0.9096573208722741, 0.7631578947368421, 'x[1] <= 0.4\\nsquared_error = 0.438\\nsamples = 13\\nvalue = 7.154'),\n",
" Text(0.9065420560747663, 0.7105263157894737, 'squared_error = 0.0\\nsamples = 2\\nvalue = 6.0'),\n",
" Text(0.9127725856697819, 0.7105263157894737, 'x[0] <= 5.45\\nsquared_error = 0.231\\nsamples = 11\\nvalue = 7.364'),\n",
" Text(0.9096573208722741, 0.6578947368421053, 'x[4] <= 0.054\\nsquared_error = 0.109\\nsamples = 8\\nvalue = 7.125'),\n",
" Text(0.9065420560747663, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 7\\nvalue = 7.0'),\n",
" Text(0.9127725856697819, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 8.0'),\n",
" Text(0.9158878504672897, 0.6578947368421053, 'squared_error = 0.0\\nsamples = 3\\nvalue = 8.0'),\n",
" Text(0.9698208722741433, 0.7631578947368421, 'x[6] <= 56.5\\nsquared_error = 0.373\\nsamples = 104\\nvalue = 6.606'),\n",
" Text(0.9458722741433022, 0.7105263157894737, 'x[9] <= 0.685\\nsquared_error = 0.352\\nsamples = 90\\nvalue = 6.678'),\n",
" Text(0.9252336448598131, 0.6578947368421053, 'x[6] <= 17.5\\nsquared_error = 0.216\\nsamples = 19\\nvalue = 6.316'),\n",
" Text(0.9190031152647975, 0.6052631578947368, 'x[7] <= 0.996\\nsquared_error = 0.139\\nsamples = 6\\nvalue = 6.833'),\n",
" Text(0.9158878504672897, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.9221183800623053, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 5\\nvalue = 7.0'),\n",
" Text(0.9314641744548287, 0.6052631578947368, 'x[5] <= 5.5\\nsquared_error = 0.071\\nsamples = 13\\nvalue = 6.077'),\n",
" Text(0.9283489096573209, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.9345794392523364, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 12\\nvalue = 6.0'),\n",
" Text(0.9665109034267912, 0.6578947368421053, 'x[10] <= 12.45\\nsquared_error = 0.344\\nsamples = 71\\nvalue = 6.775'),\n",
" Text(0.9517133956386293, 0.6052631578947368, 'x[6] <= 34.5\\nsquared_error = 0.304\\nsamples = 50\\nvalue = 6.66'),\n",
" Text(0.940809968847352, 0.5526315789473685, 'x[5] <= 5.5\\nsquared_error = 0.228\\nsamples = 36\\nvalue = 6.778'),\n",
" Text(0.9345794392523364, 0.5, 'x[8] <= 3.205\\nsquared_error = 0.139\\nsamples = 6\\nvalue = 6.167'),\n",
" Text(0.9314641744548287, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.9376947040498442, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 5\\nvalue = 6.0'),\n",
" Text(0.9470404984423676, 0.5, 'x[6] <= 13.0\\nsquared_error = 0.157\\nsamples = 30\\nvalue = 6.9'),\n",
" Text(0.9439252336448598, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 8.0'),\n",
" Text(0.9501557632398754, 0.4473684210526316, 'x[4] <= 0.053\\nsquared_error = 0.119\\nsamples = 29\\nvalue = 6.862'),\n",
" Text(0.9470404984423676, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.9532710280373832, 0.39473684210526316, 'x[3] <= 1.65\\nsquared_error = 0.096\\nsamples = 28\\nvalue = 6.893'),\n",
" Text(0.9501557632398754, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.956386292834891, 0.34210526315789475, 'x[4] <= 0.161\\nsquared_error = 0.069\\nsamples = 27\\nvalue = 6.926'),\n",
" Text(0.9532710280373832, 0.2894736842105263, 'x[9] <= 0.91\\nsquared_error = 0.037\\nsamples = 26\\nvalue = 6.962'),\n",
" Text(0.9501557632398754, 0.23684210526315788, 'squared_error = 0.0\\nsamples = 22\\nvalue = 7.0'),\n",
" Text(0.956386292834891, 0.23684210526315788, 'x[9] <= 0.96\\nsquared_error = 0.188\\nsamples = 4\\nvalue = 6.75'),\n",
" Text(0.9532710280373832, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.9595015576323987, 0.18421052631578946, 'squared_error = 0.0\\nsamples = 3\\nvalue = 7.0'),\n",
" Text(0.9595015576323987, 0.2894736842105263, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.9626168224299065, 0.5526315789473685, 'x[6] <= 47.0\\nsquared_error = 0.372\\nsamples = 14\\nvalue = 6.357'),\n",
" Text(0.9595015576323987, 0.5, 'x[4] <= 0.06\\nsquared_error = 0.29\\nsamples = 10\\nvalue = 6.1'),\n",
" Text(0.956386292834891, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.9626168224299065, 0.4473684210526316, 'x[3] <= 2.35\\nsquared_error = 0.173\\nsamples = 9\\nvalue = 6.222'),\n",
" Text(0.9595015576323987, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 6\\nvalue = 6.0'),\n",
" Text(0.9657320872274143, 0.39473684210526316, 'x[7] <= 0.997\\nsquared_error = 0.222\\nsamples = 3\\nvalue = 6.667'),\n",
" Text(0.9626168224299065, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 2\\nvalue = 7.0'),\n",
" Text(0.9688473520249221, 0.34210526315789475, 'squared_error = 0.0\\nsamples = 1\\nvalue = 6.0'),\n",
" Text(0.9657320872274143, 0.5, 'squared_error = 0.0\\nsamples = 4\\nvalue = 7.0'),\n",
" Text(0.9813084112149533, 0.6052631578947368, 'x[9] <= 0.695\\nsquared_error = 0.331\\nsamples = 21\\nvalue = 7.048'),\n",
" Text(0.9781931464174455, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 2\\nvalue = 8.0'),\n",
" Text(0.9844236760124611, 0.5526315789473685, 'x[0] <= 8.75\\nsquared_error = 0.26\\nsamples = 19\\nvalue = 6.947'),\n",
" Text(0.9781931464174455, 0.5, 'x[2] <= 0.455\\nsquared_error = 0.13\\nsamples = 13\\nvalue = 7.154'),\n",
" Text(0.9750778816199377, 0.4473684210526316, 'x[6] <= 44.0\\nsquared_error = 0.076\\nsamples = 12\\nvalue = 7.083'),\n",
" Text(0.9719626168224299, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 11\\nvalue = 7.0'),\n",
" Text(0.9781931464174455, 0.39473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 8.0'),\n",
" Text(0.9813084112149533, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 1\\nvalue = 8.0'),\n",
" Text(0.9906542056074766, 0.5, 'x[6] <= 25.0\\nsquared_error = 0.25\\nsamples = 6\\nvalue = 6.5'),\n",
" Text(0.9875389408099688, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 3\\nvalue = 6.0'),\n",
" Text(0.9937694704049844, 0.4473684210526316, 'squared_error = 0.0\\nsamples = 3\\nvalue = 7.0'),\n",
" Text(0.9937694704049844, 0.7105263157894737, 'x[2] <= 0.69\\nsquared_error = 0.265\\nsamples = 14\\nvalue = 6.143'),\n",
" Text(0.9906542056074766, 0.6578947368421053, 'x[8] <= 3.105\\nsquared_error = 0.167\\nsamples = 12\\nvalue = 6.0'),\n",
" Text(0.9875389408099688, 0.6052631578947368, 'squared_error = 0.0\\nsamples = 1\\nvalue = 5.0'),\n",
" Text(0.9937694704049844, 0.6052631578947368, 'x[0] <= 9.15\\nsquared_error = 0.083\\nsamples = 11\\nvalue = 6.091'),\n",
" Text(0.9906542056074766, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 10\\nvalue = 6.0'),\n",
" Text(0.9968847352024922, 0.5526315789473685, 'squared_error = 0.0\\nsamples = 1\\nvalue = 7.0'),\n",
" Text(0.9968847352024922, 0.6578947368421053, 'squared_error = 0.0\\nsamples = 2\\nvalue = 7.0')]"
2024-09-23 23:22:33 +00:00
]
},
2024-09-27 05:31:03 +00:00
"execution_count": 13,
2024-09-23 23:22:33 +00:00
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
2024-09-27 05:31:03 +00:00
"image/png": "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
2024-09-23 23:22:33 +00:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"regressor = DecisionTreeRegressor()\n",
"regressor.fit(X_train, y_train)\n",
"tree.plot_tree(regressor)"
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 14,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Actual Predicted\n",
"0 6 5.0\n",
"1 5 6.0\n",
"2 7 7.0\n",
"3 6 5.0\n",
"4 5 5.0\n",
".. ... ...\n",
"315 6 6.0\n",
2024-09-27 05:31:03 +00:00
"316 4 6.0\n",
2024-09-23 23:22:33 +00:00
"317 5 5.0\n",
"318 4 5.0\n",
"319 6 7.0\n",
"\n",
"[320 rows x 2 columns]\n"
]
}
],
"source": [
"y_pred = regressor.predict(X_test)\n",
"df = pd.DataFrame({'Actual':y_test, 'Predicted':y_pred})\n",
"print(df)"
]
},
{
"cell_type": "code",
2024-09-27 05:31:03 +00:00
"execution_count": 15,
2024-09-23 23:22:33 +00:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2024-09-27 05:31:03 +00:00
"MSE: 0.675\n",
"MAE: 0.475\n"
2024-09-23 23:22:33 +00:00
]
},
{
"data": {
"text/plain": [
2024-09-27 05:31:03 +00:00
"np.float64(8.427929427430094)"
2024-09-23 23:22:33 +00:00
]
},
2024-09-27 05:31:03 +00:00
"execution_count": 15,
2024-09-23 23:22:33 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"print('MSE:', metrics.mean_squared_error(y_test, y_pred))\n",
"print('MAE:', metrics.mean_absolute_error(y_test, y_pred))\n",
"\n",
"metrics.mean_absolute_error(y_test, y_pred) / np.average(y) * 100"
]
}
],
"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",
2024-09-27 05:31:03 +00:00
"version": "3.12.5"
2024-09-23 23:22:33 +00:00
}
},
"nbformat": 4,
"nbformat_minor": 2
}