master-thesis/EvolutionaryAlgorithm/EvolutionaryAlgorithm.ipynb

2319 lines
101 KiB
Plaintext
Raw Normal View History

2019-09-05 12:03:01 +02:00
{
"cells": [
2019-09-19 10:19:35 +02:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Evolutionary Algorithm"
]
},
2019-09-05 12:03:01 +02:00
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
" <script type=\"text/javascript\">\n",
" window.PlotlyConfig = {MathJaxConfig: 'local'};\n",
" if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n",
" if (typeof require !== 'undefined') {\n",
" require.undef(\"plotly\");\n",
" requirejs.config({\n",
" paths: {\n",
" 'plotly': ['https://cdn.plot.ly/plotly-latest.min']\n",
" }\n",
" });\n",
" require(['plotly'], function(Plotly) {\n",
" window._Plotly = Plotly;\n",
" });\n",
" }\n",
" </script>\n",
" "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
" <script type=\"text/javascript\">\n",
" window.PlotlyConfig = {MathJaxConfig: 'local'};\n",
" if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n",
" if (typeof require !== 'undefined') {\n",
" require.undef(\"plotly\");\n",
" requirejs.config({\n",
" paths: {\n",
" 'plotly': ['https://cdn.plot.ly/plotly-latest.min']\n",
" }\n",
" });\n",
" require(['plotly'], function(Plotly) {\n",
" window._Plotly = Plotly;\n",
" });\n",
" }\n",
" </script>\n",
" "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import sys\n",
"sys.path.append(\"../\")\n",
"sys.path.append(\"../RecipeAnalysis/\")\n",
"\n",
"import settings\n",
"\n",
"import pycrfsuite\n",
"\n",
"import json\n",
"\n",
"import db.db_settings as db_settings\n",
"from db.database_connection import DatabaseConnection\n",
"\n",
"from Tagging.conllu_generator import ConlluGenerator\n",
"from Tagging.crf_data_generator import *\n",
"\n",
"from RecipeAnalysis.Recipe import Ingredient\n",
"\n",
"from difflib import SequenceMatcher\n",
"\n",
"import numpy as np\n",
"\n",
"import plotly.graph_objs as go\n",
"from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot\n",
"from plotly.subplots import make_subplots\n",
"init_notebook_mode(connected=True)\n",
"\n",
"from graphviz import Digraph\n",
"\n",
"import itertools\n",
"\n",
"import random\n",
"\n",
"import plotly.io as pio\n",
"pio.renderers.default = \"jupyterlab\"\n",
"\n",
"from IPython.display import Markdown, HTML, display\n",
"\n",
"from copy import deepcopy"
]
},
2019-09-19 10:19:35 +02:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## load adjacency matrices"
]
},
2019-09-05 12:03:01 +02:00
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import pickle\n",
"m_act = pickle.load(open(\"m_act.pickle\", \"rb\"))\n",
"m_mix = pickle.load(open(\"m_mix.pickle\", \"rb\"))\n",
"m_base_act = pickle.load(open(\"m_base_act.pickle\", \"rb\"))\n",
"m_base_mix = pickle.load(open(\"m_base_mix.pickle\", \"rb\"))\n",
"\n",
"c_act = m_act.get_csr()\n",
"c_mix = m_mix.get_csr()\n",
"c_base_act = m_base_act.get_csr()\n",
"c_base_mix = m_base_mix.get_csr()\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"actions = m_act.get_labels()[0]"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"base_ingredients = m_base_mix.get_labels()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
2019-09-19 10:19:35 +02:00
"source": [
"sym_label_buffer = {}\n",
"fw_label_buffer = {}\n",
"bw_label_buffer = {}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### hepler functions for adjacency matrices"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
2019-09-05 12:03:01 +02:00
"source": [
"def get_sym_adjacent(key, m, c):\n",
" index = m._label_index[key]\n",
" i1 = c[index,:].nonzero()[1]\n",
" i2 = c[:,index].nonzero()[0]\n",
" \n",
" i = np.concatenate((i1,i2))\n",
" \n",
2019-09-19 10:19:35 +02:00
" if m in sym_label_buffer:\n",
" names = sym_label_buffer[m][i]\n",
" else:\n",
" names = np.array(m.get_labels())\n",
" sym_label_buffer[m] = names\n",
" names = names[i]\n",
2019-09-05 12:03:01 +02:00
" \n",
" counts = np.concatenate((c[index, i1].toarray().flatten(), c[i2, index].toarray().flatten()))\n",
" \n",
" s = np.argsort(-counts)\n",
" \n",
" return names[s], counts[s]"
]
},
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 7,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [],
"source": [
"def get_forward_adjacent(key, m, c):\n",
" index = m._x_label_index[key]\n",
" i = c[index,:].nonzero()[1]\n",
" \n",
2019-09-19 10:19:35 +02:00
" if m in fw_label_buffer:\n",
" names = fw_label_buffer[m][i]\n",
" else:\n",
" names = np.array(m._y_labels)\n",
" fw_label_buffer[m] = names\n",
" names = names[i]\n",
" \n",
2019-09-05 12:03:01 +02:00
" \n",
" counts = c[index, i].toarray().flatten()\n",
" \n",
" s = np.argsort(-counts)\n",
" \n",
" return names[s], counts[s]"
]
},
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 8,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [],
"source": [
"def get_backward_adjacent(key, m, c):\n",
" index = m._y_label_index[key]\n",
" i = c[:,index].nonzero()[0]\n",
" \n",
2019-09-19 10:19:35 +02:00
" if m in bw_label_buffer:\n",
" names = bw_label_buffer[m][i]\n",
" else:\n",
" names = np.array(m._x_labels)\n",
" bw_label_buffer[m] = names\n",
" names = names[i]\n",
" \n",
2019-09-05 12:03:01 +02:00
" \n",
" counts = c[i, index].toarray().flatten()\n",
" \n",
" s = np.argsort(-counts)\n",
" \n",
" return names[s], counts[s]"
]
},
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 9,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [],
"source": [
"def sym_sum(key, m, c):\n",
" return np.sum(get_sym_adjacent(key,m,c)[1])\n",
"\n",
"def fw_sum(key, m, c):\n",
" return np.sum(get_forward_adjacent(key,m,c)[1])\n",
"\n",
"def bw_sum(key, m, c):\n",
" return np.sum(get_backward_adjacent(key,m,c)[1])"
]
},
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 10,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [],
"source": [
"def sym_score(key_a, key_b, m, c):\n",
"\n",
" ia = m._label_index[key_a]\n",
" ib = m._label_index[key_b]\n",
" \n",
" v = c[ia,ib] + c[ib,ia]\n",
" \n",
" if v == 0:\n",
" return 0\n",
" \n",
" return max((v/sym_sum(key_a, m, c)), (v/sym_sum(key_b, m, c)))\n",
"\n",
"def asym_score(key_a, key_b, m, c):\n",
" ia = m._x_label_index[key_a]\n",
" ib = m._y_label_index[key_b]\n",
" \n",
" v = c[ia,ib]\n",
" \n",
" if v == 0:\n",
" return 0\n",
" \n",
" return max(v/fw_sum(key_a, m, c), v/bw_sum(key_b, m, c))"
]
},
2019-09-19 10:19:35 +02:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Recipe Tree\n",
"### Tree Node Base Class"
]
},
2019-09-05 12:03:01 +02:00
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 11,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [],
"source": [
"class RecipeTreeNode(object):\n",
" \n",
" id = 0\n",
" \n",
" def __init__(self, name, constant=False, single_child=False):\n",
" self._constant = constant\n",
" self._name = name\n",
" self._parent = None\n",
" \n",
" self._id = str(RecipeTreeNode.id)\n",
" RecipeTreeNode.id += 1\n",
" \n",
" self._single_child = single_child\n",
" \n",
" if self._single_child:\n",
" self._child = None\n",
" \n",
" def child():\n",
" return self._child\n",
" \n",
" def remove_child(c):\n",
" assert c == self._child\n",
" self._child._parent = None\n",
" self._child = None\n",
" \n",
" def childs():\n",
" c = self.child()\n",
" if c is None:\n",
" return set()\n",
" return set([c])\n",
" \n",
" def add_child(n):\n",
" self._child = n\n",
" n._parent = self\n",
" \n",
" self.child = child\n",
" self.childs = childs\n",
" self.add_child = add_child\n",
" self.remove_child = remove_child\n",
" else:\n",
" self._childs = set()\n",
" \n",
" def childs():\n",
" return self._childs\n",
" \n",
" def add_child(n):\n",
" self._childs.add(n)\n",
" n._parent = self\n",
" \n",
" def remove_child(c):\n",
" assert c in self._childs\n",
" c._parent = None\n",
" self._childs.remove(c)\n",
" \n",
" self.childs = childs\n",
" self.add_child = add_child\n",
" self.remove_child = remove_child\n",
" \n",
" def parent(self):\n",
" return self._parent\n",
" \n",
" def name(self):\n",
" return self._name\n",
" \n",
" def traverse(self):\n",
" l = []\n",
" \n",
" for c in self.childs():\n",
" l += c.traverse()\n",
" \n",
" return [self] + l\n",
" \n",
" def traverse_ingredients(self):\n",
" ingredient_set = []\n",
" for c in self.childs():\n",
" ingredient_set += c.traverse_ingredients()\n",
" \n",
" return ingredient_set\n",
" \n",
" def remove(self):\n",
" p = self.parent()\n",
" childs = self.childs().copy()\n",
" \n",
" assert p is None or not (len(childs) > 1 and p._single_child)\n",
" \n",
" for c in childs:\n",
" self.remove_child(c)\n",
" \n",
" if p is not None:\n",
" p.remove_child(self)\n",
" \n",
" if self._single_child and self._child is not None and p._name == self._child._name:\n",
" # two adjacent nodes with same name would remain after deletion.\n",
" # merge them! (by adding the child's childs to our parent instead of our childs)\n",
" childs = self._child.childs()\n",
" self._child.remove()\n",
" \n",
" \n",
" for c in childs:\n",
" p.add_child(c)\n",
" \n",
" def insert_before(self, n):\n",
" p = self._parent\n",
" if p is not None:\n",
" p.remove_child(self)\n",
" p.add_child(n)\n",
" n.add_child(self)\n",
" \n",
" def mutate(self):\n",
" n_node = self.n_node_mutate_options()\n",
" n_edge = self.n_edge_mutate_options()\n",
" \n",
" choice = random.choice(range(n_node + n_edge))\n",
" if choice < n_node:\n",
" self.mutate_node()\n",
" else:\n",
" self.mutate_edges()\n",
" \n",
" def mutate_edges(self):\n",
" ings = self.traverse_ingredients()\n",
" ing = random.choice(ings)\n",
" \n",
" a, w = get_backward_adjacent(ing._base_ingredient, m_base_act, c_base_act)\n",
" \n",
" action = random.choices(a, w)[0]\n",
" self.insert_before(ActionNode(action))\n",
" \n",
" def mutate_node(self):\n",
" raise NotImplementedError\n",
" \n",
" def n_node_mutate_options(self):\n",
" \n",
" return 0 if self._constant else 1\n",
" \n",
" def n_edge_mutate_options(self):\n",
" n = 1 if self._parent is not None else 0\n",
" return n\n",
" \n",
" def n_mutate_options(self):\n",
" return self.n_edge_mutate_options() + self.n_node_mutate_options()\n",
" \n",
" def dot_node(self, dot):\n",
" raise NotImplementedError()\n",
" \n",
" def dot(self, d=None):\n",
" if d is None:\n",
" d = Digraph()\n",
" self.dot_node(d)\n",
" \n",
" else:\n",
" self.dot_node(d)\n",
" if self._parent is not None:\n",
" d.edge(self._parent._id, self._id)\n",
" \n",
" \n",
" for c in self.childs():\n",
" c.dot(d)\n",
" \n",
" return d\n",
" \n",
" def serialize(self):\n",
" r = {}\n",
" r['type'] = str(self.__class__.__name__)\n",
" r['id'] = self._id\n",
" r['parent'] = self._parent._id if self._parent is not None else None\n",
" r['name'] = self._name\n",
" r['childs'] = [c._id for c in self.childs()]\n",
" r['constant'] = self._constant\n",
" r['single_child'] = self._single_child\n",
" \n",
" return r\n",
" \n",
" def node_score(self):\n",
" raise NotImplementedError()\n",
" \n",
" "
]
},
2019-09-19 10:19:35 +02:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Mix Node"
]
},
2019-09-05 12:03:01 +02:00
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 12,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [],
"source": [
"class MixNode(RecipeTreeNode):\n",
" def __init__(self, constant=False):\n",
" super().__init__(\"mix\", constant, single_child=False)\n",
" \n",
" def dot_node(self, dot):\n",
" dot.node(self._id, label=f\"{self._name} ({self.node_score()})\", shape=\"diamond\")\n",
" \n",
" def split(self, set_above, set_below, node_between):\n",
" assert len(set_above.difference(self.childs())) == 0\n",
" assert len(set_below.difference(self.childs())) == 0\n",
" \n",
" n_above = MixNode()\n",
" n_below = MixNode()\n",
" \n",
" p = self.parent()\n",
" \n",
" for c in self.childs().copy():\n",
" self.remove_child(c)\n",
" self.remove()\n",
" \n",
" for c in set_below:\n",
" n_below.add_child(c)\n",
" \n",
" for c in set_above:\n",
" n_above.add_child(c)\n",
" \n",
" n_above.add_child(node_between)\n",
" node_between.add_child(n_below)\n",
" \n",
" if p is not None:\n",
" p.add_child(n_above)\n",
" \n",
" # test whether the mix nodes are useless\n",
" if len(n_above.childs()) == 1:\n",
" n_above.remove()\n",
" \n",
" if len(n_below.childs()) == 1:\n",
" n_below.remove()\n",
" \n",
" def n_node_mutate_options(self):\n",
" return 0 if self._constant or len(self.childs()) <= 2 else len(self.childs())\n",
" \n",
" def mutate_node(self):\n",
" \n",
" childs = self.childs()\n",
" \n",
" if len(childs) <= 2:\n",
" print(\"Warning: cannot modify mix node\")\n",
" return\n",
" \n",
" childs = random.sample(childs, len(childs))\n",
" \n",
" n = random.choice(range(1, len(childs)-1))\n",
" \n",
" between_node = ActionNode(random.choice(actions))\n",
" \n",
" self.split(set(childs[:n]), set(childs[n:]), between_node)\n",
" \n",
" \n",
" def node_score(self):\n",
" child_ingredients = [c.traverse_ingredients() for c in self.childs()]\n",
2019-09-19 10:19:35 +02:00
" \n",
" tmp_set = set()\n",
" cumulative_sets = []\n",
" \n",
2019-09-05 12:03:01 +02:00
" pairwise_tuples = []\n",
2019-09-19 10:19:35 +02:00
" \n",
" for c in child_ingredients:\n",
" if len(tmp_set) > 0:\n",
" cumulative_sets.append(tmp_set)\n",
" pairwise_tuples += [x for x in itertools.product(tmp_set, c)]\n",
" tmp_set = tmp_set.union(set(c))\n",
2019-09-05 12:03:01 +02:00
" \n",
" s_base = 0\n",
" s = 0\n",
" \n",
" for ing_a, ing_b in pairwise_tuples:\n",
" try:\n",
" #s_base += sym_score(ing_a._base_ingredient, ing_b._base_ingredient, m_base_mix, c_base_mix)\n",
" s += sym_score(ing_a.to_json(), ing_b.to_json(), m_mix, c_mix)\n",
" except:\n",
" pass\n",
" \n",
" #s_base /= len(pairwise_tuples)\n",
" s /= len(pairwise_tuples)\n",
" \n",
" #return 0.5 * (s_base + s)\n",
" return s\n",
" \n",
" \n",
" \n",
" "
]
},
2019-09-19 10:19:35 +02:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Ingredient Node Class"
]
},
2019-09-05 12:03:01 +02:00
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 13,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [],
"source": [
"class IngredientNode(RecipeTreeNode):\n",
" def __init__(self, name, constant=False):\n",
" super().__init__(name, constant, single_child=True)\n",
" \n",
" def get_actions(self):\n",
2019-09-19 10:19:35 +02:00
" a_list = []\n",
2019-09-05 12:03:01 +02:00
" n = self.parent()\n",
" while n is not None:\n",
" if type(n) == ActionNode:\n",
2019-09-19 10:19:35 +02:00
" a_list.append(n.name())\n",
" n = n.parent()\n",
" return a_list\n",
2019-09-05 12:03:01 +02:00
" \n",
" def mutate_node(self):\n",
" self._name = random.choice(base_ingredients)\n",
" \n",
" def traverse_ingredients(self):\n",
" return [Ingredient(self._name)]\n",
" \n",
" def node_score(self):\n",
2019-09-19 10:19:35 +02:00
" actions = self.get_actions()\n",
" \n",
" if len(actions) == 0:\n",
" return 1\n",
" \n",
" seen_actions = set()\n",
" n_duplicates = 0\n",
" for act in actions:\n",
" if act in seen_actions:\n",
" n_duplicates += 1\n",
" else:\n",
" seen_actions.add(act)\n",
" \n",
" return len(seen_actions) / len(actions)\n",
2019-09-05 12:03:01 +02:00
" \n",
" \n",
" def dot_node(self, dot):\n",
" dot.node(self._id, label=f\"{self._name} ({self.node_score()})\", shape=\"box\")"
]
},
2019-09-19 10:19:35 +02:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Action Node Class"
]
},
2019-09-05 12:03:01 +02:00
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 14,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [],
"source": [
"class ActionNode(RecipeTreeNode):\n",
" def __init__(self, name, constant=False):\n",
" super().__init__(name, constant, single_child=True)\n",
" \n",
" def n_node_mutate_options(self):\n",
" # beacause we can change or remove ourselve!\n",
" return 0 if self._constant else 2 \n",
" def mutate_node(self):\n",
" if random.choice(range(2)) == 0:\n",
" # change action\n",
" self._name = random.choice(actions)\n",
" else:\n",
" # delete\n",
" self.remove()\n",
" \n",
" def traverse_ingredients(self):\n",
" ingredient_set = super().traverse_ingredients()\n",
" for ing in ingredient_set:\n",
" ing.apply_action(self._name)\n",
" \n",
" return ingredient_set\n",
" \n",
" def node_score(self):\n",
" ings = self.child().traverse_ingredients()\n",
" \n",
" s = 0\n",
" \n",
" for ing in ings:\n",
" try:\n",
" score = asym_score(self._name, ing.to_json(), m_act, c_act)\n",
" #base_score = asym_score(self._name, ing._base_ingredient, m_base_act, c_base_act)\n",
" s += score\n",
" except KeyError as e:\n",
" pass\n",
" \n",
" \n",
" return s / len(ings)\n",
" \n",
" def dot_node(self, dot):\n",
" dot.node(self._id, label=f\"{self._name} ({self.node_score()})\", shape=\"ellipse\")"
]
},
2019-09-19 10:19:35 +02:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Tree Class"
]
},
2019-09-05 12:03:01 +02:00
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 15,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [],
"source": [
"class Tree(object):\n",
" \n",
" @staticmethod\n",
" def from_ingredients(ingredients: list):\n",
" root = MixNode()\n",
" \n",
" for ing in ingredients:\n",
" root.add_child(IngredientNode(ing, constant=True))\n",
" \n",
" return Tree(root)\n",
" \n",
" @staticmethod\n",
" def from_serialization(s):\n",
" def empty_node(raw_n):\n",
" if raw_n['type'] == \"MixNode\":\n",
" node = MixNode(raw_n['constant'])\n",
" elif raw_n['type'] == \"IngredientNode\":\n",
" node = IngredientNode(raw_n['name'], raw_n['constant'])\n",
" elif raw_n['type'] == \"ActionNode\":\n",
" node = ActionNode(raw_n['name'], raw_n['constant'])\n",
" else:\n",
" print(\"unknown node detected\")\n",
" return\n",
" \n",
" return node\n",
" \n",
" nodes = {}\n",
" for n in s:\n",
" nodes[n['id']] = empty_node(n)\n",
" \n",
" for n in s:\n",
" childs = n['childs']\n",
" id = n['id']\n",
" for c in childs:\n",
" nodes[id].add_child(nodes[c])\n",
" \n",
" return Tree(nodes[s[0]['id']])\n",
" \n",
" \n",
" def __init__(self, root):\n",
" # create a dummy entry node\n",
" self._root = RecipeTreeNode(\"root\", single_child=True)\n",
" self._root.add_child(root)\n",
" \n",
" def root(self):\n",
" return self._root.child()\n",
" \n",
" def mutate(self):\n",
" nodes = self.root().traverse()\n",
" weights = [n.n_mutate_options() for n in nodes]\n",
" \n",
" n = random.choices(nodes, weights)[0]\n",
" \n",
" n.mutate()\n",
" \n",
" def dot(self):\n",
" return self.root().dot()\n",
" \n",
" def serialize(self):\n",
" return [n.serialize() for n in self.root().traverse()]\n",
" \n",
" def structure_score(self):\n",
" n_duplicates = 0\n",
" \n",
" \n",
2019-09-19 10:19:35 +02:00
" def collect_scores(self):\n",
" self._mix_scores = []\n",
" self._act_scores = []\n",
" self._ing_scores = []\n",
2019-09-05 12:03:01 +02:00
" \n",
" nodes = self.root().traverse()\n",
2019-09-19 10:19:35 +02:00
" self._n_mix_nodes = 0\n",
" self._n_act_nodes = 0\n",
" self._n_ing_nodes = 0\n",
" \n",
2019-09-05 12:03:01 +02:00
" s = 0\n",
" for n in nodes:\n",
2019-09-19 10:19:35 +02:00
" if type(n) == MixNode:\n",
" self._mix_scores.append(n.node_score())\n",
" self._n_mix_nodes += 1\n",
" if type(n) == ActionNode:\n",
" self._act_scores.append(n.node_score())\n",
" self._n_act_nodes += 1\n",
" if type(n) == IngredientNode:\n",
" self._ing_scores.append(n.node_score())\n",
" self._n_ing_nodes += 1\n",
2019-09-05 12:03:01 +02:00
" \n",
2019-09-19 10:19:35 +02:00
" self._n_duplicates = 0\n",
2019-09-05 12:03:01 +02:00
" seen_actions = set()\n",
" \n",
" for n in nodes:\n",
" if type(n) == ActionNode:\n",
" if n.name() in seen_actions:\n",
2019-09-19 10:19:35 +02:00
" self._n_duplicates += 1\n",
2019-09-05 12:03:01 +02:00
" else:\n",
" seen_actions.add(n.name())\n",
" \n",
2019-09-19 10:19:35 +02:00
" self._mix_scores = np.array(self._mix_scores)\n",
" self._act_scores = np.array(self._act_scores)\n",
" self._ing_scores = np.array(self._ing_scores)\n",
2019-09-05 12:03:01 +02:00
" \n",
2019-09-19 10:19:35 +02:00
" \n",
" def mix_scores(self):\n",
" return self._mix_scores\n",
" \n",
" def action_scores(self):\n",
" return self._act_scores\n",
" \n",
" def ing_scores(self):\n",
" return self._ing_scores\n",
" \n",
" def bounds_mix_scores(self):\n",
" \n",
" nonzeros = self._mix_scores[self._mix_scores > 0]\n",
" if len(nonzeros) > 0:\n",
" mmax = np.max(nonzeros)\n",
" mmin = np.min(nonzeros)\n",
" return mmin, mmax\n",
" else:\n",
" return None, None\n",
" \n",
" def bounds_act_scores(self):\n",
" \n",
" if len(self._act_scores) == 0:\n",
" return None, None\n",
" nonzeros = self._act_scores[self._act_scores > 0]\n",
" if len(nonzeros) > 0:\n",
" mmax = np.max(nonzeros)\n",
" mmin = np.min(nonzeros)\n",
" return mmin, mmax\n",
" else:\n",
" return None, None\n",
" \n",
" def normalized_mix_scores(self, min, max):\n",
" if (max != min):\n",
" normalized = (self._mix_scores - min)/(max-min)\n",
" normalized[normalized <= 0] = 0\n",
" return normalized\n",
" else:\n",
" return None\n",
" \n",
" def normalized_act_scores(self, min, max):\n",
" if len(self._act_scores) == 0 or max == min:\n",
" return None\n",
" normalized = (self._act_scores - min)/(max-min)\n",
" normalized[normalized <= 0] = 0\n",
" return normalized\n",
2019-09-05 12:03:01 +02:00
" \n",
" def copy(self):\n",
" return Tree.from_serialization(self.serialize())\n"
]
},
2019-09-19 10:19:35 +02:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Population"
]
},
2019-09-05 12:03:01 +02:00
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 16,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [],
"source": [
"class Population(object):\n",
" def __init__(self, start_ingredients, n_population = 10):\n",
" self.population = [Tree.from_ingredients(start_ingredients) for i in range(n_population)]\n",
" self._n = n_population\n",
2019-09-19 10:19:35 +02:00
" self._mix_min = None\n",
" self._mix_max = None\n",
" self._act_min = None\n",
" self._act_max = None\n",
" self._mix_scores = None\n",
" self._act_scores = None\n",
" self._scores = None\n",
2019-09-05 12:03:01 +02:00
" \n",
" def mutate(self):\n",
" for tree in self.population.copy():\n",
" t_clone = tree.copy()\n",
" t_clone.mutate()\n",
" self.population.append(t_clone)\n",
" \n",
" def pairwise_competition(self):\n",
" new_population = []\n",
2019-09-19 10:19:35 +02:00
" indices = list(range(len(self.population)))\n",
" random.shuffle(indices)\n",
2019-09-05 12:03:01 +02:00
" \n",
2019-09-19 10:19:35 +02:00
" for i in range(len(self.population) // 2):\n",
" i_a = indices[2*i]\n",
" i_b = indices[2*i+1]\n",
2019-09-05 12:03:01 +02:00
" \n",
2019-09-19 10:19:35 +02:00
" if self._scores[i_a] > self._scores[i_b]:\n",
" new_population.append(self.population[i_a])\n",
2019-09-05 12:03:01 +02:00
" else:\n",
2019-09-19 10:19:35 +02:00
" new_population.append(self.population[i_b])\n",
2019-09-05 12:03:01 +02:00
" \n",
" self.population = new_population\n",
" \n",
2019-09-19 10:19:35 +02:00
" def hold_best(self, n=10):\n",
" sorted_indices = np.argsort(-self._scores)\n",
" \n",
" self.population = np.array(self.population)[sorted_indices[:n]].tolist()\n",
" \n",
" def analyse_scores(self):\n",
" for tree in self.population:\n",
" min, max = tree.bounds_mix_scores()\n",
" if min is not None and max is not None:\n",
" if self._mix_min is None or min < self._mix_min:\n",
" self._mix_min = min\n",
" if self._mix_max is None or max > self._mix_max:\n",
" self._mix_max = max\n",
" \n",
" min, max = tree.bounds_act_scores()\n",
" if min is not None and max is not None:\n",
" if self._act_min is None or min < self._act_min:\n",
" self._act_min = min\n",
" if self._act_max is None or max > self._act_max:\n",
" self._act_max = max\n",
" \n",
" def single_score(self, mix_scores, act_scores, ing_scores):\n",
" return np.average(mix_scores) * np.average(act_scores) * np.average(ing_scores)\n",
" \n",
" \n",
" \n",
" def collect_scores(self):\n",
" for tree in self.population:\n",
" tree.collect_scores()\n",
" \n",
" self.analyse_scores()\n",
" \n",
" if self._mix_min is not None and self._mix_max is not None:\n",
" self._mix_scores = [t.normalized_mix_scores(self._mix_min, self._mix_max) for t in self.population]\n",
" \n",
" if self._act_min is not None and self._act_max is not None:\n",
" self._act_scores = [t.normalized_act_scores(self._act_min, self._act_max) for t in self.population]\n",
" \n",
" self._scores = []\n",
" for i in range(len(self._mix_scores)):\n",
" #print (self._mix_scores[i], self._act_scores[i])\n",
" if self._act_scores is None or self._mix_scores is None or self._act_scores[i] is None:\n",
" self._scores.append(0)\n",
" continue\n",
" \n",
" self._scores.append(self.single_score(self._mix_scores[i], self._act_scores[i], self.population[i].ing_scores()))\n",
" self._scores = np.array(self._scores)\n",
" \n",
2019-09-05 12:03:01 +02:00
" def run(self, n=50):\n",
" for i in range(n):\n",
" print(i)\n",
" self.mutate()\n",
2019-09-19 10:19:35 +02:00
" self.mutate()\n",
" self.collect_scores()\n",
" #self.pairwise_competition()\n",
" #self.collect_scores()\n",
" self.hold_best(self._n)\n",
" \n",
" \n",
2019-09-05 12:03:01 +02:00
" \n",
" def plot_population(self):\n",
2019-09-19 10:19:35 +02:00
" self.collect_scores()\n",
" #print(self._mix_scores)\n",
" #print(self._act_scores)\n",
" #print(self._scores)\n",
" for i, t in enumerate(self.population):\n",
" print(self._scores[i])\n",
2019-09-05 12:03:01 +02:00
" display(t.root().dot())"
]
},
2019-09-19 10:19:35 +02:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Run Evolutionary Algorithm"
]
},
2019-09-05 12:03:01 +02:00
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 20,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [],
"source": [
2019-09-19 10:19:35 +02:00
"p = Population([\"potato\",\"tomato\",\"noodle\",\"cheese\"])"
2019-09-05 12:03:01 +02:00
]
},
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 21,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0\n",
"1\n",
"2\n",
"3\n",
"4\n",
"5\n",
"6\n",
"7\n",
"8\n",
2019-09-19 10:19:35 +02:00
"9\n"
2019-09-05 12:03:01 +02:00
]
}
],
"source": [
2019-09-19 10:19:35 +02:00
"p.run(10)"
2019-09-05 12:03:01 +02:00
]
},
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 22,
2019-09-05 12:03:01 +02:00
"metadata": {},
"outputs": [
2019-09-19 10:19:35 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.08820288074354661\n"
]
},
2019-09-05 12:03:01 +02:00
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
2019-09-19 10:19:35 +02:00
"<svg width=\"514pt\" height=\"188pt\"\n",
" viewBox=\"0.00 0.00 514.00 188.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 184)\">\n",
2019-09-05 12:03:01 +02:00
"<title>%3</title>\n",
2019-09-19 10:19:35 +02:00
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-184 510,-184 510,4 -4,4\"/>\n",
"<!-- 3158 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node1\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3158</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"214,-180 45.5882,-162 214,-144 382.4118,-162 214,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"214\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.006850405133872667)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3160 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node2\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3160</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"74,-108 0,-108 0,-72 74,-72 74,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"37\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">tomato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3158&#45;&gt;3160 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge1\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>3158&#45;&gt;3160</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M178.6068,-147.6028C151.2969,-136.4937 113.2804,-121.0293 83.5131,-108.9206\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"84.7441,-105.6429 74.1623,-105.1169 82.1064,-112.1269 84.7441,-105.6429\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3162 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node3\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3162</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"164,-108 92,-108 92,-72 164,-72 164,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"128\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cheese (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3158&#45;&gt;3162 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge2\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>3158&#45;&gt;3162</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M194.9138,-146.0209C183.9537,-136.8449 169.9543,-125.1245 157.5961,-114.7781\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"159.6749,-111.9538 149.7605,-108.2181 155.1813,-117.3211 159.6749,-111.9538\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3164 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node4\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3164</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"300\" cy=\"-90\" rx=\"117.7793\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"300\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cook (0.36065573770491804)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3158&#45;&gt;3164 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge3\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>3158&#45;&gt;3164</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M233.0862,-146.0209C244.1275,-136.777 258.2533,-124.9507 270.6782,-114.5485\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"273.1273,-117.0628 278.5481,-107.9597 268.6337,-111.6955 273.1273,-117.0628\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3161 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node6\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3161</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"506,-108 436,-108 436,-72 506,-72 506,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"471\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">potato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3158&#45;&gt;3161 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge5\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>3158&#45;&gt;3161</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M270.6753,-149.9082C311.6701,-140.6448 368.4537,-126.7532 426.0022,-108.1269\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"427.2073,-111.4151 435.6179,-104.9721 425.0251,-104.7639 427.2073,-111.4151\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3159 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>3159</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"341.5,-36 258.5,-36 258.5,0 341.5,0 341.5,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"300\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">noodle (1.0)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3164&#45;&gt;3159 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>3164&#45;&gt;3159</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M300,-71.8314C300,-64.131 300,-54.9743 300,-46.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"303.5001,-46.4132 300,-36.4133 296.5001,-46.4133 303.5001,-46.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
2019-09-19 10:19:35 +02:00
"<graphviz.dot.Digraph at 0x7fc2a28b3b38>"
2019-09-05 12:03:01 +02:00
]
},
"metadata": {},
"output_type": "display_data"
},
2019-09-19 10:19:35 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.08820288074354661\n"
]
},
2019-09-05 12:03:01 +02:00
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
2019-09-19 10:19:35 +02:00
"<svg width=\"514pt\" height=\"188pt\"\n",
" viewBox=\"0.00 0.00 514.00 188.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 184)\">\n",
2019-09-05 12:03:01 +02:00
"<title>%3</title>\n",
2019-09-19 10:19:35 +02:00
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-184 510,-184 510,4 -4,4\"/>\n",
"<!-- 3970 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node1\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3970</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"294,-180 125.5882,-162 294,-144 462.4118,-162 294,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"294\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.006850405133872667)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3972 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node2\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3972</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"72,-108 0,-108 0,-72 72,-72 72,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"36\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cheese (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3970&#45;&gt;3972 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge1\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>3970&#45;&gt;3972</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M237.813,-149.8934C196.8115,-140.5734 139.8184,-126.6156 81.8806,-108.0927\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"82.7902,-104.7084 72.1983,-104.9568 80.6333,-111.3678 82.7902,-104.7084\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3974 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node3\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3974</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"208\" cy=\"-90\" rx=\"117.7793\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"208\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cook (0.36065573770491804)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3970&#45;&gt;3974 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge2\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>3970&#45;&gt;3974</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M274.9138,-146.0209C263.8725,-136.777 249.7467,-124.9507 237.3218,-114.5485\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"239.3663,-111.6955 229.4519,-107.9597 234.8727,-117.0628 239.3663,-111.6955\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3971 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node5\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3971</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"418,-108 344,-108 344,-72 418,-72 418,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"381\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">tomato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3970&#45;&gt;3971 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge4\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>3970&#45;&gt;3971</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M313.3081,-146.0209C324.3957,-136.8449 338.5579,-125.1245 351.0597,-114.7781\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"353.514,-117.2902 358.9865,-108.2181 349.051,-111.8974 353.514,-117.2902\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3976 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>3976</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"506,-108 436,-108 436,-72 506,-72 506,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"471\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">potato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3970&#45;&gt;3976 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>3970&#45;&gt;3976</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M329.2935,-147.6998C354.1134,-137.6367 388.3357,-123.7482 426.6484,-108.1391\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"427.9993,-111.3681 435.939,-104.3529 425.3575,-104.8857 427.9993,-111.3681\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3975 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>3975</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"249.5,-36 166.5,-36 166.5,0 249.5,0 249.5,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"208\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">noodle (1.0)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3974&#45;&gt;3975 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>3974&#45;&gt;3975</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M208,-71.8314C208,-64.131 208,-54.9743 208,-46.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"211.5001,-46.4132 208,-36.4133 204.5001,-46.4133 211.5001,-46.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
2019-09-19 10:19:35 +02:00
"<graphviz.dot.Digraph at 0x7fc2a27e7ba8>"
2019-09-05 12:03:01 +02:00
]
},
"metadata": {},
"output_type": "display_data"
},
2019-09-19 10:19:35 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.08820288074354661\n"
]
},
2019-09-05 12:03:01 +02:00
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
2019-09-19 10:19:35 +02:00
"<svg width=\"495pt\" height=\"260pt\"\n",
" viewBox=\"0.00 0.00 495.21 260.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
2019-09-05 12:03:01 +02:00
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 256)\">\n",
"<title>%3</title>\n",
2019-09-19 10:19:35 +02:00
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-256 491.2058,-256 491.2058,4 -4,4\"/>\n",
"<!-- 3439 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node1\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3439</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"168.2058,-252 -.206,-234 168.2058,-216 336.6176,-234 168.2058,-252\"/>\n",
"<text text-anchor=\"middle\" x=\"168.2058\" y=\"-230.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.005818786367414797)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3440 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node2\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3440</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"93.2058,-180 23.2058,-180 23.2058,-144 93.2058,-144 93.2058,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"58.2058\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">potato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3439&#45;&gt;3440 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge1\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>3439&#45;&gt;3440</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M144.3374,-218.3771C129.8359,-208.8852 111.0291,-196.5753 94.6903,-185.8808\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"96.194,-182.6819 85.9102,-180.1338 92.3604,-188.5389 96.194,-182.6819\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3442 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node3\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3442</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"279.2058,-180 110.794,-162 279.2058,-144 447.6176,-162 279.2058,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"279.2058\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.007882023900330536)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3439&#45;&gt;3442 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge2\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>3439&#45;&gt;3442</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M192.2911,-218.3771C208.1459,-208.0929 229.1006,-194.5007 246.4621,-183.2392\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"248.6825,-185.9708 255.1674,-177.5924 244.8731,-180.098 248.6825,-185.9708\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3446 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node4\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3446</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"143.2058,-108 69.2058,-108 69.2058,-72 143.2058,-72 143.2058,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"106.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">tomato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3442&#45;&gt;3446 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge3\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>3442&#45;&gt;3446</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M244.6124,-147.6028C218.3011,-136.6524 181.8219,-121.4703 152.9196,-109.4416\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"154.0112,-106.1049 143.434,-105.4938 151.3215,-112.5676 154.0112,-106.1049\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3444 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node5\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>3444</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"279.2058\" cy=\"-90\" rx=\"117.7793\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"279.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cook (0.36065573770491804)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3442&#45;&gt;3444 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge4\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>3442&#45;&gt;3444</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M279.2058,-143.8314C279.2058,-136.131 279.2058,-126.9743 279.2058,-118.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"282.7059,-118.4132 279.2058,-108.4133 275.7059,-118.4133 282.7059,-118.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3443 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>3443</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"487.2058,-108 415.2058,-108 415.2058,-72 487.2058,-72 487.2058,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"451.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cheese (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3442&#45;&gt;3443 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>3442&#45;&gt;3443</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M313.5992,-147.6028C340.0227,-136.5418 376.7605,-121.1631 405.6305,-109.078\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"407.2203,-112.2069 415.0933,-105.1169 404.5173,-105.7498 407.2203,-112.2069\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3445 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>3445</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"320.7058,-36 237.7058,-36 237.7058,0 320.7058,0 320.7058,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"279.2058\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">noodle (1.0)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 3444&#45;&gt;3445 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>3444&#45;&gt;3445</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M279.2058,-71.8314C279.2058,-64.131 279.2058,-54.9743 279.2058,-46.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"282.7059,-46.4132 279.2058,-36.4133 275.7059,-46.4133 282.7059,-46.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
2019-09-19 10:19:35 +02:00
"<graphviz.dot.Digraph at 0x7fc2a27e7ba8>"
2019-09-05 12:03:01 +02:00
]
},
"metadata": {},
"output_type": "display_data"
},
2019-09-19 10:19:35 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.08820288074354661\n"
]
},
2019-09-05 12:03:01 +02:00
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
2019-09-19 10:19:35 +02:00
"<svg width=\"578pt\" height=\"260pt\"\n",
" viewBox=\"0.00 0.00 577.85 260.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
2019-09-05 12:03:01 +02:00
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 256)\">\n",
"<title>%3</title>\n",
2019-09-19 10:19:35 +02:00
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-256 573.8453,-256 573.8453,4 -4,4\"/>\n",
"<!-- 4832 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node1\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>4832</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"168.2058,-252 -.206,-234 168.2058,-216 336.6176,-234 168.2058,-252\"/>\n",
"<text text-anchor=\"middle\" x=\"168.2058\" y=\"-230.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.005818786367414797)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4834 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node2\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>4834</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"93.2058,-180 23.2058,-180 23.2058,-144 93.2058,-144 93.2058,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"58.2058\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">potato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4832&#45;&gt;4834 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge1\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>4832&#45;&gt;4834</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M144.3374,-218.3771C129.8359,-208.8852 111.0291,-196.5753 94.6903,-185.8808\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"96.194,-182.6819 85.9102,-180.1338 92.3604,-188.5389 96.194,-182.6819\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4835 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node3\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>4835</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"279.2058,-180 110.794,-162 279.2058,-144 447.6176,-162 279.2058,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"279.2058\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.007882023900330536)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4832&#45;&gt;4835 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge2\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>4832&#45;&gt;4835</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M192.2911,-218.3771C208.1459,-208.0929 229.1006,-194.5007 246.4621,-183.2392\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"248.6825,-185.9708 255.1674,-177.5924 244.8731,-180.098 248.6825,-185.9708\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4836 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node4\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>4836</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"224.2058,-108 152.2058,-108 152.2058,-72 224.2058,-72 224.2058,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"188.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cheese (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4835&#45;&gt;4836 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge3\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>4835&#45;&gt;4836</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M259.0099,-146.0209C247.3021,-136.7575 232.3168,-124.901 219.1495,-114.4829\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"221.2453,-111.6781 211.2314,-108.2181 216.9019,-117.1677 221.2453,-111.6781\"/>\n",
"</g>\n",
"<!-- 4837 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>4837</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"316.2058,-108 242.2058,-108 242.2058,-72 316.2058,-72 316.2058,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"279.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">tomato (1)</text>\n",
"</g>\n",
"<!-- 4835&#45;&gt;4837 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>4835&#45;&gt;4837</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M279.2058,-143.8314C279.2058,-136.131 279.2058,-126.9743 279.2058,-118.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"282.7059,-118.4132 279.2058,-108.4133 275.7059,-118.4133 282.7059,-118.4132\"/>\n",
"</g>\n",
"<!-- 4838 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>4838</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"452.2058\" cy=\"-90\" rx=\"117.7793\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"452.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cook (0.36065573770491804)</text>\n",
"</g>\n",
"<!-- 4835&#45;&gt;4838 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>4835&#45;&gt;4838</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M313.7991,-147.6028C339.136,-137.0579 373.9015,-122.5891 402.2504,-110.7907\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"403.7079,-113.9752 411.5954,-106.9014 401.0182,-107.5125 403.7079,-113.9752\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4839 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node7\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>4839</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"493.7058,-36 410.7058,-36 410.7058,0 493.7058,0 493.7058,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"452.2058\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">noodle (1.0)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4838&#45;&gt;4839 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge6\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>4838&#45;&gt;4839</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M452.2058,-71.8314C452.2058,-64.131 452.2058,-54.9743 452.2058,-46.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"455.7059,-46.4132 452.2058,-36.4133 448.7059,-46.4133 455.7059,-46.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
2019-09-19 10:19:35 +02:00
"<graphviz.dot.Digraph at 0x7fc2a27e7ba8>"
2019-09-05 12:03:01 +02:00
]
},
"metadata": {},
"output_type": "display_data"
},
2019-09-19 10:19:35 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.08820288074354661\n"
]
},
2019-09-05 12:03:01 +02:00
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
2019-09-19 10:19:35 +02:00
"<svg width=\"577pt\" height=\"260pt\"\n",
" viewBox=\"0.00 0.00 576.85 260.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
2019-09-05 12:03:01 +02:00
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 256)\">\n",
"<title>%3</title>\n",
2019-09-19 10:19:35 +02:00
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-256 572.8453,-256 572.8453,4 -4,4\"/>\n",
"<!-- 4949 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node1\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>4949</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"400.6396,-252 232.2278,-234 400.6396,-216 569.0514,-234 400.6396,-252\"/>\n",
"<text text-anchor=\"middle\" x=\"400.6396\" y=\"-230.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.005818786367414797)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4950 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node2\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>4950</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"290.6396,-180 122.2278,-162 290.6396,-144 459.0514,-162 290.6396,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"290.6396\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.007882023900330536)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4949&#45;&gt;4950 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge1\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>4949&#45;&gt;4950</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M376.7712,-218.3771C361.0593,-208.0929 340.2933,-194.5007 323.0883,-183.2392\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"324.7452,-180.1406 314.4613,-177.5924 320.9116,-185.9975 324.7452,-180.1406\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4956 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node7\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>4956</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"546.6396,-180 476.6396,-180 476.6396,-144 546.6396,-144 546.6396,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"511.6396\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">potato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4949&#45;&gt;4956 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge6\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>4949&#45;&gt;4956</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M424.7249,-218.3771C439.4937,-208.7973 458.6878,-196.3471 475.2807,-185.5842\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"477.1984,-188.5121 483.6833,-180.1338 473.389,-182.6394 477.1984,-188.5121\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4953 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>4953</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"117.6396\" cy=\"-90\" rx=\"117.7793\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"117.6396\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cook (0.36065573770491804)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4950&#45;&gt;4953 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>4950&#45;&gt;4953</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M256.0462,-147.6028C230.7093,-137.0579 195.9439,-122.5891 167.595,-110.7907\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"168.8271,-107.5125 158.2499,-106.9014 166.1374,-113.9752 168.8271,-107.5125\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4952 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node5\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>4952</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"327.6396,-108 253.6396,-108 253.6396,-72 327.6396,-72 327.6396,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"290.6396\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">tomato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4950&#45;&gt;4952 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge4\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>4950&#45;&gt;4952</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M290.6396,-143.8314C290.6396,-136.131 290.6396,-126.9743 290.6396,-118.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"294.1397,-118.4132 290.6396,-108.4133 287.1397,-118.4133 294.1397,-118.4132\"/>\n",
"</g>\n",
"<!-- 4955 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>4955</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"417.6396,-108 345.6396,-108 345.6396,-72 417.6396,-72 417.6396,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"381.6396\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cheese (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4950&#45;&gt;4955 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>4950&#45;&gt;4955</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M310.8354,-146.0209C322.5432,-136.7575 337.5285,-124.901 350.6959,-114.4829\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"352.9434,-117.1677 358.6139,-108.2181 348.6,-111.6781 352.9434,-117.1677\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 4954 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>4954</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"159.1396,-36 76.1396,-36 76.1396,0 159.1396,0 159.1396,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"117.6396\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">noodle (1.0)</text>\n",
"</g>\n",
"<!-- 4953&#45;&gt;4954 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>4953&#45;&gt;4954</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M117.6396,-71.8314C117.6396,-64.131 117.6396,-54.9743 117.6396,-46.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"121.1397,-46.4132 117.6396,-36.4133 114.1397,-46.4133 121.1397,-46.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
2019-09-19 10:19:35 +02:00
"<graphviz.dot.Digraph at 0x7fc2a27e7ba8>"
2019-09-05 12:03:01 +02:00
]
},
"metadata": {},
"output_type": "display_data"
},
2019-09-19 10:19:35 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.08820288074354661\n"
]
},
2019-09-05 12:03:01 +02:00
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
2019-09-19 10:19:35 +02:00
"<svg width=\"495pt\" height=\"260pt\"\n",
" viewBox=\"0.00 0.00 495.21 260.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 256)\">\n",
2019-09-05 12:03:01 +02:00
"<title>%3</title>\n",
2019-09-19 10:19:35 +02:00
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-256 491.2058,-256 491.2058,4 -4,4\"/>\n",
"<!-- 5384 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node1\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5384</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"168.2058,-252 -.206,-234 168.2058,-216 336.6176,-234 168.2058,-252\"/>\n",
"<text text-anchor=\"middle\" x=\"168.2058\" y=\"-230.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.005818786367414797)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5391 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node2\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5391</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"93.2058,-180 23.2058,-180 23.2058,-144 93.2058,-144 93.2058,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"58.2058\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">potato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5384&#45;&gt;5391 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge1\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5384&#45;&gt;5391</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M144.3374,-218.3771C129.8359,-208.8852 111.0291,-196.5753 94.6903,-185.8808\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"96.194,-182.6819 85.9102,-180.1338 92.3604,-188.5389 96.194,-182.6819\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5385 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node3\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5385</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"279.2058,-180 110.794,-162 279.2058,-144 447.6176,-162 279.2058,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"279.2058\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.007882023900330536)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5384&#45;&gt;5385 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge2\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5384&#45;&gt;5385</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M192.2911,-218.3771C208.1459,-208.0929 229.1006,-194.5007 246.4621,-183.2392\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"248.6825,-185.9708 255.1674,-177.5924 244.8731,-180.098 248.6825,-185.9708\"/>\n",
"</g>\n",
"<!-- 5390 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>5390</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"143.2058,-108 69.2058,-108 69.2058,-72 143.2058,-72 143.2058,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"106.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">tomato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5385&#45;&gt;5390 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>5385&#45;&gt;5390</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M244.6124,-147.6028C218.3011,-136.6524 181.8219,-121.4703 152.9196,-109.4416\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"154.0112,-106.1049 143.434,-105.4938 151.3215,-112.5676 154.0112,-106.1049\"/>\n",
"</g>\n",
"<!-- 5388 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node5\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5388</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"279.2058\" cy=\"-90\" rx=\"117.7793\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"279.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cook (0.36065573770491804)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5385&#45;&gt;5388 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge4\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5385&#45;&gt;5388</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M279.2058,-143.8314C279.2058,-136.131 279.2058,-126.9743 279.2058,-118.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"282.7059,-118.4132 279.2058,-108.4133 275.7059,-118.4133 282.7059,-118.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5386 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node7\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5386</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"487.2058,-108 415.2058,-108 415.2058,-72 487.2058,-72 487.2058,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"451.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cheese (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5385&#45;&gt;5386 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge6\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5385&#45;&gt;5386</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M313.5992,-147.6028C340.0227,-136.5418 376.7605,-121.1631 405.6305,-109.078\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"407.2203,-112.2069 415.0933,-105.1169 404.5173,-105.7498 407.2203,-112.2069\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5389 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node6\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5389</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"320.7058,-36 237.7058,-36 237.7058,0 320.7058,0 320.7058,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"279.2058\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">noodle (1.0)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5388&#45;&gt;5389 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge5\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5388&#45;&gt;5389</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M279.2058,-71.8314C279.2058,-64.131 279.2058,-54.9743 279.2058,-46.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"282.7059,-46.4132 279.2058,-36.4133 275.7059,-46.4133 282.7059,-46.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
2019-09-19 10:19:35 +02:00
"<graphviz.dot.Digraph at 0x7fc2a27e7ba8>"
2019-09-05 12:03:01 +02:00
]
},
"metadata": {},
"output_type": "display_data"
},
2019-09-19 10:19:35 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.08820288074354661\n"
]
},
2019-09-05 12:03:01 +02:00
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
2019-09-19 10:19:35 +02:00
"<svg width=\"514pt\" height=\"188pt\"\n",
" viewBox=\"0.00 0.00 513.64 188.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 184)\">\n",
2019-09-05 12:03:01 +02:00
"<title>%3</title>\n",
2019-09-19 10:19:35 +02:00
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-184 509.6396,-184 509.6396,4 -4,4\"/>\n",
"<!-- 5611 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node1\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5611</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"169,-180 .5882,-162 169,-144 337.4118,-162 169,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"169\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.006850405133872667)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5615 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node2\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5615</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"70,-108 0,-108 0,-72 70,-72 70,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"35\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">potato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5611&#45;&gt;5615 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge1\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5611&#45;&gt;5615</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M140.9092,-146.9064C122.5919,-137.0643 98.3369,-124.0317 77.6607,-112.9222\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"79.2132,-109.7831 68.7476,-108.133 75.8999,-115.9494 79.2132,-109.7831\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5616 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node3\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5616</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"160,-108 88,-108 88,-72 160,-72 160,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"124\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cheese (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5611&#45;&gt;5616 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge2\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5611&#45;&gt;5616</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M158.3356,-144.937C153.0965,-136.5544 146.6606,-126.2569 140.7822,-116.8516\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"143.6425,-114.8242 135.3745,-108.1992 137.7065,-118.5342 143.6425,-114.8242\"/>\n",
"</g>\n",
"<!-- 5617 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>5617</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"252,-108 178,-108 178,-72 252,-72 252,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"215\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">tomato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5611&#45;&gt;5617 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>5611&#45;&gt;5617</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M179.9014,-144.937C185.2569,-136.5544 191.8359,-126.2569 197.8448,-116.8516\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"200.9383,-118.5105 203.3728,-108.1992 195.0394,-114.7418 200.9383,-118.5105\"/>\n",
"</g>\n",
"<!-- 5612 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node5\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5612</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"388\" cy=\"-90\" rx=\"117.7793\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"388\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cook (0.36065573770491804)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5611&#45;&gt;5612 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge4\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5611&#45;&gt;5612</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M210.4497,-148.3727C243.8026,-137.4074 291.1108,-121.854 328.5081,-109.559\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"329.8727,-112.7947 338.2793,-106.3465 327.6864,-106.1449 329.8727,-112.7947\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5613 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node6\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5613</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"429.5,-36 346.5,-36 346.5,0 429.5,0 429.5,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"388\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">noodle (1.0)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5612&#45;&gt;5613 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge5\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5612&#45;&gt;5613</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M388,-71.8314C388,-64.131 388,-54.9743 388,-46.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"391.5001,-46.4132 388,-36.4133 384.5001,-46.4133 391.5001,-46.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
2019-09-19 10:19:35 +02:00
"<graphviz.dot.Digraph at 0x7fc2a27e7ba8>"
2019-09-05 12:03:01 +02:00
]
},
"metadata": {},
"output_type": "display_data"
},
2019-09-19 10:19:35 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.08749121476036274\n"
]
},
2019-09-05 12:03:01 +02:00
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
2019-09-19 10:19:35 +02:00
"<svg width=\"640pt\" height=\"260pt\"\n",
" viewBox=\"0.00 0.00 639.85 260.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
2019-09-05 12:03:01 +02:00
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 256)\">\n",
"<title>%3</title>\n",
2019-09-19 10:19:35 +02:00
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-256 635.8453,-256 635.8453,4 -4,4\"/>\n",
"<!-- 5556 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node1\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5556</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"289.6396,-252 121.2278,-234 289.6396,-216 458.0514,-234 289.6396,-252\"/>\n",
"<text text-anchor=\"middle\" x=\"289.6396\" y=\"-230.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.008842105263157896)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5550 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node2\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5550</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"117.6396\" cy=\"-162\" rx=\"117.7793\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"117.6396\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cook (0.36065573770491804)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5556&#45;&gt;5550 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge1\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5556&#45;&gt;5550</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M255.2462,-219.6028C230.1438,-209.0948 195.7328,-194.6902 167.6021,-182.9146\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"168.9013,-179.6642 158.3254,-179.0313 166.1983,-186.1213 168.9013,-179.6642\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5549 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node4\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5549</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"325.6396,-180 253.6396,-180 253.6396,-144 325.6396,-144 325.6396,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"289.6396\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cheese (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5556&#45;&gt;5549 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge3\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5556&#45;&gt;5549</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M289.6396,-215.8314C289.6396,-208.131 289.6396,-198.9743 289.6396,-190.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"293.1397,-190.4132 289.6396,-180.4133 286.1397,-190.4133 293.1397,-190.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5555 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node5\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5555</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"463.6396\" cy=\"-162\" rx=\"119.6788\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"463.6396\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mash (0.08993683606086707)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5556&#45;&gt;5555 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge4\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5556&#45;&gt;5555</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M324.4329,-219.6028C349.8271,-209.0948 384.6382,-194.6902 413.0961,-182.9146\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"414.5787,-186.0889 422.4806,-179.0313 411.9022,-179.6208 414.5787,-186.0889\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5551 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>5551</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"159.1396,-108 76.1396,-108 76.1396,-72 159.1396,-72 159.1396,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"117.6396\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">noodle (1.0)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5550&#45;&gt;5551 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>5550&#45;&gt;5551</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M117.6396,-143.8314C117.6396,-136.131 117.6396,-126.9743 117.6396,-118.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"121.1397,-118.4132 117.6396,-108.4133 114.1397,-118.4133 121.1397,-118.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5557 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node6\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5557</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"463.6396,-108 295.2278,-90 463.6396,-72 632.0514,-90 463.6396,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"463.6396\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.012468827930174564)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5555&#45;&gt;5557 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge5\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5555&#45;&gt;5557</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M463.6396,-143.8314C463.6396,-136.131 463.6396,-126.9743 463.6396,-118.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"467.1397,-118.4132 463.6396,-108.4133 460.1397,-118.4133 467.1397,-118.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5552 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>5552</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"455.1396,-36 370.1396,-36 370.1396,0 455.1396,0 455.1396,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"412.6396\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">tomato (1.0)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5557&#45;&gt;5552 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>5557&#45;&gt;5552</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M451.5533,-72.937C445.5544,-64.468 438.171,-54.0444 431.4536,-44.561\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"434.1669,-42.3364 425.5306,-36.1992 428.4548,-46.3825 434.1669,-42.3364\"/>\n",
"</g>\n",
"<!-- 5553 -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>5553</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"553.6396,-36 473.6396,-36 473.6396,0 553.6396,0 553.6396,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"513.6396\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">potato (1.0)</text>\n",
"</g>\n",
"<!-- 5557&#45;&gt;5553 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>5557&#45;&gt;5553</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M475.4889,-72.937C481.3701,-64.468 488.6088,-54.0444 495.1944,-44.561\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"498.1721,-46.4093 501.0013,-36.1992 492.4225,-42.4165 498.1721,-46.4093\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
2019-09-19 10:19:35 +02:00
"<graphviz.dot.Digraph at 0x7fc2a27e7ba8>"
2019-09-05 12:03:01 +02:00
]
},
"metadata": {},
"output_type": "display_data"
},
2019-09-19 10:19:35 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.0689785320539355\n"
]
},
2019-09-05 12:03:01 +02:00
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
2019-09-19 10:19:35 +02:00
"<svg width=\"441pt\" height=\"260pt\"\n",
" viewBox=\"0.00 0.00 440.78 260.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 256)\">\n",
2019-09-05 12:03:01 +02:00
"<title>%3</title>\n",
2019-09-19 10:19:35 +02:00
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-256 436.78,-256 436.78,4 -4,4\"/>\n",
"<!-- 5176 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node1\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5176</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"174.6399,-252 -.14,-234 174.6399,-216 349.4197,-234 174.6399,-252\"/>\n",
"<text text-anchor=\"middle\" x=\"174.6399\" y=\"-230.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.0039264285256855325)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5181 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node2\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5181</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"74.6399,-180 4.6399,-180 4.6399,-144 74.6399,-144 74.6399,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"39.6399\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">potato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5176&#45;&gt;5181 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge1\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5176&#45;&gt;5181</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M146.3395,-218.9064C127.8854,-209.0643 103.4494,-196.0317 82.619,-184.9222\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"84.11,-181.7507 73.6393,-180.133 80.8158,-187.9272 84.11,-181.7507\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5177 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node3\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5177</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"166.6399,-180 92.6399,-180 92.6399,-144 166.6399,-144 166.6399,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"129.6399\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">tomato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5176&#45;&gt;5177 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge2\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5176&#45;&gt;5177</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M163.9755,-216.937C158.7364,-208.5544 152.3004,-198.2569 146.4221,-188.8516\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"149.2824,-186.8242 141.0144,-180.1992 143.3464,-190.5342 149.2824,-186.8242\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5178 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node4\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5178</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"256.6399,-180 184.6399,-180 184.6399,-144 256.6399,-144 256.6399,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"220.6399\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cheese (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5176&#45;&gt;5178 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge3\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5176&#45;&gt;5178</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M185.5412,-216.937C190.8968,-208.5544 197.4758,-198.2569 203.4847,-188.8516\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"206.5781,-190.5105 209.0126,-180.1992 200.6793,-186.7418 206.5781,-190.5105\"/>\n",
"</g>\n",
"<!-- 5179 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node5\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5179</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"321.6399\" cy=\"-162\" rx=\"47.3916\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"321.6399\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cook (1.0)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5176&#45;&gt;5179 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge4\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5176&#45;&gt;5179</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M205.0984,-219.0816C227.6677,-208.0272 258.5969,-192.8782 282.9211,-180.9643\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"284.7824,-183.95 292.2235,-176.408 281.7033,-177.6635 284.7824,-183.95\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5183 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node6\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5183</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"321.6399\" cy=\"-90\" rx=\"111.2805\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"321.6399\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cut (0.03278688524590164)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5179&#45;&gt;5183 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge5\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5179&#45;&gt;5183</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M321.6399,-143.8314C321.6399,-136.131 321.6399,-126.9743 321.6399,-118.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"325.14,-118.4132 321.6399,-108.4133 318.14,-118.4133 325.14,-118.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5180 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node7\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5180</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"363.1399,-36 280.1399,-36 280.1399,0 363.1399,0 363.1399,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"321.6399\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">noodle (1.0)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5183&#45;&gt;5180 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge6\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5183&#45;&gt;5180</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M321.6399,-71.8314C321.6399,-64.131 321.6399,-54.9743 321.6399,-46.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"325.14,-46.4132 321.6399,-36.4133 318.14,-46.4133 325.14,-46.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
2019-09-19 10:19:35 +02:00
"<graphviz.dot.Digraph at 0x7fc2a27e7ba8>"
2019-09-05 12:03:01 +02:00
]
},
"metadata": {},
"output_type": "display_data"
},
2019-09-19 10:19:35 +02:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.06277589667904378\n"
]
},
2019-09-05 12:03:01 +02:00
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
2019-09-19 10:19:35 +02:00
"<svg width=\"609pt\" height=\"260pt\"\n",
" viewBox=\"0.00 0.00 608.85 260.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
2019-09-05 12:03:01 +02:00
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 256)\">\n",
"<title>%3</title>\n",
2019-09-19 10:19:35 +02:00
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-256 604.8453,-256 604.8453,4 -4,4\"/>\n",
"<!-- 5192 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node1\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5192</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"320.2058,-252 158.6621,-234 320.2058,-216 481.7495,-234 320.2058,-252\"/>\n",
"<text text-anchor=\"middle\" x=\"320.2058\" y=\"-230.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.00749063670411985)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5194 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node2\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5194</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"168.2058,-180 -.206,-162 168.2058,-144 336.6176,-162 168.2058,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"168.2058\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix (0.007882023900330536)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5192&#45;&gt;5194 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge1\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5192&#45;&gt;5194</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M289.0795,-219.256C265.8208,-208.2387 233.8262,-193.0833 208.5964,-181.1324\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"209.8261,-177.8421 199.2904,-176.7243 206.8295,-184.1683 209.8261,-177.8421\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5200 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node7\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5200</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"483.2058\" cy=\"-162\" rx=\"117.7793\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"483.2058\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cook (0.09465020576131687)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5192&#45;&gt;5200 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge6\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5192&#45;&gt;5200</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M352.7995,-219.6028C376.3815,-209.1862 408.6323,-194.9404 435.1608,-183.2223\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"436.9157,-186.2735 444.6489,-179.0313 434.0873,-179.8703 436.9157,-186.2735\"/>\n",
"</g>\n",
"<!-- 5195 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node3\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5195</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"92.2058,-108 18.2058,-108 18.2058,-72 92.2058,-72 92.2058,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"55.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">tomato (1)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5194&#45;&gt;5195 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge2\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5194&#45;&gt;5195</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M143.9644,-146.5542C128.9436,-136.9834 109.3481,-124.4978 92.3912,-113.6934\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"94.1169,-110.6429 83.8026,-108.221 90.3554,-116.5464 94.1169,-110.6429\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5198 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>5198</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"182.2058,-108 110.2058,-108 110.2058,-72 182.2058,-72 182.2058,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"146.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cheese (1)</text>\n",
"</g>\n",
"<!-- 5194&#45;&gt;5198 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>5194&#45;&gt;5198</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M162.7676,-144.2022C160.3269,-136.2146 157.3905,-126.6045 154.6723,-117.7087\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"158.0037,-116.6339 151.7342,-108.0931 151.3093,-118.6794 158.0037,-116.6339\"/>\n",
"</g>\n",
"<!-- 5196 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node5\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5196</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"318.2058\" cy=\"-90\" rx=\"117.7793\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"318.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">cook (0.36065573770491804)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5194&#45;&gt;5196 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge4\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5194&#45;&gt;5196</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M198.9225,-147.256C220.2607,-137.0136 249.0498,-123.1949 272.999,-111.6993\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"274.751,-114.7407 282.2517,-107.258 271.7219,-108.43 274.751,-114.7407\"/>\n",
"</g>\n",
"<!-- 5197 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>5197</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"359.7058,-36 276.7058,-36 276.7058,0 359.7058,0 359.7058,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"318.2058\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">noodle (1.0)</text>\n",
"</g>\n",
"<!-- 5196&#45;&gt;5197 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>5196&#45;&gt;5197</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M318.2058,-71.8314C318.2058,-64.131 318.2058,-54.9743 318.2058,-46.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"321.7059,-46.4132 318.2058,-36.4133 314.7059,-46.4133 321.7059,-46.4132\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5193 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"node8\" class=\"node\">\n",
2019-09-19 10:19:35 +02:00
"<title>5193</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"534.2058,-108 454.2058,-108 454.2058,-72 534.2058,-72 534.2058,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"494.2058\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">potato (1.0)</text>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
2019-09-19 10:19:35 +02:00
"<!-- 5200&#45;&gt;5193 -->\n",
2019-09-05 12:03:01 +02:00
"<g id=\"edge7\" class=\"edge\">\n",
2019-09-19 10:19:35 +02:00
"<title>5200&#45;&gt;5193</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M485.9815,-143.8314C487.158,-136.131 488.5569,-126.9743 489.8643,-118.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"493.3422,-118.8272 491.3926,-108.4133 486.4224,-117.7699 493.3422,-118.8272\"/>\n",
2019-09-05 12:03:01 +02:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
2019-09-19 10:19:35 +02:00
"<graphviz.dot.Digraph at 0x7fc2a27e7ba8>"
2019-09-05 12:03:01 +02:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"p.plot_population()"
]
},
{
"cell_type": "code",
2019-09-19 10:19:35 +02:00
"execution_count": 28,
2019-09-05 12:03:01 +02:00
"metadata": {},
2019-09-19 10:19:35 +02:00
"outputs": [
{
"ename": "NameError",
"evalue": "name 't' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-28-11fd5e5bf443>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mt2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mTree\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfrom_serialization\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mserialize\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mNameError\u001b[0m: name 't' is not defined"
]
}
],
2019-09-05 12:03:01 +02:00
"source": [
"t2 = Tree.from_serialization(t.serialize())"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [],
"source": [
"t.mutate()"
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.00499001996007984"
]
},
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t.score()"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
"<svg width=\"148pt\" height=\"188pt\"\n",
" viewBox=\"0.00 0.00 148.00 188.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 184)\">\n",
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-184 144,-184 144,4 -4,4\"/>\n",
"<!-- 43 -->\n",
"<g id=\"node1\" class=\"node\">\n",
"<title>43</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"73,-180 38.1439,-162 73,-144 107.8561,-162 73,-180\"/>\n",
"<text text-anchor=\"middle\" x=\"73\" y=\"-158.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"</g>\n",
"<!-- 44 -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>44</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"68,-108 0,-108 0,-72 68,-72 68,-108\"/>\n",
"<text text-anchor=\"middle\" x=\"34\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">chocolate</text>\n",
"</g>\n",
"<!-- 43&#45;&gt;44 -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>43&#45;&gt;44</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M65.2949,-147.7751C60.5218,-138.9633 54.2385,-127.3633 48.5551,-116.871\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"51.6086,-115.1596 43.7682,-108.0336 45.4536,-118.4936 51.6086,-115.1596\"/>\n",
"</g>\n",
"<!-- 51 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>51</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" cx=\"113\" cy=\"-90\" rx=\"27\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"113\" y=\"-86.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">beat</text>\n",
"</g>\n",
"<!-- 43&#45;&gt;51 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>43&#45;&gt;51</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M80.9027,-147.7751C85.9391,-138.7097 92.6148,-126.6934 98.5733,-115.9681\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"101.7687,-117.4231 103.5657,-106.9818 95.6496,-114.0236 101.7687,-117.4231\"/>\n",
"</g>\n",
"<!-- 45 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>45</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"140,-36 86,-36 86,0 140,0 140,-36\"/>\n",
"<text text-anchor=\"middle\" x=\"113\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">sugar</text>\n",
"</g>\n",
"<!-- 51&#45;&gt;45 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>51&#45;&gt;45</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M113,-71.8314C113,-64.131 113,-54.9743 113,-46.4166\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"116.5001,-46.4132 113,-36.4133 109.5001,-46.4133 116.5001,-46.4132\"/>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.dot.Digraph at 0x7fb72d1506a0>"
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t.root().dot()"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'pepper'"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"list(t.root().childs())[0]._name"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [],
"source": [
"n = IngredientNode(\"test\")"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"n.traverse() == IngredientNode"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
2019-09-19 10:19:35 +02:00
},
"toc-autonumbering": false,
"toc-showcode": false,
"toc-showmarkdowntxt": false,
"toc-showtags": false
2019-09-05 12:03:01 +02:00
},
"nbformat": 4,
"nbformat_minor": 4
}