master-thesis/EvolutionaryAlgorithm/EvolutionaryAlgorithm.ipynb

4023 lines
203 KiB
Plaintext
Raw Normal View History

2019-11-08 10:47:58 +01:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Evolutionary Algorithm"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"the Evolutionary Algorithm that is supposed to create new recipes based on the Recipe Matrices that are created during the *Recipe Analysis* step.\n",
"\n",
"The Population of the Evolutional Algorithm consists of a set of recipe trees. Each Recipe Tree consists of several Nodes where each node is of one of the following Types:\n",
"\n",
"* **Ingredient Node:**\n",
" these are the leaf nodes. Containing an ingredient. The score is determined by the actions, that are applied if you follow up the path. At the Moment it measures how many duplicate actions are applied.\n",
"* **Action Node:**\n",
" An Action that is applied on it's child and this child's subtree. Score indicates the average likelihood that this action is applied on the ingredients inside the subtree\n",
"* **Mix Node:**\n",
" Mixing ingredients together. This is also the only Node that can have more than one child. The score is the average of all pairwise likelihoods that two ingredients are mixed togethter"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"sys.path.append(\"../\")\n",
"sys.path.append(\"../RecipeAnalysis/\")"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
2019-12-01 14:04:07 +01:00
"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",
" "
]
2019-11-08 10:47:58 +01:00
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2019-12-01 14:04:07 +01:00
"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",
" "
]
2019-11-08 10:47:58 +01:00
},
"metadata": {},
"output_type": "display_data"
2019-12-01 14:04:07 +01:00
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jonas/.local/lib/python3.7/site-packages/ipykernel_launcher.py:39: TqdmExperimentalWarning:\n",
2019-12-01 14:04:07 +01:00
"\n",
"Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n",
"\n"
]
2019-11-08 10:47:58 +01:00
}
],
"source": [
"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",
"import ea_tools\n",
"\n",
"from difflib import SequenceMatcher\n",
"\n",
"import numpy as np\n",
"\n",
"import ActionGroups as AG\n",
"\n",
2019-11-08 10:47:58 +01:00
"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",
2019-12-01 14:04:07 +01:00
"from tqdm.autonotebook import tqdm\n",
"\n",
2019-11-08 10:47:58 +01:00
"from copy import deepcopy"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"def gaussian(x, mu, sig):\n",
" return 1./(np.sqrt(2.*np.pi)*sig)*np.exp(-np.power((x - mu)/sig, 2.)/2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## load adjacency matrices"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"import dill\n",
"m_act = dill.load(open(\"../RecipeAnalysis/m_act.dill\", \"rb\"))\n",
"m_mix = dill.load(open(\"../RecipeAnalysis/m_mix.dill\", \"rb\"))\n",
"m_base_act = dill.load(open(\"../RecipeAnalysis/m_base_act.dill\", \"rb\"))\n",
"m_base_mix = dill.load(open(\"../RecipeAnalysis/m_base_mix.dill\", \"rb\"))\n",
"\n",
2019-12-01 14:04:07 +01:00
"\n",
"m_grouped_mix = dill.load(open(\"../RecipeAnalysis/m_grouped_mix_raw.dill\", \"rb\"))\n",
"m_grouped_act = dill.load(open(\"../RecipeAnalysis/m_grouped_act_raw.dill\", \"rb\"))\n",
2019-12-01 14:04:07 +01:00
"m_grouped_base_act = dill.load(open(\"../RecipeAnalysis/m_grouped_base_act_raw.dill\", \"rb\"))\n",
"\n",
"\n",
2019-11-08 10:47:58 +01:00
"#m_act.apply_threshold(3)\n",
"#m_mix.apply_threshold(3)\n",
"#m_base_act.apply_threshold(5)\n",
"#m_base_mix.apply_threshold(5)\n",
"\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",
"\n",
2019-12-01 14:04:07 +01:00
"m_act.compile()\n",
"m_mix.compile()\n",
"m_base_act.compile()\n",
"m_base_mix.compile()\n",
"\n",
"m_grouped_mix.compile()\n",
"m_grouped_act.compile()\n",
"m_grouped_base_act.compile()\n",
"\n",
2019-11-08 10:47:58 +01:00
"c_act = m_act._csr\n",
"c_mix = m_mix._csr\n",
"c_base_act = m_base_act._csr\n",
2020-01-04 13:49:14 +01:00
"c_base_mix = m_base_mix._csr"
]
},
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 5,
2020-01-04 13:49:14 +01:00
"metadata": {},
"outputs": [],
"source": [
"c_grouped_mix = m_grouped_mix._csr\n",
"c_grouped_act = m_grouped_act._csr\n",
"c_grouped_base_act = m_grouped_base_act._csr"
2019-11-08 10:47:58 +01:00
]
},
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 6,
2019-11-08 10:47:58 +01:00
"metadata": {},
"outputs": [],
"source": [
"actions = m_act.get_labels()[0]"
]
},
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 7,
2019-11-08 10:47:58 +01:00
"metadata": {},
"outputs": [],
"source": [
"base_ingredients = m_base_mix.get_labels()"
]
},
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 8,
2019-11-08 10:47:58 +01:00
"metadata": {},
"outputs": [],
"source": [
"sym_label_buffer = {}\n",
"fw_label_buffer = {}\n",
"bw_label_buffer = {}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### helper functions for adjacency matrices"
]
},
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 9,
2019-11-08 10:47:58 +01:00
"metadata": {},
"outputs": [],
"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",
" 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",
" \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",
2020-01-05 12:23:45 +01:00
"execution_count": 10,
2019-11-08 10:47:58 +01: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",
" 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",
" \n",
" counts = c[index, i].toarray().flatten()\n",
" \n",
" s = np.argsort(-counts)\n",
" \n",
" return names[s], counts[s]"
]
},
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 11,
2019-11-08 10:47:58 +01: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",
" 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",
" \n",
" counts = c[i, index].toarray().flatten()\n",
" \n",
" s = np.argsort(-counts)\n",
" \n",
" return names[s], counts[s]"
]
},
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 12,
2019-11-08 10:47:58 +01: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])"
]
},
2020-01-04 13:49:14 +01:00
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 13,
2020-01-04 13:49:14 +01:00
"metadata": {},
"outputs": [],
"source": [
"def to_grouped_ingredient(ing:Ingredient):\n",
" groups = set()\n",
" for act in ing._action_set:\n",
" groups.add(AG.groups[act])\n",
" grouped_ingredient = Ingredient(ing._base_ingredient)\n",
" for g in groups:\n",
" grouped_ingredient.apply_action(g)\n",
" return grouped_ingredient"
]
},
2019-11-08 10:47:58 +01:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### different score functions"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### normalizations"
]
},
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 14,
2019-11-08 10:47:58 +01:00
"metadata": {},
"outputs": [],
"source": [
"def fw_normalization_factor(key, m, c, quotient_func):\n",
" ia = m._x_label_index[key]\n",
" \n",
" occurances = c[ia,:].nonzero()[1]\n",
" \n",
" return 1. / quotient_func(c[ia,occurances].toarray())\n",
"\n",
"def bw_normalization_factor(key, m, c, quotient_func):\n",
" ib = m._y_label_index[key]\n",
" \n",
" occurances = c[:,ib].nonzero()[0]\n",
" \n",
" return 1. / quotient_func(c[occurances,ib].toarray())\n",
"\n",
"def sym_normalization_factor(key, m, c, quotient_func):\n",
" ii = m._label_index[key]\n",
" \n",
" fw_occurances = c[ii,:].nonzero()[1]\n",
" bw_occurances = c[:,ii].nonzero()[0]\n",
" \n",
" return 1. / quotient_func(np.concatenate(\n",
" [c[ii,fw_occurances].toarray().flatten(),\n",
" c[bw_occurances,ii].toarray().flatten()]\n",
" ))"
]
},
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 15,
2019-11-08 10:47:58 +01:00
"metadata": {},
"outputs": [],
"source": [
"def sym_p_a_given_b(key_a, key_b, m, c, quot_func = np.max):\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",
" return v * sym_normalization_factor(key_b, m, c, quot_func)\n",
"\n",
"def fw_p_a_given_b(key_a, key_b, m, c, quot_func = np.max):\n",
" ia = m._x_label_index[key_a]\n",
" ib = m._y_label_index[key_b]\n",
" \n",
" v = c[ia,ib]\n",
" \n",
" return v * bw_normalization_factor(key_b, m, c, quot_func)\n",
"\n",
"def bw_p_a_given_b(key_a, key_b, m, c, quot_func = np.max):\n",
" ia = m._y_label_index[key_a]\n",
" ib = m._x_label_index[key_b]\n",
" \n",
" v = c[ib,ia]\n",
" \n",
" return v * fw_normalization_factor(key_b, m, c, quot_func)\n"
]
},
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 16,
2019-11-08 10:47:58 +01: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))"
]
},
{
"cell_type": "code",
2020-01-05 12:23:45 +01:00
"execution_count": 17,
2019-11-08 10:47:58 +01:00
"metadata": {},
"outputs": [],
"source": [
"def p_ingredient_unprepared(base_ing):\n",
" ing = Ingredient(base_ing)\n",
" base_sum = sym_sum(base_ing, m_base_mix, c_base_mix)\n",
" specialized_sum = sym_sum(ing.to_json(), m_mix, c_mix)\n",
" return specialized_sum / base_sum"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**new probability for preprocess ingredients:**"
]
},
2019-11-08 10:47:58 +01:00
{
"cell_type": "code",
"execution_count": 18,
2019-11-08 10:47:58 +01:00
"metadata": {},
"outputs": [],
"source": [
2020-01-02 18:14:02 +01:00
"PREPARE_RATIO_THRESHOLD = 0.35\n",
"HEAT_RATIO_THRESHOLD = 0.65\n",
"\n",
2020-01-05 12:23:45 +01:00
"PREPARE_SCORE_EPS = 0.1\n",
"HEAT_SCORE_EPS = 0.1\n",
2020-01-04 13:49:14 +01:00
"\n",
"def prepare_ratio(ing:str):\n",
" keys, values = m_grouped_act.get_backward_adjacent(Ingredient(ing).to_json())\n",
" action_dict = dict(zip(keys,values))\n",
" return action_dict['prepare'] / action_dict['heat']\n",
"\n",
"def random_prepare(ing:str):\n",
" \"\"\"\n",
" returns randomly a boolean value if ing should be prepared, w.r.t. the prepare_ration function\n",
" \"\"\"\n",
" \n",
2020-01-02 18:14:02 +01:00
" return prepare_ratio(ing) > np.random.normal(PREPARE_RATIO_THRESHOLD,0.1)\n",
"\n",
2020-01-02 18:14:02 +01:00
"def heat_ratio(ingredient:str):\n",
" action_set, action_weights = m_grouped_base_act.get_backward_adjacent(ingredient)\n",
" d = dict(zip(action_set, action_weights))\n",
" ratio = 1 - d['prepare'] / d['heat']\n",
" \n",
2020-01-02 18:14:02 +01:00
" return ratio\n",
"\n",
"def random_heated(ingredient:str):\n",
" ratio = heat_ratio(ingredient)\n",
" \n",
2020-01-04 13:49:14 +01:00
" return ratio > np.random.normal(HEAT_RATIO_THRESHOLD,0.15)\n",
"\n",
"def prepare_score(ingredient:Ingredient):\n",
" ing_str = ingredient._base_ingredient\n",
" \n",
" g_ing = to_grouped_ingredient(ingredient)\n",
" \n",
" ratio = prepare_ratio(ing_str)\n",
" \n",
" if ratio > PREPARE_RATIO_THRESHOLD + PREPARE_SCORE_EPS:\n",
" if 'prepare' not in g_ing._action_set:\n",
" return 0\n",
" \n",
" if ratio < PREPARE_RATIO_THRESHOLD - PREPARE_SCORE_EPS:\n",
" if 'prepare' in g_ing._action_set:\n",
" return 0\n",
" \n",
" return 1\n",
"\n",
"def heat_score(ingredient:Ingredient):\n",
" ing_str = ingredient._base_ingredient\n",
" \n",
" g_ing = to_grouped_ingredient(ingredient)\n",
" \n",
" ratio = heat_ratio(ing_str)\n",
" \n",
" if ratio > HEAT_RATIO_THRESHOLD + HEAT_SCORE_EPS:\n",
" if 'heat' not in g_ing._action_set:\n",
" return 0\n",
" \n",
" if ratio < HEAT_RATIO_THRESHOLD - HEAT_SCORE_EPS:\n",
" if 'heat' in g_ing._action_set:\n",
" return 0\n",
" \n",
" return 1\n"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"def relative_action_rank(ingredient:str, action:str):\n",
" action_set, action_weights = m_base_act.get_backward_adjacent(ingredient)\n",
" if action not in action_set or len(action_set) <= 1:\n",
" return 0\n",
" return 1 - action_set.tolist().index(action) / (len(action_set) - 1)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"def filter_set_by_group(act_set, act_w, group):\n",
" new_act_set = []\n",
" new_act_w = []\n",
" for i in range(len(act_set)):\n",
" if act_set[i] in AG.inverse_groups[group]:\n",
" new_act_set.append(act_set[i])\n",
" new_act_w.append(act_w[i])\n",
" return np.array(new_act_set), np.array(new_act_w)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## better normalized scores:"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"def normalized_score(key, matrix):\n",
" sum_key = matrix.get_sum(key)\n",
" keys, values = matrix.get_adjacent(key)\n",
" normalized_values = np.array([(values[i] / matrix.get_sum(keys[i])) * (values[i] / sum_key) for i in range(len(keys))])\n",
" sort = np.argsort(-normalized_values)\n",
" return keys[sort], normalized_values[sort]\n",
"\n",
"def forward_normalized_score(key, matrix):\n",
" sum_key = matrix.get_fw_sum(key)\n",
" keys, values = matrix.get_forward_adjacent(key)\n",
" normalized_values = np.array([(values[i] / matrix.get_bw_sum(keys[i])) * (values[i] / sum_key) for i in range(len(keys))])\n",
" sort = np.argsort(-normalized_values)\n",
" return keys[sort], normalized_values[sort]\n",
"\n",
"def backward_normalized_score(key, matrix):\n",
" sum_key = matrix.get_bw_sum(key)\n",
" keys, values = matrix.get_backward_adjacent(key)\n",
" normalized_values = np.array([(values[i] / matrix.get_fw_sum(keys[i])) * (values[i] / sum_key) for i in range(len(keys))])\n",
" sort = np.argsort(-normalized_values)\n",
" return keys[sort], normalized_values[sort]"
2019-11-08 10:47:58 +01:00
]
},
2020-01-02 18:14:02 +01:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Helper class for instructions"
]
},
{
"cell_type": "code",
"execution_count": 22,
2020-01-02 18:14:02 +01:00
"metadata": {},
"outputs": [],
"source": [
"class RecipeInstructionState(object):\n",
" def __init__(self):\n",
" self.current_step = 1\n",
" self.id_to_state = {}\n",
" self.instructions_by_step = {}\n",
" self.step_by_nodeid = {}\n",
" self.text_by_nodeid = {}\n",
" self.ingredients = set()\n",
" \n",
" def _add_instruction(self, node_id):\n",
" s = self.text_by_nodeid[node_id]\n",
" self.instructions_by_step[self.current_step] = s\n",
" self.step_by_nodeid[node_id] = self.current_step\n",
" self.current_step += 1\n",
" return self.current_step - 1\n",
" \n",
" def add_text(self, node_id, text, is_instruction=False, is_ingredient=False):\n",
" self.text_by_nodeid[node_id] = text\n",
" if is_instruction:\n",
" self._add_instruction(node_id)\n",
" if is_ingredient:\n",
" self.ingredients.add(text)\n",
" \n",
" def exists_any_instruction(self, node_ids:list):\n",
" \"\"\"check if any instruction exists for list of id's\n",
" \"\"\"\n",
" \n",
" for node_id in node_ids:\n",
" if node_id in self.step_by_nodeid:\n",
" return True\n",
" return False\n",
" \n",
" def to_markdown(self):\n",
" \n",
" md_text = \"**Ingredients**:\\n\"\n",
" \n",
" for ing in self.ingredients:\n",
" md_text += f\" * {ing}\\n\"\n",
" \n",
" md_text += \"\\n\\n**Instructions**:\\n\\n\"\n",
" md_text += \"| Step | Instruction |\\n\"\n",
" md_text += \"| ----:|:----------- |\\n\"\n",
" \n",
" for step in range(1, self.current_step):\n",
" md_text += f\"| {step} | {self.instructions_by_step[step]} |\\n\"\n",
" \n",
" return Markdown(md_text)\n",
" \n",
" \n",
" \n",
" \n",
" "
]
},
2019-11-08 10:47:58 +01:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Recipe Tree\n",
"### Tree Node Base Class"
]
},
{
"cell_type": "code",
"execution_count": 23,
2019-11-08 10:47:58 +01: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",
2019-12-01 14:04:07 +01:00
" def root(self):\n",
" if self._parent is None:\n",
" return self\n",
" return self._parent.root()\n",
" \n",
2019-11-08 10:47:58 +01:00
" 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",
2020-01-02 18:14:02 +01:00
" def simplify(self):\n",
" # simplify nodes (mainly used to delete doubled Mix Nodes)\n",
" for c in self.childs().copy():\n",
" c.simplify()\n",
" \n",
2019-11-08 10:47:58 +01:00
" 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",
2020-01-02 18:14:02 +01:00
" \n",
" def to_instruction(self, state:RecipeInstructionState):\n",
" # create an instruction out of a recipe Tree\n",
" raise NotImplementedError()\n",
2019-11-08 10:47:58 +01:00
" \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Mix Node"
]
},
2019-12-01 14:04:07 +01:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For the Node Score: just make a simple lookup whether this combination is seen or not. So the node Score is defined as:\n"
]
},
2019-11-08 10:47:58 +01:00
{
"cell_type": "code",
"execution_count": 24,
2019-11-08 10:47:58 +01: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\"< <B>{self._name}</B><BR/>node score: {self.node_score():.4f}>\", shape=\"diamond\", style=\"filled\", color=\"#d5e8d4\")\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",
" \n",
" tmp_set = set()\n",
" cumulative_sets = []\n",
" \n",
" pairwise_tuples = []\n",
" \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",
" \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",
" \n",
" #s += sym_score(ing_a.to_json(), ing_b.to_json(), m_mix, c_mix)\n",
" \n",
2019-12-01 14:04:07 +01:00
" # old method:\n",
" #p1 = sym_p_a_given_b(ing_a.to_json(), ing_b.to_json(), m_mix, c_mix)\n",
" #p2 = sym_p_a_given_b(ing_b.to_json(), ing_a.to_json(), m_mix, c_mix)\n",
" #s += 0.5 * p1 + 0.5 * p2\n",
" \n",
2020-01-04 13:49:14 +01:00
" grouped_ing_a = to_grouped_ingredient(ing_a)\n",
" grouped_ing_b = to_grouped_ingredient(ing_b)\n",
2019-12-01 14:04:07 +01:00
" \n",
2020-01-04 13:49:14 +01:00
" ia = m_grouped_mix._label_index[grouped_ing_a.to_json()]\n",
" ib = m_grouped_mix._label_index[grouped_ing_b.to_json()]\n",
2019-12-01 14:04:07 +01:00
" \n",
2020-01-04 13:49:14 +01:00
" if c_grouped_mix[ia,ib] > 0 or c_grouped_mix[ib,ia] > 0:\n",
2019-12-01 14:04:07 +01:00
" s += 1\n",
" \n",
2019-11-08 10:47:58 +01:00
" \n",
2019-12-01 14:04:07 +01:00
" \n",
" except KeyError as e:\n",
2019-11-08 10:47:58 +01:00
" 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",
2020-01-02 18:14:02 +01:00
" def simplify(self):\n",
" for c in self.childs().copy():\n",
" c.simplify()\n",
" \n",
" # if our parent is also a Mix Node, we can just delete ourselve\n",
" p = self.parent()\n",
" \n",
" if p is not None:\n",
" if type(p) == MixNode:\n",
" # just delete ourselve\n",
" self.remove()\n",
" \n",
" def to_instruction(self, state:RecipeInstructionState = None):\n",
" \"\"\"\n",
" returns a RecipeInstructionState\n",
" \"\"\"\n",
" \n",
" def english_enum(items, use_and=True):\n",
" if len(items) > 1 and use_and:\n",
" return \", \".join(items[:-1]) + \" and \" + items[-1]\n",
" return \", \".join(items)\n",
" \n",
" if state is None:\n",
" state = RecipeInstructionState()\n",
" \n",
" for c in self.childs():\n",
" c.to_instruction(state)\n",
" \n",
" \n",
" text = \"\"\n",
" \n",
" # children with instructions\n",
" instruction_childs = []\n",
" \n",
" # children without instructions\n",
" base_childs = []\n",
" \n",
" # childre without instructions that are ingredients\n",
" ingredient_childs = []\n",
" \n",
" for c in self.childs():\n",
" assert type(c) != MixNode\n",
" if type(c) == IngredientNode:\n",
" ingredient_childs.append(c)\n",
" elif c._id not in state.step_by_nodeid:\n",
" # action node with no step so far, so a base child\n",
" base_childs.append(c)\n",
" else:\n",
" instruction_childs.append(c)\n",
" \n",
" if len(base_childs) > 0:\n",
" use_and= len(ingredient_childs)==0 and len(instruction_childs)==0\n",
" text = english_enum([state.text_by_nodeid[c._id] for c in base_childs], use_and=use_and)\n",
" \n",
" \n",
" if len(ingredient_childs) > 0:\n",
" if len(base_childs) > 0:\n",
" text += \" and mix it with \" + english_enum([state.text_by_nodeid[c._id] for c in ingredient_childs])\n",
" \n",
" else:\n",
" text = \"Mix \" + english_enum([state.text_by_nodeid[c._id] for c in ingredient_childs])\n",
" \n",
" if len(instruction_childs) > 0:\n",
" if len(base_childs) == 0:\n",
" text = \"Mix together the results of \"\n",
" else:\n",
" text += \" and mix it together with the results of \"\n",
" \n",
" text += english_enum([f\"step {state.step_by_nodeid[c._id]}\" for c in instruction_childs])\n",
" \n",
" text += \".\"\n",
" \n",
" if type(self.parent()) == ActionNode:\n",
" state.add_text(self._id, text, is_instruction=False)\n",
" else:\n",
" state.add_text(self._id, text, is_instruction=True)\n",
" \n",
" \n",
" return state\n",
" \n",
" \n",
2019-11-08 10:47:58 +01:00
" \n",
" \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Ingredient Node Class"
]
},
{
"cell_type": "code",
"execution_count": 25,
2019-11-08 10:47:58 +01:00
"metadata": {},
"outputs": [],
"source": [
2020-01-02 18:14:02 +01:00
"n_wanted_actions = 2\n",
"gaussian_normalize_factor = 1 / gaussian(n_wanted_actions, n_wanted_actions, 1)\n",
"\n",
2019-11-08 10:47:58 +01:00
"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",
" a_list = []\n",
" n = self.parent()\n",
" while n is not None:\n",
" if type(n) == ActionNode:\n",
" a_list.append(n.name())\n",
" n = n.parent()\n",
" return a_list\n",
" \n",
" def mutate_node(self):\n",
2020-01-02 18:14:02 +01:00
" pass\n",
" #self._name = random.choice(base_ingredients)\n",
2019-11-08 10:47:58 +01:00
" #TODO: change w.r.t. mixing probabilities \n",
" \n",
" def traverse_ingredients(self):\n",
" return [Ingredient(self._name)]\n",
" \n",
2020-01-02 18:14:02 +01:00
" def duplicate_actions_score(self, 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",
" duplicate_actions_score = len(seen_actions) / len(actions)\n",
" \n",
" return duplicate_actions_score\n",
" \n",
2020-01-04 13:49:14 +01:00
" def duplicate_groups_score(self, actions):\n",
" if len(actions) == 0:\n",
" return 1\n",
" groups = [AG.groups[a] for a in actions]\n",
" groups_set = set(groups)\n",
" \n",
" return len(groups_set) / len(groups)\n",
" \n",
2019-11-08 10:47:58 +01:00
" def node_score(self):\n",
" actions = self.get_actions()\n",
" \n",
2020-01-04 13:49:14 +01:00
" ing = Ingredient(self._name)\n",
" for a in actions:\n",
" ing.apply_action(a)\n",
" \n",
" heat = heat_score(ing)\n",
" prepare = prepare_score(ing)\n",
2020-01-02 18:14:02 +01:00
" \n",
2020-01-04 13:49:14 +01:00
" score = (heat + prepare + self.duplicate_groups_score(actions)) / 3\n",
" score *= self.duplicate_actions_score(actions)\n",
" \n",
" return score\n",
2020-01-02 18:14:02 +01:00
" \n",
" \"\"\"\n",
" actions = self.get_actions()\n",
" \n",
" if len(actions) == 0:\n",
" if p_ingredient_unprepared(self._name) < 0.2:\n",
" return 0\n",
2019-11-08 10:47:58 +01:00
" 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",
" duplicate_actions_score = len(seen_actions) / len(actions)\n",
" \n",
" return duplicate_actions_score\n",
2020-01-02 18:14:02 +01:00
" \"\"\"\n",
2019-11-08 10:47:58 +01:00
" \n",
" \n",
" def dot_node(self, dot):\n",
2020-01-02 18:14:02 +01:00
" dot.node(self._id, label=f\"< <B>{self._name}</B><BR/>node score:{self.node_score():.4f}>\", shape=\"box\", style=\"filled\", color=\"#ffe6cc\")\n",
" \n",
" def to_instruction(self, state:RecipeInstructionState = None):\n",
" state.add_text(self._id, self._name, is_instruction=False, is_ingredient=True)\n",
" return state"
2019-11-08 10:47:58 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Action Node Class"
]
},
{
"cell_type": "code",
"execution_count": 26,
2019-11-08 10:47:58 +01: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",
2020-01-02 18:14:02 +01:00
" \n",
" i_act = m_act._x_label_index[self.name()]\n",
" i_ing = m_act._y_label_index[ing.to_json()]\n",
" \n",
" if c_act[i_act,i_ing] > 0:\n",
" s += 1\n",
" \n",
" except KeyError as e:\n",
" #print(f\"WARNING: no entry found for: {str(e)}\")\n",
" pass\n",
" \n",
" ''' # old method:\n",
" for ing in ings:\n",
" try:\n",
2019-11-08 10:47:58 +01:00
" #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",
" \n",
" score = fw_p_a_given_b(self._name, ing._base_ingredient, m_base_act, c_base_act)\n",
" \n",
" s += score\n",
" except KeyError as e:\n",
" pass\n",
2020-01-02 18:14:02 +01:00
" '''\n",
2019-11-08 10:47:58 +01:00
" \n",
" \n",
" return s / len(ings)\n",
" \n",
" def dot_node(self, dot):\n",
2020-01-02 18:14:02 +01:00
" dot.node(self._id, label=f\"< <B>{self._name}</B><BR/>node score: {self.node_score():.4f}>\", shape=\"ellipse\", style=\"filled\", color=\"#dae8fc\")\n",
" \n",
" def to_instruction(self, state:RecipeInstructionState = None):\n",
" \n",
" if state is None:\n",
" state = RecipeInstructionState()\n",
" \n",
" for c in self.childs():\n",
" c.to_instruction(state)\n",
" \n",
" c = self._child\n",
" \n",
" if type(c) == MixNode:\n",
" text = state.text_by_nodeid[c._id] + f\" Then {self._name} it.\"\n",
" state.add_text(self._id, text, True)\n",
" elif type(c) == IngredientNode:\n",
" text = f\"{self._name} {state.text_by_nodeid[c._id]}\"\n",
" state.add_text(self._id, text, False)\n",
" \n",
" elif type(c) == ActionNode:\n",
2020-01-05 12:23:45 +01:00
" if c._id in state.step_by_nodeid:\n",
" text = f\"{self._name} the result of step {state.step_by_nodeid[c._id]}\"\n",
" else:\n",
" prev_words = state.text_by_nodeid[c._id].split()\n",
" text = f\"{prev_words[0]} and {self._name} {' '.join(prev_words[1:])}\"\n",
2020-01-02 18:14:02 +01:00
" state.add_text(self._id, text, True)\n",
" \n",
" return state\n",
" \n"
2019-11-08 10:47:58 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Tree Class"
]
},
{
"cell_type": "code",
"execution_count": 27,
2019-11-08 10:47:58 +01:00
"metadata": {},
"outputs": [],
"source": [
"class Tree(object):\n",
" @staticmethod\n",
2020-01-02 18:14:02 +01:00
" def build_initial_tree(ingredients: list, main_ingredients: list, max_n = 5, wheel_turns = 2):\n",
2019-11-08 10:47:58 +01:00
" \n",
2020-01-02 18:14:02 +01:00
" assert set(main_ingredients).issubset(set(ingredients))\n",
"\n",
" def does_action_match(ingredient:str, action:str, t = 0.6):\n",
" return relative_action_rank(ingredient, action) > t\n",
"\n",
2019-12-01 14:04:07 +01:00
"\n",
" # choose randomly an action for each ingredient by the \"wheel of fortune\" method\n",
" actions_for_ing = {}\n",
" for ing in ingredients:\n",
" actions_for_ing[ing] = set()\n",
" action_set, action_weights = m_base_act.get_backward_adjacent(ing)\n",
2020-01-02 18:14:02 +01:00
" if random_heated(ing):\n",
" #print(action_set)\n",
" action_set, action_weights = filter_set_by_group(action_set, action_weights, \"heat\")\n",
" #print(action_set)\n",
" for i in range(wheel_turns):\n",
" if ing in main_ingredients:\n",
" # if main ingredient: choose by action probability\n",
" w = np.array(list(action_weights), dtype=float)\n",
" w *= (1.0 / np.sum(w))\n",
" action = np.random.choice(list(action_set), size=1, replace=False, p=w)[0]\n",
" else:\n",
" # else: choose rank based\n",
" action = ea_tools.wheel_of_fortune_selection(action_set[:max_n], action_weights[:max_n])\n",
" actions_for_ing[ing].add(action)\n",
" #print(f\"action {action} for ing {ing}\")\n",
2019-12-01 14:04:07 +01:00
" #print(ing, action)\n",
"\n",
2020-01-02 18:14:02 +01:00
" # create ingredient nodes:\n",
2019-12-01 14:04:07 +01:00
" ingredient_nodes = {}\n",
2020-01-02 18:14:02 +01:00
"\n",
2019-11-08 10:47:58 +01:00
" # create ingredient nodes:\n",
" for ing in ingredients:\n",
2020-01-02 18:14:02 +01:00
" new_node = IngredientNode(ing, constant=True)\n",
"\n",
" # check if we should do a preparation step\n",
" if random_prepare(ing):\n",
" # choose a preparation cooking action\n",
" action_set, action_weights = m_act.get_backward_adjacent(Ingredient(ing).to_json())\n",
" action_set, action_weights = filter_set_by_group(action_set, action_weights, \"prepare\")\n",
" if len(action_set) > 0:\n",
" action = ea_tools.wheel_of_fortune_selection(action_set[:max_n], action_weights[:max_n])\n",
" act_node = ActionNode(action)\n",
" act_node.add_child(new_node)\n",
" new_node = act_node\n",
"\n",
"\n",
" ingredient_nodes[ing] = new_node\n",
"\n",
" # starting now with the actions found for the main ingredients and try to match all ingredients together\n",
" # with that:\n",
"\n",
" unprocessed_ings = set(filter(lambda x: len(actions_for_ing[x]) > 0, ingredients))\n",
" unprocessed_main_ings = set(filter(lambda x: len(actions_for_ing[x]) > 0, main_ingredients))\n",
"\n",
" while len(unprocessed_main_ings) > 0:\n",
" main_ing = unprocessed_main_ings.pop()\n",
"\n",
" # random action for that ing:\n",
" act = actions_for_ing[main_ing].pop()\n",
"\n",
" act_node = ActionNode(act)\n",
" mix_node = MixNode()\n",
" mix_node.add_child(ingredient_nodes[main_ing])\n",
" act_node.add_child(mix_node)\n",
" ingredient_nodes[main_ing] = act_node\n",
"\n",
" unprocessed_ings.remove(main_ing)\n",
"\n",
" for ing in unprocessed_ings.copy():\n",
" if does_action_match(ing, act):\n",
" mix_node.add_child(ingredient_nodes[ing])\n",
" ingredient_nodes[ing] = act_node\n",
" unprocessed_ings.remove(ing)\n",
" if ing in unprocessed_main_ings:\n",
" unprocessed_main_ings.remove(ing)\n",
"\n",
" if len(mix_node.childs()) == 1:\n",
" mix_node.remove()\n",
"\n",
" # now make the same with all remaining ingredients:\n",
2019-11-08 10:47:58 +01:00
" while len(unprocessed_ings) > 0:\n",
2020-01-02 18:14:02 +01:00
" current_ing = unprocessed_ings.pop() \n",
"\n",
" # random action for that ing:\n",
" act = actions_for_ing[current_ing].pop()\n",
"\n",
" act_node = ActionNode(act)\n",
" mix_node = MixNode()\n",
" mix_node.add_child(ingredient_nodes[current_ing])\n",
" act_node.add_child(mix_node)\n",
"\n",
" ingredient_nodes[current_ing] = act_node\n",
"\n",
"\n",
" for ing in unprocessed_ings.copy():\n",
" if does_action_match(ing, act):\n",
" mix_node.add_child(ingredient_nodes[ing])\n",
" ingredient_nodes[ing] = act_node\n",
2019-11-08 10:47:58 +01:00
" unprocessed_ings.remove(ing)\n",
2020-01-02 18:14:02 +01:00
"\n",
" if len(mix_node.childs()) == 1:\n",
" mix_node.remove()\n",
"\n",
"\n",
2019-12-01 14:04:07 +01:00
" root_layer = set([n.root() for n in ingredient_nodes.values()])\n",
2019-11-08 10:47:58 +01:00
"\n",
" root_layer_without_parents = []\n",
" for node in root_layer:\n",
" if node.parent() is None:\n",
" root_layer_without_parents.append(node)\n",
2020-01-02 18:14:02 +01:00
"\n",
2019-11-08 10:47:58 +01:00
" if len(root_layer_without_parents) == 1:\n",
2020-01-02 18:14:02 +01:00
" root_node = root_layer_without_parents[0]\n",
"\n",
" else:\n",
" root_node = MixNode()\n",
" for r in root_layer_without_parents:\n",
" root_node.add_child(r)\n",
2019-11-08 10:47:58 +01:00
" \n",
" return root_node\n",
2020-01-02 18:14:02 +01:00
"\n",
"\n",
2019-11-08 10:47:58 +01:00
" \n",
2019-12-01 14:04:07 +01:00
" @staticmethod\n",
" def find_ingredients(constant_ingredients, main_ingredients, min_additional:int, max_additional:int, top_ings:int=3):\n",
2019-12-01 14:04:07 +01:00
" '''\n",
" create an initial set of ingredients, based on given constant ingredients.\n",
" min_additional and max_additional gives the range of ingredients that are added to our set\n",
" '''\n",
" \n",
" seen_items = set(constant_ingredients)\n",
2020-01-02 18:14:02 +01:00
"\n",
2019-12-01 14:04:07 +01:00
" items = []\n",
" scores = []\n",
2020-01-02 18:14:02 +01:00
"\n",
" assert set(main_ingredients).issubset(set(constant_ingredients))\n",
"\n",
" # additional ingredients are choosen w.r.t all given ingredients\n",
" n_additional_ings = np.random.randint(min_additional, max_additional + 1)\n",
"\n",
" # extra ings are ingredients choosen specially for the main ingredient\n",
" n_extra_ings = int((len(main_ingredients) / len(constant_ingredients)) * n_additional_ings)\n",
"\n",
" if n_extra_ings > n_additional_ings:\n",
" n_extra_ings = n_additional_ings\n",
"\n",
"\n",
" # choose extra ingredients\n",
" extra_candidates = []\n",
" extra_weights = []\n",
"\n",
" for ing in main_ingredients:\n",
" candidates, weights = normalized_score(ing, m_base_mix)\n",
" extra_candidates.append(candidates[:10])\n",
" extra_weights.append(weights[:10])\n",
"\n",
" extra_ingredients = ea_tools.combined_wheel_of_fortune_selection(extra_candidates,\n",
" extra_weights,\n",
" n_extra_ings)\n",
"\n",
2019-12-01 14:04:07 +01:00
" for ing in constant_ingredients:\n",
" # find best matching ingredients\n",
" best_items = []\n",
" best_scores = []\n",
2020-01-02 18:14:02 +01:00
"\n",
2019-12-01 14:04:07 +01:00
" candidates, weights = m_base_mix.get_adjacent(ing)\n",
" i = 0\n",
" while i < len(candidates) and len(best_items) < top_ings:\n",
" if candidates[i] not in seen_items:\n",
" best_items.append(candidates[i])\n",
" best_scores.append(weights[i])\n",
" i += 1\n",
2020-01-02 18:14:02 +01:00
"\n",
2019-12-01 14:04:07 +01:00
" items.append(best_items)\n",
" scores.append(best_scores)\n",
2020-01-02 18:14:02 +01:00
"\n",
2019-12-01 14:04:07 +01:00
" #TODO: error handling if too few options are availabale!\n",
2020-01-02 18:14:02 +01:00
"\n",
2019-12-01 14:04:07 +01:00
" additional_ingredients = ea_tools.combined_wheel_of_fortune_selection(items,\n",
" scores,\n",
2020-01-02 18:14:02 +01:00
" n_additional_ings - n_extra_ings)\n",
2019-12-01 14:04:07 +01:00
" \n",
2020-01-02 18:14:02 +01:00
" return list(constant_ingredients) + list(additional_ingredients) + list(extra_ingredients)\n",
2019-11-08 10:47:58 +01:00
"\n",
" @staticmethod\n",
" def from_ingredients(ingredients: list, main_ingredients: list, additional_ings=0):\n",
2019-12-01 14:04:07 +01:00
" root = None\n",
" \n",
" constant_ingredients = ingredients\n",
" \n",
" if additional_ings > 0:\n",
" ingredients = Tree.find_ingredients(ingredients, main_ingredients, min_additional=0, max_additional=additional_ings)\n",
2019-11-08 10:47:58 +01:00
" \n",
2019-12-01 14:04:07 +01:00
" \n",
" root = Tree.build_initial_tree(ingredients, main_ingredients)\n",
2019-12-01 14:04:07 +01:00
" \n",
" # mark initial ingredient nodes as constant:\n",
" nodes = root.traverse()\n",
" for node in nodes:\n",
" if type(node) == IngredientNode:\n",
" if node.name() in constant_ingredients:\n",
" node._constant = True\n",
2019-11-08 10:47:58 +01:00
" \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",
2020-01-05 12:23:45 +01:00
" self._touched = True\n",
2019-11-08 10:47:58 +01:00
" \n",
" def root(self):\n",
" return self._root.child()\n",
" \n",
" def mutate(self):\n",
2020-01-05 12:23:45 +01:00
" self._touched = True\n",
2019-11-08 10:47:58 +01:00
" 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",
2020-01-02 18:14:02 +01:00
" \n",
" # check for simplification after modification\n",
" self.root().simplify()\n",
2019-11-08 10:47:58 +01:00
" \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",
" def collect_scores(self):\n",
" self._mix_scores = []\n",
" self._act_scores = []\n",
" self._ing_scores = []\n",
" \n",
" nodes = self.root().traverse()\n",
" self._n_mix_nodes = 0\n",
" self._n_act_nodes = 0\n",
" self._n_ing_nodes = 0\n",
" \n",
" s = 0\n",
" for n in nodes:\n",
" 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",
" \n",
" self._n_duplicates = 0\n",
" seen_actions = set()\n",
" \n",
" for n in nodes:\n",
" if type(n) == ActionNode:\n",
" if n.name() in seen_actions:\n",
" self._n_duplicates += 1\n",
" else:\n",
" seen_actions.add(n.name())\n",
" \n",
" 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",
" \n",
" \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",
2020-01-05 12:23:45 +01:00
" def score(self):\n",
" if not self._touched:\n",
" return self._score\n",
" \n",
" self.collect_scores()\n",
" s_mix = self.mix_scores()\n",
" s_act = self.action_scores()\n",
" s_ing = self.ing_scores()\n",
" \n",
" n = len(s_mix) + len(s_act) + len(s_ing)\n",
" \n",
" avg_mix = np.average(s_mix) if len(s_mix) > 0 else 1\n",
" avg_act = np.average(s_act) if len(s_act) > 0 else 1\n",
" avg_ing = np.average(s_ing) if len(s_ing) > 0 else 1\n",
" \n",
" sum_mix = np.sum(s_mix) if len(s_mix) > 0 else 0\n",
" sum_act = np.sum(s_act) if len(s_act) > 0 else 0\n",
" sum_ing = np.sum(s_ing) if len(s_ing) > 0 else 0\n",
" \n",
" self._touched = False\n",
" \n",
" # boost creativity\n",
" if len(s_act) < 3:\n",
" self._score = 0\n",
" elif len(s_ing) < 3:\n",
" self._score = 0\n",
" else: \n",
" self._score = (sum_mix + sum_act + sum_ing) / n\n",
" self._score *= (len(s_act) - self._n_duplicates) / len(s_act)\n",
"\n",
" return self._score\n",
2019-11-08 10:47:58 +01:00
" \n",
" def copy(self):\n",
" return Tree.from_serialization(self.serialize())\n"
]
},
2020-01-02 18:14:02 +01:00
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Population"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
2020-01-02 18:14:02 +01:00
"class Population(object):\n",
2020-01-05 12:23:45 +01:00
" def __init__(self, start_ingredients, main_ingredients, n_population = 50, max_additional_ings=0):\n",
" self.population = []\n",
" for i in tqdm(range(n_population), desc=\"build initial population\"):\n",
" self.population.append(Tree.from_ingredients(start_ingredients, main_ingredients, additional_ings=max_additional_ings))\n",
2020-01-02 18:14:02 +01:00
" self._n = n_population\n",
" \n",
2020-01-02 18:14:02 +01:00
" 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",
2020-01-02 18:14:02 +01:00
" def pairwise_competition(self):\n",
" new_population = []\n",
" indices = list(range(len(self.population)))\n",
" random.shuffle(indices)\n",
" \n",
2020-01-02 18:14:02 +01:00
" for i in range(len(self.population) // 2):\n",
" i_a = indices[2*i]\n",
" i_b = indices[2*i+1]\n",
" \n",
2020-01-05 12:23:45 +01:00
" \n",
" if self.population[i_a].score() > self.population[i_b].score():\n",
2020-01-02 18:14:02 +01:00
" new_population.append(self.population[i_a])\n",
" else:\n",
" new_population.append(self.population[i_b])\n",
" \n",
" self.population = new_population\n",
" \n",
2020-01-02 18:14:02 +01:00
" def hold_best(self, n=10):\n",
2020-01-05 12:23:45 +01:00
" scores = [tree.score() for tree in self.population]\n",
2019-11-08 10:47:58 +01:00
" \n",
2020-01-05 12:23:45 +01:00
" sorted_indices = np.argsort(-scores)\n",
2019-11-08 10:47:58 +01:00
" \n",
2020-01-05 12:23:45 +01:00
" self.population = np.array(self.population)[sorted_indices[:n]].tolist()\n",
2019-11-08 10:47:58 +01:00
" \n",
" def run(self, n=50):\n",
2019-12-01 14:04:07 +01:00
" for i in tqdm(range(n), desc=\"run evolutionary cycles\"):\n",
2019-11-08 10:47:58 +01:00
" self.mutate()\n",
2020-01-04 13:49:14 +01:00
" #self.mutate()\n",
2020-01-05 12:23:45 +01:00
" #self.collect_scores()\n",
2019-12-01 14:04:07 +01:00
" \n",
2020-01-04 13:49:14 +01:00
" self.pairwise_competition()\n",
2019-11-08 10:47:58 +01:00
" #self.collect_scores()\n",
2020-01-04 13:49:14 +01:00
" #self.hold_best(self._n)\n",
2019-11-08 10:47:58 +01:00
" \n",
" \n",
" \n",
2020-01-05 12:23:45 +01:00
" def plot_population(self, n_best=10):\n",
" scores = [tree.score() for tree in self.population]\n",
" \n",
" ii = np.argsort(-np.array(scores))[:n_best]\n",
"\n",
" for i in ii:\n",
" \n",
" display(self.population[i].root().dot())\n",
" display(Markdown(f\"**Recipe Score**: {scores[i]}\"))\n",
" display(self.population[i].root().to_instruction().to_markdown())"
2019-11-08 10:47:58 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Run Evolutionary Algorithm"
]
},
{
"cell_type": "code",
"execution_count": 29,
2019-11-08 10:47:58 +01:00
"metadata": {},
2020-01-02 18:14:02 +01:00
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "76982efe704f44abace8fba9f981c760",
2020-01-02 18:14:02 +01:00
"version_major": 2,
"version_minor": 0
},
"text/plain": [
2020-01-05 12:23:45 +01:00
"HBox(children=(FloatProgress(value=0.0, description='build initial population', max=25.0, style=ProgressStyle(…"
2020-01-02 18:14:02 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
2020-01-04 13:49:14 +01:00
{
2020-01-05 12:23:45 +01:00
"name": "stdout",
2020-01-04 13:49:14 +01:00
"output_type": "stream",
"text": [
"\n"
]
2020-01-05 12:23:45 +01:00
}
],
"source": [
"p = Population([\"spaghetti\"],['spaghetti'], max_additional_ings=6, n_population = 25)"
2020-01-05 12:23:45 +01:00
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"#p_ingredient_unprepared(list(p.population[0].root().childs())[0]._name) < 0.2"
]
},
{
"cell_type": "code",
"execution_count": 37,
2020-01-05 12:23:45 +01:00
"metadata": {},
"outputs": [
2020-01-02 18:14:02 +01:00
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "68939d53ea85488cbbbb674bfd34afa6",
2020-01-02 18:14:02 +01:00
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, description='run evolutionary cycles', max=10.0, style=ProgressStyle(d…"
2020-01-02 18:14:02 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
}
],
2019-11-08 10:47:58 +01:00
"source": [
"p.run(10)"
2020-01-02 18:14:02 +01:00
]
},
{
"cell_type": "code",
"execution_count": 30,
2019-11-08 10:47:58 +01:00
"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=\"452pt\" height=\"434pt\"\n",
" viewBox=\"0.00 0.00 451.71 433.82\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
2020-01-05 12:23:45 +01:00
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429.8234)\">\n",
2019-11-08 10:47:58 +01:00
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-429.8234 447.7056,-429.8234 447.7056,4 -4,4\"/>\n",
"<!-- 115 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"node1\" class=\"node\">\n",
"<title>115</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"262.8528,-425.8234 142.8528,-389.8234 262.8528,-353.8234 382.8528,-389.8234 262.8528,-425.8234\"/>\n",
"<text text-anchor=\"start\" x=\"249.3528\" y=\"-393.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"253.3528\" y=\"-393.6234\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"210.8528\" y=\"-379.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 111 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"node2\" class=\"node\">\n",
"<title>111</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"168.8528\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"155.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"159.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">boil</text>\n",
"<text text-anchor=\"start\" x=\"116.8528\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 115&#45;&gt;111 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge1\" class=\"edge\">\n",
"<title>115&#45;&gt;111</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M235.9162,-361.8964C224.5946,-350.1586 211.3608,-336.4383 199.6545,-324.3016\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"202.0553,-321.7491 192.5939,-316.9814 197.017,-326.6088 202.0553,-321.7491\"/>\n",
"</g>\n",
"<!-- 113 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>113</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"358.8528\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"342.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"346.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">bake</text>\n",
"<text text-anchor=\"start\" x=\"306.8528\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
"</g>\n",
"<!-- 115&#45;&gt;113 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>115&#45;&gt;113</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M290.3626,-361.8964C301.9251,-350.1586 315.4404,-336.4383 327.3958,-324.3016\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"330.0824,-326.5617 334.6066,-316.9814 325.0955,-321.6493 330.0824,-326.5617\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 112 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node3\" class=\"node\">\n",
"<title>112</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"164.8528,-230.9117 44.8528,-194.9117 164.8528,-158.9117 284.8528,-194.9117 164.8528,-230.9117\"/>\n",
"<text text-anchor=\"start\" x=\"151.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"155.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"112.8528\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 111&#45;&gt;112 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge2\" class=\"edge\">\n",
"<title>111&#45;&gt;112</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M167.8019,-266.7622C167.4722,-258.7311 167.0978,-249.6091 166.7291,-240.6244\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"170.225,-240.4521 166.3178,-230.6041 163.2309,-240.7393 170.225,-240.4521\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 109 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node4\" class=\"node\">\n",
"<title>109</title>\n",
2020-01-04 13:49:14 +01:00
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"84.8528\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"70.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"74.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">slice</text>\n",
2020-01-04 13:49:14 +01:00
"<text text-anchor=\"start\" x=\"32.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 112&#45;&gt;109 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>112&#45;&gt;109</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M141.0668,-165.9356C131.786,-154.6298 121.1035,-141.6164 111.5601,-129.9906\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"114.2164,-127.7103 105.1663,-122.2016 108.8059,-132.1517 114.2164,-127.7103\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 107 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>107</title>\n",
2020-01-05 12:23:45 +01:00
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"303.8528,-115.4558 187.8528,-115.4558 187.8528,-79.4558 303.8528,-79.4558 303.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"217.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"221.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">spaghetti</text>\n",
2020-01-05 12:23:45 +01:00
"<text text-anchor=\"start\" x=\"195.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
"</g>\n",
"<!-- 112&#45;&gt;107 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>112&#45;&gt;107</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M188.9362,-165.9356C200.1356,-152.4609 213.3511,-136.5605 224.2274,-123.4746\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"226.9579,-125.6651 230.6582,-115.7374 221.5746,-121.1907 226.9579,-125.6651\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 108 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>108</title>\n",
2020-01-04 13:49:14 +01:00
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"142.8528,-36 26.8528,-36 26.8528,0 142.8528,0 142.8528,-36\"/>\n",
"<text text-anchor=\"start\" x=\"50.8528\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"54.8528\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mushroom</text>\n",
2020-01-05 12:23:45 +01:00
"<text text-anchor=\"start\" x=\"34.8528\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 109&#45;&gt;108 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>109&#45;&gt;108</title>\n",
2020-01-04 13:49:14 +01:00
"<path fill=\"none\" stroke=\"#000000\" d=\"M84.8528,-71.8782C84.8528,-63.7122 84.8528,-54.6289 84.8528,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"88.3529,-46.2287 84.8528,-36.2288 81.3529,-46.2288 88.3529,-46.2287\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 110 -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>110</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"418.8528,-212.9117 302.8528,-212.9117 302.8528,-176.9117 418.8528,-176.9117 418.8528,-212.9117\"/>\n",
"<text text-anchor=\"start\" x=\"325.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"329.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">pasta sauce</text>\n",
"<text text-anchor=\"start\" x=\"310.8528\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 113&#45;&gt;110 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>113&#45;&gt;110</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M359.3783,-266.7622C359.6523,-253.4123 359.9881,-237.0481 360.27,-223.3105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"363.7763,-223.0339 360.4823,-212.9642 356.7778,-222.8902 363.7763,-223.0339\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.dot.Digraph at 0x7ff9afdcb2d0>"
2020-01-02 18:14:02 +01:00
]
},
"metadata": {},
2020-01-05 12:23:45 +01:00
"output_type": "display_data"
},
2020-01-02 18:14:02 +01:00
{
"data": {
"text/markdown": [
2020-01-05 12:23:45 +01:00
"**Recipe Score**: 1.0"
2020-01-02 18:14:02 +01:00
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
2020-01-04 13:49:14 +01:00
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2020-01-05 12:23:45 +01:00
"text/markdown": [
"**Ingredients**:\n",
" * mushroom\n",
" * spaghetti\n",
" * pasta sauce\n",
2020-01-05 12:23:45 +01:00
"\n",
"\n",
"**Instructions**:\n",
"\n",
"| Step | Instruction |\n",
"| ----:|:----------- |\n",
"| 1 | slice mushroom and mix it with spaghetti. Then boil it. |\n",
"| 2 | bake pasta sauce and mix it together with the results of step 1. |\n"
2020-01-05 12:23:45 +01:00
],
2020-01-04 13:49:14 +01:00
"text/plain": [
2020-01-05 12:23:45 +01:00
"<IPython.core.display.Markdown object>"
2020-01-04 13:49:14 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
2020-01-02 18:14:02 +01: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",
"<svg width=\"714pt\" height=\"434pt\"\n",
" viewBox=\"0.00 0.00 713.85 433.82\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
2020-01-05 12:23:45 +01:00
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429.8234)\">\n",
2020-01-02 18:14:02 +01:00
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-429.8234 709.8528,-429.8234 709.8528,4 -4,4\"/>\n",
"<!-- 135 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"node1\" class=\"node\">\n",
"<title>135</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"477.8528,-425.8234 357.8528,-389.8234 477.8528,-353.8234 597.8528,-389.8234 477.8528,-425.8234\"/>\n",
"<text text-anchor=\"start\" x=\"464.3528\" y=\"-393.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"468.3528\" y=\"-393.6234\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"425.8528\" y=\"-379.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 133 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"node2\" class=\"node\">\n",
"<title>133</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"383.8528\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"367.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"371.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cook</text>\n",
"<text text-anchor=\"start\" x=\"331.8528\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 135&#45;&gt;133 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"edge1\" class=\"edge\">\n",
"<title>135&#45;&gt;133</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M450.9162,-361.8964C439.5946,-350.1586 426.3608,-336.4383 414.6545,-324.3016\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"417.0553,-321.7491 407.5939,-316.9814 412.017,-326.6088 417.0553,-321.7491\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 130 -->\n",
"<g id=\"node10\" class=\"node\">\n",
"<title>130</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"573.8528\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"556.3528\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"560.3528\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">grate</text>\n",
"<text text-anchor=\"start\" x=\"521.8528\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 135&#45;&gt;130 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>135&#45;&gt;130</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M505.3626,-361.8964C516.9251,-350.1586 530.4404,-336.4383 542.3958,-324.3016\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"545.0824,-326.5617 549.6066,-316.9814 540.0955,-321.6493 545.0824,-326.5617\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 134 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>134</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"379.8528,-230.9117 259.8528,-194.9117 379.8528,-158.9117 499.8528,-194.9117 379.8528,-230.9117\"/>\n",
"<text text-anchor=\"start\" x=\"366.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"370.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"327.8528\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.5000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 133&#45;&gt;134 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge2\" class=\"edge\">\n",
"<title>133&#45;&gt;134</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M382.8019,-266.7622C382.4722,-258.7311 382.0978,-249.6091 381.7291,-240.6244\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"385.225,-240.4521 381.3178,-230.6041 378.2309,-240.7393 385.225,-240.4521\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 127 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>127</title>\n",
2020-01-04 13:49:14 +01:00
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"84.8528\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"68.8528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
2020-01-05 12:23:45 +01:00
"<text text-anchor=\"start\" x=\"72.8528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">chop</text>\n",
2020-01-04 13:49:14 +01:00
"<text text-anchor=\"start\" x=\"32.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 134&#45;&gt;127 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>134&#45;&gt;127</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M322.6241,-176.0057C273.6698,-159.8332 203.1599,-136.5396 151.6367,-119.5185\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"152.5155,-116.1228 141.9223,-116.3092 150.3197,-122.7695 152.5155,-116.1228\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 132 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>132</title>\n",
2020-01-04 13:49:14 +01:00
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"303.8528,-115.4558 187.8528,-115.4558 187.8528,-79.4558 303.8528,-79.4558 303.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"205.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"209.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">tomato sauce</text>\n",
2020-01-04 13:49:14 +01:00
"<text text-anchor=\"start\" x=\"195.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 134&#45;&gt;132 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>134&#45;&gt;132</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M344.6459,-169.3063C324.2909,-154.5025 298.8393,-135.992 278.8676,-121.4669\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"280.8206,-118.5596 270.6746,-115.5083 276.7033,-124.2207 280.8206,-118.5596\"/>\n",
"</g>\n",
"<!-- 131 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>131</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"437.8528,-115.4558 321.8528,-115.4558 321.8528,-79.4558 437.8528,-79.4558 437.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"344.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"348.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">pasta sauce</text>\n",
"<text text-anchor=\"start\" x=\"329.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
"</g>\n",
"<!-- 134&#45;&gt;131 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>134&#45;&gt;131</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M379.8528,-158.8996C379.8528,-147.9536 379.8528,-136.0871 379.8528,-125.7278\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"383.3529,-125.5795 379.8528,-115.5795 376.3529,-125.5795 383.3529,-125.5795\"/>\n",
"</g>\n",
"<!-- 125 -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>125</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"571.8528,-115.4558 455.8528,-115.4558 455.8528,-79.4558 571.8528,-79.4558 571.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"485.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"489.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">spaghetti</text>\n",
"<text text-anchor=\"start\" x=\"463.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
"</g>\n",
"<!-- 134&#45;&gt;125 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge7\" class=\"edge\">\n",
"<title>134&#45;&gt;125</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M415.0597,-169.3063C435.4147,-154.5025 460.8663,-135.992 480.838,-121.4669\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"483.0023,-124.2207 489.031,-115.5083 478.885,-118.5596 483.0023,-124.2207\"/>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 128 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node9\" class=\"node\">\n",
"<title>128</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"705.8528,-115.4558 589.8528,-115.4558 589.8528,-79.4558 705.8528,-79.4558 705.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"610.8528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"614.8528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">ground beef</text>\n",
"<text text-anchor=\"start\" x=\"597.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 134&#45;&gt;128 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge8\" class=\"edge\">\n",
"<title>134&#45;&gt;128</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M435.4111,-175.3316C475.825,-161.0105 531.8205,-141.0063 580.8528,-122.9117 584.2637,-121.6529 587.7688,-120.3499 591.3022,-119.0291\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"592.5443,-122.3014 600.6759,-115.5096 590.0837,-115.7481 592.5443,-122.3014\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 126 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>126</title>\n",
2020-01-05 12:23:45 +01:00
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"142.8528,-36 26.8528,-36 26.8528,0 142.8528,0 142.8528,-36\"/>\n",
"<text text-anchor=\"start\" x=\"49.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"53.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">garlic clove</text>\n",
2020-01-05 12:23:45 +01:00
"<text text-anchor=\"start\" x=\"34.8528\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 127&#45;&gt;126 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>127&#45;&gt;126</title>\n",
2020-01-02 18:14:02 +01:00
"<path fill=\"none\" stroke=\"#000000\" d=\"M84.8528,-71.8782C84.8528,-63.7122 84.8528,-54.6289 84.8528,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"88.3529,-46.2287 84.8528,-36.2288 81.3529,-46.2288 88.3529,-46.2287\"/>\n",
"</g>\n",
"<!-- 129 -->\n",
"<g id=\"node11\" class=\"node\">\n",
"<title>129</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"633.8528,-212.9117 517.8528,-212.9117 517.8528,-176.9117 633.8528,-176.9117 633.8528,-212.9117\"/>\n",
"<text text-anchor=\"start\" x=\"555.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"559.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cheese</text>\n",
"<text text-anchor=\"start\" x=\"525.8528\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 130&#45;&gt;129 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>130&#45;&gt;129</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M574.3783,-266.7622C574.6523,-253.4123 574.9881,-237.0481 575.27,-223.3105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"578.7763,-223.0339 575.4823,-212.9642 571.7778,-222.8902 578.7763,-223.0339\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.dot.Digraph at 0x7ff9ea766850>"
2020-01-05 12:23:45 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Recipe Score**: 0.9545454545454546"
2020-01-05 12:23:45 +01:00
],
"text/plain": [
"<IPython.core.display.Markdown object>"
2020-01-04 13:49:14 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2020-01-05 12:23:45 +01:00
"text/markdown": [
"**Ingredients**:\n",
" * pasta sauce\n",
" * ground beef\n",
" * spaghetti\n",
" * tomato sauce\n",
2020-01-05 12:23:45 +01:00
" * cheese\n",
" * garlic clove\n",
2020-01-05 12:23:45 +01:00
"\n",
"\n",
"**Instructions**:\n",
"\n",
"| Step | Instruction |\n",
"| ----:|:----------- |\n",
"| 1 | chop garlic clove and mix it with tomato sauce, pasta sauce, spaghetti and ground beef. Then cook it. |\n",
"| 2 | grate cheese and mix it together with the results of step 1. |\n"
2020-01-05 12:23:45 +01:00
],
2020-01-04 13:49:14 +01:00
"text/plain": [
2020-01-05 12:23:45 +01:00
"<IPython.core.display.Markdown object>"
2019-11-08 10:47:58 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"956pt\" height=\"326pt\"\n",
" viewBox=\"0.00 0.00 956.00 325.82\" 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 321.8234)\">\n",
2019-11-08 10:47:58 +01:00
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-321.8234 952,-321.8234 952,4 -4,4\"/>\n",
"<!-- 223 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"node1\" class=\"node\">\n",
"<title>223</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"460\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"444\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"448\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cook</text>\n",
"<text text-anchor=\"start\" x=\"408\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.6667</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 224 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"node2\" class=\"node\">\n",
"<title>224</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"460,-230.9117 340,-194.9117 460,-158.9117 580,-194.9117 460,-230.9117\"/>\n",
"<text text-anchor=\"start\" x=\"446.5\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"450.5\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"408\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.8000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 223&#45;&gt;224 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"edge1\" class=\"edge\">\n",
"<title>223&#45;&gt;224</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M460,-266.7622C460,-258.8985 460,-249.989 460,-241.1865\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"463.5001,-240.9713 460,-230.9713 456.5001,-240.9714 463.5001,-240.9713\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 214 -->\n",
2020-01-04 13:49:14 +01:00
"<g id=\"node3\" class=\"node\">\n",
"<title>214</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"116,-115.4558 0,-115.4558 0,-79.4558 116,-79.4558 116,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"29.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"33.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">spaghetti</text>\n",
"<text text-anchor=\"start\" x=\"8\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 224&#45;&gt;214 -->\n",
2020-01-04 13:49:14 +01:00
"<g id=\"edge2\" class=\"edge\">\n",
"<title>224&#45;&gt;214</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M383.3367,-181.8537C314.8954,-169.39 212.2833,-148.7111 125,-122.9117 120.9055,-121.7014 116.705,-120.3583 112.5004,-118.9397\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"113.3251,-115.5201 102.7303,-115.5194 111.0122,-122.127 113.3251,-115.5201\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 218 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>218</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"219\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"207.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"211.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cut</text>\n",
"<text text-anchor=\"start\" x=\"167\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 224&#45;&gt;218 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>224&#45;&gt;218</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M408.8901,-174.2438C370.8991,-158.881 318.9488,-137.8732 278.9886,-121.7141\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"280.2053,-118.4308 269.6225,-117.9266 277.581,-124.9203 280.2053,-118.4308\"/>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 222 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"node6\" class=\"node\">\n",
"<title>222</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"438,-115.4558 322,-115.4558 322,-79.4558 438,-79.4558 438,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"339.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"343.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">tomato sauce</text>\n",
"<text text-anchor=\"start\" x=\"330\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 224&#45;&gt;222 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"edge5\" class=\"edge\">\n",
"<title>224&#45;&gt;222</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M436.214,-165.9356C425.1528,-152.4609 412.1004,-136.5605 401.3584,-123.4746\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"404.0572,-121.246 395.007,-115.7374 398.6467,-125.6875 404.0572,-121.246\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 216 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>216</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"541\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"525\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"529\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">chop</text>\n",
"<text text-anchor=\"start\" x=\"489\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
"</g>\n",
"<!-- 224&#45;&gt;216 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>224&#45;&gt;216</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M484.0834,-165.9356C493.4801,-154.6298 504.2961,-141.6164 513.9589,-129.9906\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"516.7324,-132.1293 520.4326,-122.2016 511.349,-127.655 516.7324,-132.1293\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 220 -->\n",
"<g id=\"node9\" class=\"node\">\n",
"<title>220</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"729\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"712\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"716\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">wash</text>\n",
"<text text-anchor=\"start\" x=\"677\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 224&#45;&gt;220 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>224&#45;&gt;220</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M514.4362,-175.19C558.0073,-159.4047 619.2031,-137.2341 665.0959,-120.6076\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"666.435,-123.8452 674.6448,-117.1482 664.0506,-117.2638 666.435,-123.8452\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 221 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node11\" class=\"node\">\n",
"<title>221</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"948,-115.4558 832,-115.4558 832,-79.4558 948,-79.4558 948,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"854.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"858.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">pasta sauce</text>\n",
"<text text-anchor=\"start\" x=\"840\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 224&#45;&gt;221 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge10\" class=\"edge\">\n",
"<title>224&#45;&gt;221</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M540.2252,-182.9601C614.3963,-170.9805 727.2779,-150.3799 823,-122.9117 827.2871,-121.6815 831.6871,-120.2967 836.0845,-118.8248\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"837.3692,-122.0836 845.6618,-115.4895 835.067,-115.473 837.3692,-122.0836\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 217 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>217</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"277,-36 161,-36 161,0 277,0 277,-36\"/>\n",
"<text text-anchor=\"start\" x=\"200.5\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"204.5\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">onion</text>\n",
"<text text-anchor=\"start\" x=\"169\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 218&#45;&gt;217 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>218&#45;&gt;217</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M219,-71.8782C219,-63.7122 219,-54.6289 219,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"222.5001,-46.2287 219,-36.2288 215.5001,-46.2288 222.5001,-46.2287\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 215 -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>215</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"599,-36 483,-36 483,0 599,0 599,-36\"/>\n",
"<text text-anchor=\"start\" x=\"520.5\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"524.5\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cheese</text>\n",
"<text text-anchor=\"start\" x=\"491\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 216&#45;&gt;215 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>216&#45;&gt;215</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M541,-71.8782C541,-63.7122 541,-54.6289 541,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"544.5001,-46.2287 541,-36.2288 537.5001,-46.2288 544.5001,-46.2287\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 219 -->\n",
"<g id=\"node10\" class=\"node\">\n",
"<title>219</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"787,-36 671,-36 671,0 787,0 787,-36\"/>\n",
"<text text-anchor=\"start\" x=\"695\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"699\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mushroom</text>\n",
"<text text-anchor=\"start\" x=\"679\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 220&#45;&gt;219 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>220&#45;&gt;219</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M729,-71.8782C729,-63.7122 729,-54.6289 729,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"732.5001,-46.2287 729,-36.2288 725.5001,-46.2288 732.5001,-46.2287\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.dot.Digraph at 0x7ff9bf89b3d0>"
2020-01-05 12:23:45 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Recipe Score**: 0.9515151515151515"
2020-01-05 12:23:45 +01:00
],
"text/plain": [
"<IPython.core.display.Markdown object>"
2020-01-04 13:49:14 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2020-01-05 12:23:45 +01:00
"text/markdown": [
"**Ingredients**:\n",
" * pasta sauce\n",
" * mushroom\n",
" * spaghetti\n",
" * tomato sauce\n",
2020-01-05 12:23:45 +01:00
" * cheese\n",
" * onion\n",
2020-01-05 12:23:45 +01:00
"\n",
"\n",
"**Instructions**:\n",
"\n",
"| Step | Instruction |\n",
"| ----:|:----------- |\n",
"| 1 | cut onion, chop cheese, wash mushroom and mix it with spaghetti, tomato sauce and pasta sauce. Then cook it. |\n"
2020-01-05 12:23:45 +01:00
],
2020-01-04 13:49:14 +01:00
"text/plain": [
2020-01-05 12:23:45 +01:00
"<IPython.core.display.Markdown object>"
2019-12-01 14:04:07 +01:00
]
2019-11-08 10:47:58 +01:00
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2019-12-01 14:04:07 +01:00
"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=\"746pt\" height=\"434pt\"\n",
" viewBox=\"0.00 0.00 745.71 433.82\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
2020-01-05 12:23:45 +01:00
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429.8234)\">\n",
2019-12-01 14:04:07 +01:00
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-429.8234 741.7056,-429.8234 741.7056,4 -4,4\"/>\n",
"<!-- 26 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node1\" class=\"node\">\n",
"<title>26</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"366.8528,-425.8234 246.8528,-389.8234 366.8528,-353.8234 486.8528,-389.8234 366.8528,-425.8234\"/>\n",
"<text text-anchor=\"start\" x=\"353.3528\" y=\"-393.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"357.3528\" y=\"-393.6234\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"314.8528\" y=\"-379.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.9167</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 15 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node2\" class=\"node\">\n",
"<title>15</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"84.8528\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"73.3528\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"77.3528\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cut</text>\n",
"<text text-anchor=\"start\" x=\"32.8528\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 26&#45;&gt;15 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"edge1\" class=\"edge\">\n",
"<title>26&#45;&gt;15</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M310.8015,-370.4527C264.5718,-354.4763 198.9181,-331.7871 150.2866,-314.9807\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"151.3928,-311.6599 140.798,-311.7015 149.1063,-318.276 151.3928,-311.6599\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 24 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>24</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"272.8528\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"247.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"251.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">simmer</text>\n",
"<text text-anchor=\"start\" x=\"220.8528\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 26&#45;&gt;24 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>26&#45;&gt;24</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M339.9162,-361.8964C328.5946,-350.1586 315.3608,-336.4383 303.6545,-324.3016\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"306.0553,-321.7491 296.5939,-316.9814 301.017,-326.6088 306.0553,-321.7491\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 22 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>22</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"460.8528\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"447.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"451.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">boil</text>\n",
"<text text-anchor=\"start\" x=\"408.8528\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 26&#45;&gt;22 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>26&#45;&gt;22</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M393.7894,-361.8964C405.1111,-350.1586 418.3448,-336.4383 430.0511,-324.3016\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"432.6886,-326.6088 437.1118,-316.9814 427.6503,-321.7491 432.6886,-326.6088\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 18 -->\n",
"<g id=\"node12\" class=\"node\">\n",
"<title>18</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"652.8528\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"635.3528\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"639.3528\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">grate</text>\n",
"<text text-anchor=\"start\" x=\"600.8528\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 26&#45;&gt;18 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>26&#45;&gt;18</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M423.3572,-370.5692C470.3632,-354.5517 537.3423,-331.7283 586.8156,-314.87\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"588.1292,-318.1201 596.4658,-311.5817 585.8713,-311.4942 588.1292,-318.1201\"/>\n",
"</g>\n",
"<!-- 14 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>14</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"142.8528,-212.9117 26.8528,-212.9117 26.8528,-176.9117 142.8528,-176.9117 142.8528,-212.9117\"/>\n",
"<text text-anchor=\"start\" x=\"66.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"70.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">onion</text>\n",
"<text text-anchor=\"start\" x=\"34.8528\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:0.6667</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 15&#45;&gt;14 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>15&#45;&gt;14</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M84.8528,-266.7622C84.8528,-253.4123 84.8528,-237.0481 84.8528,-223.3105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"88.3529,-222.9641 84.8528,-212.9642 81.3529,-222.9642 88.3529,-222.9641\"/>\n",
"</g>\n",
"<!-- 21 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node5\" class=\"node\">\n",
"<title>21</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"322.8528,-212.9117 206.8528,-212.9117 206.8528,-176.9117 322.8528,-176.9117 322.8528,-212.9117\"/>\n",
"<text text-anchor=\"start\" x=\"229.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"233.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">pasta sauce</text>\n",
"<text text-anchor=\"start\" x=\"214.8528\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 24&#45;&gt;21 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"edge4\" class=\"edge\">\n",
"<title>24&#45;&gt;21</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M270.7509,-266.7622C269.655,-253.4123 268.3117,-237.0481 267.184,-223.3105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"270.6412,-222.6443 266.3347,-212.9642 263.6647,-223.217 270.6412,-222.6443\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 23 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"node7\" class=\"node\">\n",
"<title>23</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"460.8528,-230.9117 340.8528,-194.9117 460.8528,-158.9117 580.8528,-194.9117 460.8528,-230.9117\"/>\n",
"<text text-anchor=\"start\" x=\"447.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"451.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"408.8528\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.6667</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 22&#45;&gt;23 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"edge6\" class=\"edge\">\n",
"<title>22&#45;&gt;23</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M460.8528,-266.7622C460.8528,-258.8985 460.8528,-249.989 460.8528,-241.1865\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"464.3529,-240.9713 460.8528,-230.9713 457.3529,-240.9714 464.3529,-240.9713\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 13 -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>13</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"357.8528,-115.4558 241.8528,-115.4558 241.8528,-79.4558 357.8528,-79.4558 357.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"271.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"275.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">spaghetti</text>\n",
"<text text-anchor=\"start\" x=\"249.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 23&#45;&gt;13 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>23&#45;&gt;13</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M421.0551,-170.8215C395.8432,-155.5603 363.403,-135.9238 338.4295,-120.8069\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"339.9611,-117.6428 329.5938,-115.4585 336.3362,-123.6311 339.9611,-117.6428\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 20 -->\n",
"<g id=\"node9\" class=\"node\">\n",
"<title>20</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"460.8528\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"446.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"450.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">slice</text>\n",
"<text text-anchor=\"start\" x=\"408.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 23&#45;&gt;20 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>23&#45;&gt;20</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M460.8528,-158.8996C460.8528,-150.5122 460.8528,-141.5843 460.8528,-133.2082\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"464.3529,-132.9756 460.8528,-122.9757 457.3529,-132.9757 464.3529,-132.9756\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 16 -->\n",
"<g id=\"node11\" class=\"node\">\n",
"<title>16</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"679.8528,-115.4558 563.8528,-115.4558 563.8528,-79.4558 679.8528,-79.4558 679.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"581.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"585.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">tomato sauce</text>\n",
"<text text-anchor=\"start\" x=\"571.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 23&#45;&gt;16 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>23&#45;&gt;16</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M500.6506,-170.8215C525.8624,-155.5603 558.3026,-135.9238 583.2761,-120.8069\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"585.3695,-123.6311 592.1118,-115.4585 581.7446,-117.6428 585.3695,-123.6311\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 19 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node10\" class=\"node\">\n",
"<title>19</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"518.8528,-36 402.8528,-36 402.8528,0 518.8528,0 518.8528,-36\"/>\n",
"<text text-anchor=\"start\" x=\"426.8528\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"430.8528\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mushroom</text>\n",
"<text text-anchor=\"start\" x=\"410.8528\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 20&#45;&gt;19 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge9\" class=\"edge\">\n",
"<title>20&#45;&gt;19</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M460.8528,-71.8782C460.8528,-63.7122 460.8528,-54.6289 460.8528,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"464.3529,-46.2287 460.8528,-36.2288 457.3529,-46.2288 464.3529,-46.2287\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 17 -->\n",
"<g id=\"node13\" class=\"node\">\n",
"<title>17</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"714.8528,-212.9117 598.8528,-212.9117 598.8528,-176.9117 714.8528,-176.9117 714.8528,-212.9117\"/>\n",
"<text text-anchor=\"start\" x=\"636.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"640.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cheese</text>\n",
"<text text-anchor=\"start\" x=\"606.8528\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 18&#45;&gt;17 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>18&#45;&gt;17</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M653.9038,-266.7622C654.4517,-253.4123 655.1234,-237.0481 655.6872,-223.3105\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"659.1987,-223.0993 656.1119,-212.9642 652.2046,-222.8122 659.1987,-223.0993\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
2019-11-08 10:47:58 +01:00
"text/plain": [
"<graphviz.dot.Digraph at 0x7ff9bf89b3d0>"
2020-01-05 12:23:45 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Recipe Score**: 0.9423076923076923"
2020-01-05 12:23:45 +01:00
],
"text/plain": [
"<IPython.core.display.Markdown object>"
2020-01-04 13:49:14 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2020-01-05 12:23:45 +01:00
"text/markdown": [
"**Ingredients**:\n",
" * pasta sauce\n",
" * mushroom\n",
" * spaghetti\n",
" * tomato sauce\n",
2020-01-05 12:23:45 +01:00
" * cheese\n",
" * onion\n",
2020-01-05 12:23:45 +01:00
"\n",
"\n",
"**Instructions**:\n",
"\n",
"| Step | Instruction |\n",
"| ----:|:----------- |\n",
"| 1 | slice mushroom and mix it with spaghetti and tomato sauce. Then boil it. |\n",
"| 2 | cut onion, simmer pasta sauce, grate cheese and mix it together with the results of step 1. |\n"
2020-01-05 12:23:45 +01:00
],
2020-01-04 13:49:14 +01:00
"text/plain": [
2020-01-05 12:23:45 +01:00
"<IPython.core.display.Markdown object>"
2019-11-08 10:47:58 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"848pt\" height=\"434pt\"\n",
" viewBox=\"0.00 0.00 848.00 433.82\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
2020-01-02 18:14:02 +01:00
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429.8234)\">\n",
2019-11-08 10:47:58 +01:00
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-429.8234 844,-429.8234 844,4 -4,4\"/>\n",
"<!-- 96 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"node1\" class=\"node\">\n",
"<title>96</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"487,-425.8234 367,-389.8234 487,-353.8234 607,-389.8234 487,-425.8234\"/>\n",
"<text text-anchor=\"start\" x=\"473.5\" y=\"-393.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"477.5\" y=\"-393.6234\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"435\" y=\"-379.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.9286</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 92 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"node2\" class=\"node\">\n",
"<title>92</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"326\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"313\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"317\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">boil</text>\n",
"<text text-anchor=\"start\" x=\"274\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 96&#45;&gt;92 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"edge1\" class=\"edge\">\n",
"<title>96&#45;&gt;92</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M447.2022,-365.7332C424.5781,-352.0384 396.1332,-334.8203 372.4864,-320.5065\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"374.0479,-317.3604 363.6806,-315.1762 370.423,-323.3488 374.0479,-317.3604\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 87 -->\n",
"<g id=\"node9\" class=\"node\">\n",
"<title>87</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"545,-310.3675 429,-310.3675 429,-274.3675 545,-274.3675 545,-310.3675\"/>\n",
"<text text-anchor=\"start\" x=\"463.5\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"467.5\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">parsley</text>\n",
"<text text-anchor=\"start\" x=\"437\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:0.6667</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 96&#45;&gt;87 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>96&#45;&gt;87</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M487,-353.8113C487,-342.8653 487,-330.9988 487,-320.6395\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"490.5001,-320.4912 487,-310.4912 483.5001,-320.4912 490.5001,-320.4912\"/>\n",
"</g>\n",
"<!-- 94 -->\n",
"<g id=\"node10\" class=\"node\">\n",
"<title>94</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"648\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"632\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"636\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">bake</text>\n",
"<text text-anchor=\"start\" x=\"596\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
"</g>\n",
"<!-- 96&#45;&gt;94 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>96&#45;&gt;94</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M526.7978,-365.7332C549.4219,-352.0384 577.8668,-334.8203 601.5136,-320.5065\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"603.577,-323.3488 610.3194,-315.1762 599.9521,-317.3604 603.577,-323.3488\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 93 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"node3\" class=\"node\">\n",
"<title>93</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"326,-230.9117 206,-194.9117 326,-158.9117 446,-194.9117 326,-230.9117\"/>\n",
"<text text-anchor=\"start\" x=\"312.5\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"316.5\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"274\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.6667</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 92&#45;&gt;93 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"edge2\" class=\"edge\">\n",
"<title>92&#45;&gt;93</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M326,-266.7622C326,-258.8985 326,-249.989 326,-241.1865\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"329.5001,-240.9713 326,-230.9713 322.5001,-240.9714 329.5001,-240.9713\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 84 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"node4\" class=\"node\">\n",
"<title>84</title>\n",
2020-01-05 12:23:45 +01:00
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"116,-115.4558 0,-115.4558 0,-79.4558 116,-79.4558 116,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"29.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"33.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">spaghetti</text>\n",
2020-01-05 12:23:45 +01:00
"<text text-anchor=\"start\" x=\"8\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 93&#45;&gt;84 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"edge3\" class=\"edge\">\n",
"<title>93&#45;&gt;84</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M270.4417,-175.3316C230.0279,-161.0105 174.0324,-141.0063 125,-122.9117 121.5891,-121.6529 118.084,-120.3499 114.5506,-119.0291\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"115.7691,-115.7481 105.1769,-115.5096 113.3085,-122.3014 115.7691,-115.7481\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 89 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node5\" class=\"node\">\n",
"<title>89</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"250,-115.4558 134,-115.4558 134,-79.4558 250,-79.4558 250,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"167\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"171\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">olive oil</text>\n",
"<text text-anchor=\"start\" x=\"142\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 93&#45;&gt;89 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge4\" class=\"edge\">\n",
"<title>93&#45;&gt;89</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M290.7931,-169.3063C270.4381,-154.5025 244.9865,-135.992 225.0148,-121.4669\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"226.9678,-118.5596 216.8218,-115.5083 222.8505,-124.2207 226.9678,-118.5596\"/>\n",
2020-01-04 13:49:14 +01:00
"</g>\n",
"<!-- 88 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node6\" class=\"node\">\n",
"<title>88</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"384,-115.4558 268,-115.4558 268,-79.4558 384,-79.4558 384,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"290.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"294.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">garlic clove</text>\n",
"<text text-anchor=\"start\" x=\"276\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:0.6667</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 93&#45;&gt;88 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge5\" class=\"edge\">\n",
"<title>93&#45;&gt;88</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M326,-158.8996C326,-147.9536 326,-136.0871 326,-125.7278\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"329.5001,-125.5795 326,-115.5795 322.5001,-125.5795 329.5001,-125.5795\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 86 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>86</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"487\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"472.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"476.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">slice</text>\n",
"<text text-anchor=\"start\" x=\"435\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
"</g>\n",
"<!-- 93&#45;&gt;86 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>93&#45;&gt;86</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M365.7978,-170.8215C388.4219,-157.1267 416.8668,-139.9086 440.5136,-125.5948\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"442.577,-128.4371 449.3194,-120.2645 438.9521,-122.4487 442.577,-128.4371\"/>\n",
"</g>\n",
"<!-- 85 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node8\" class=\"node\">\n",
"<title>85</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"545,-36 429,-36 429,0 545,0 545,-36\"/>\n",
"<text text-anchor=\"start\" x=\"468.5\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"472.5\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">onion</text>\n",
"<text text-anchor=\"start\" x=\"437\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 86&#45;&gt;85 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge7\" class=\"edge\">\n",
"<title>86&#45;&gt;85</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M487,-71.8782C487,-63.7122 487,-54.6289 487,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"490.5001,-46.2287 487,-36.2288 483.5001,-46.2288 490.5001,-46.2287\"/>\n",
2020-01-04 13:49:14 +01:00
"</g>\n",
"<!-- 95 -->\n",
"<g id=\"node11\" class=\"node\">\n",
"<title>95</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"648,-230.9117 528,-194.9117 648,-158.9117 768,-194.9117 648,-230.9117\"/>\n",
"<text text-anchor=\"start\" x=\"634.5\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"638.5\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"596\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 94&#45;&gt;95 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>94&#45;&gt;95</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M648,-266.7622C648,-258.8985 648,-249.989 648,-241.1865\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"651.5001,-240.9713 648,-230.9713 644.5001,-240.9714 651.5001,-240.9713\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 90 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node12\" class=\"node\">\n",
"<title>90</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"706,-115.4558 590,-115.4558 590,-79.4558 706,-79.4558 706,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"627.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"631.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cheese</text>\n",
"<text text-anchor=\"start\" x=\"598\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 95&#45;&gt;90 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge11\" class=\"edge\">\n",
"<title>95&#45;&gt;90</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M648,-158.8996C648,-147.9536 648,-136.0871 648,-125.7278\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"651.5001,-125.5795 648,-115.5795 644.5001,-125.5795 651.5001,-125.5795\"/>\n",
"</g>\n",
"<!-- 91 -->\n",
"<g id=\"node13\" class=\"node\">\n",
"<title>91</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"840,-115.4558 724,-115.4558 724,-79.4558 840,-79.4558 840,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"746.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"750.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">pasta sauce</text>\n",
"<text text-anchor=\"start\" x=\"732\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
"</g>\n",
"<!-- 95&#45;&gt;91 -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>95&#45;&gt;91</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M683.2069,-169.3063C703.5619,-154.5025 729.0135,-135.992 748.9852,-121.4669\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"751.1495,-124.2207 757.1782,-115.5083 747.0322,-118.5596 751.1495,-124.2207\"/>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.dot.Digraph at 0x7ff9afdcb310>"
2020-01-05 12:23:45 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Recipe Score**: 0.9175824175824174"
2020-01-05 12:23:45 +01:00
],
"text/plain": [
"<IPython.core.display.Markdown object>"
2020-01-04 13:49:14 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2020-01-05 12:23:45 +01:00
"text/markdown": [
"**Ingredients**:\n",
" * pasta sauce\n",
" * olive oil\n",
" * spaghetti\n",
" * parsley\n",
2020-01-05 12:23:45 +01:00
" * cheese\n",
" * garlic clove\n",
" * onion\n",
2020-01-05 12:23:45 +01:00
"\n",
"\n",
"**Instructions**:\n",
"\n",
"| Step | Instruction |\n",
"| ----:|:----------- |\n",
"| 1 | slice onion and mix it with spaghetti, olive oil and garlic clove. Then boil it. |\n",
"| 2 | Mix cheese and pasta sauce. Then bake it. |\n",
"| 3 | Mix together the results of step 1 and step 2. |\n"
2020-01-05 12:23:45 +01:00
],
2020-01-04 13:49:14 +01:00
"text/plain": [
2020-01-05 12:23:45 +01:00
"<IPython.core.display.Markdown object>"
2019-11-08 10:47:58 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2019-12-01 14:04:07 +01:00
"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=\"795pt\" height=\"347pt\"\n",
" viewBox=\"0.00 0.00 794.85 346.91\" 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 342.9117)\">\n",
2019-12-01 14:04:07 +01:00
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-342.9117 790.8528,-342.9117 790.8528,4 -4,4\"/>\n",
"<!-- 199 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node1\" class=\"node\">\n",
"<title>199</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"352.8528,-338.9117 232.8528,-302.9117 352.8528,-266.9117 472.8528,-302.9117 352.8528,-338.9117\"/>\n",
"<text text-anchor=\"start\" x=\"339.3528\" y=\"-306.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"343.3528\" y=\"-306.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"300.8528\" y=\"-292.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.7500</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 190 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node2\" class=\"node\">\n",
"<title>190</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"84.8528\" cy=\"-205.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"70.3528\" y=\"-209.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"74.3528\" y=\"-209.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">slice</text>\n",
"<text text-anchor=\"start\" x=\"32.8528\" y=\"-195.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 199&#45;&gt;190 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"edge1\" class=\"edge\">\n",
"<title>199&#45;&gt;190</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M298.296,-283.0726C254.8598,-267.2774 193.9937,-245.144 148.3679,-228.5526\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"149.469,-225.2288 138.875,-225.1005 147.0768,-231.8073 149.469,-225.2288\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 197 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node4\" class=\"node\">\n",
"<title>197</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"272.8528\" cy=\"-205.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"258.3528\" y=\"-209.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"262.3528\" y=\"-209.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">heat</text>\n",
"<text text-anchor=\"start\" x=\"220.8528\" y=\"-195.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 199&#45;&gt;197 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"edge3\" class=\"edge\">\n",
"<title>199&#45;&gt;197</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M329.0668,-273.9356C319.786,-262.6298 309.1035,-249.6164 299.5601,-237.9906\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"302.2164,-235.7103 293.1663,-230.2016 296.8059,-240.1517 302.2164,-235.7103\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 194 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"node6\" class=\"node\">\n",
"<title>194</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"491.8528,-223.4558 375.8528,-223.4558 375.8528,-187.4558 491.8528,-187.4558 491.8528,-223.4558\"/>\n",
"<text text-anchor=\"start\" x=\"393.3528\" y=\"-209.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"397.3528\" y=\"-209.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">tomato sauce</text>\n",
"<text text-anchor=\"start\" x=\"383.8528\" y=\"-195.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:0.6667</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 199&#45;&gt;194 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"edge5\" class=\"edge\">\n",
"<title>199&#45;&gt;194</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M376.9362,-273.9356C388.1356,-260.4609 401.3511,-244.5605 412.2274,-231.4746\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"414.9579,-233.6651 418.6582,-223.7374 409.5746,-229.1907 414.9579,-233.6651\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 195 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node7\" class=\"node\">\n",
"<title>195</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"594.8528\" cy=\"-205.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"569.8528\" y=\"-209.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"573.8528\" y=\"-209.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">simmer</text>\n",
"<text text-anchor=\"start\" x=\"542.8528\" y=\"-195.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.6667</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 199&#45;&gt;195 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"edge6\" class=\"edge\">\n",
"<title>199&#45;&gt;195</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M404.1748,-282.2438C442.3234,-266.881 494.4893,-245.8732 534.6153,-229.7141\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"536.0517,-232.9089 544.0203,-225.9266 533.4367,-226.4156 536.0517,-232.9089\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 189 -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>189</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"142.8528,-126 26.8528,-126 26.8528,-90 142.8528,-90 142.8528,-126\"/>\n",
"<text text-anchor=\"start\" x=\"50.8528\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"54.8528\" y=\"-111.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mushroom</text>\n",
"<text text-anchor=\"start\" x=\"34.8528\" y=\"-97.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:0.6667</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 190&#45;&gt;189 -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>190&#45;&gt;189</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M84.8528,-179.8505C84.8528,-166.5006 84.8528,-150.1364 84.8528,-136.3988\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"88.3529,-136.0524 84.8528,-126.0525 81.3529,-136.0525 88.3529,-136.0524\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 193 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node5\" class=\"node\">\n",
"<title>193</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"330.8528,-126 214.8528,-126 214.8528,-90 330.8528,-90 330.8528,-126\"/>\n",
"<text text-anchor=\"start\" x=\"237.3528\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"241.3528\" y=\"-111.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">pasta sauce</text>\n",
"<text text-anchor=\"start\" x=\"222.8528\" y=\"-97.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 197&#45;&gt;193 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge4\" class=\"edge\">\n",
"<title>197&#45;&gt;193</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M272.8528,-179.8505C272.8528,-166.5006 272.8528,-150.1364 272.8528,-136.3988\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"276.3529,-136.0524 272.8528,-126.0525 269.3529,-136.0525 276.3529,-136.0524\"/>\n",
"</g>\n",
"<!-- 196 -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>196</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"594.8528,-144 474.8528,-108 594.8528,-72 714.8528,-108 594.8528,-144\"/>\n",
"<text text-anchor=\"start\" x=\"581.3528\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"585.3528\" y=\"-111.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"542.8528\" y=\"-97.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.6667</text>\n",
"</g>\n",
"<!-- 195&#45;&gt;196 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>195&#45;&gt;196</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M594.8528,-179.8505C594.8528,-171.9868 594.8528,-163.0773 594.8528,-154.2748\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"598.3529,-154.0596 594.8528,-144.0596 591.3529,-154.0597 598.3529,-154.0596\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 188 -->\n",
"<g id=\"node9\" class=\"node\">\n",
"<title>188</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"518.8528,-36 402.8528,-36 402.8528,0 518.8528,0 518.8528,-36\"/>\n",
"<text text-anchor=\"start\" x=\"432.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"436.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">spaghetti</text>\n",
"<text text-anchor=\"start\" x=\"410.8528\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
"</g>\n",
"<!-- 196&#45;&gt;188 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>196&#45;&gt;188</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M557.5263,-82.93C538.3199,-70.0301 515.0366,-54.3921 496.1328,-41.6955\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"498.0388,-38.7595 487.7859,-36.0894 494.1358,-44.5705 498.0388,-38.7595\"/>\n",
"</g>\n",
"<!-- 192 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node10\" class=\"node\">\n",
"<title>192</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"652.8528,-36 536.8528,-36 536.8528,0 652.8528,0 652.8528,-36\"/>\n",
"<text text-anchor=\"start\" x=\"569.8528\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"573.8528\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">olive oil</text>\n",
"<text text-anchor=\"start\" x=\"544.8528\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 196&#45;&gt;192 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge9\" class=\"edge\">\n",
"<title>196&#45;&gt;192</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M594.8528,-71.9121C594.8528,-63.3433 594.8528,-54.3253 594.8528,-46.1692\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"598.3529,-46.0539 594.8528,-36.0539 591.3529,-46.0539 598.3529,-46.0539\"/>\n",
"</g>\n",
"<!-- 191 -->\n",
"<g id=\"node11\" class=\"node\">\n",
"<title>191</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"786.8528,-36 670.8528,-36 670.8528,0 786.8528,0 786.8528,-36\"/>\n",
"<text text-anchor=\"start\" x=\"708.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"712.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cheese</text>\n",
"<text text-anchor=\"start\" x=\"678.8528\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
"</g>\n",
"<!-- 196&#45;&gt;191 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>196&#45;&gt;191</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M632.1793,-82.93C651.3857,-70.0301 674.6691,-54.3921 693.5728,-41.6955\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"695.5698,-44.5705 701.9197,-36.0894 691.6669,-38.7595 695.5698,-44.5705\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
2019-11-08 10:47:58 +01:00
"text/plain": [
"<graphviz.dot.Digraph at 0x7ff9afdcb310>"
2020-01-04 13:49:14 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2020-01-05 12:23:45 +01:00
"text/markdown": [
"**Recipe Score**: 0.856060606060606"
2020-01-05 12:23:45 +01:00
],
2020-01-04 13:49:14 +01:00
"text/plain": [
2020-01-05 12:23:45 +01:00
"<IPython.core.display.Markdown object>"
2019-11-08 10:47:58 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2020-01-05 12:23:45 +01:00
"text/markdown": [
"**Ingredients**:\n",
" * pasta sauce\n",
" * olive oil\n",
" * mushroom\n",
" * spaghetti\n",
" * tomato sauce\n",
" * cheese\n",
2020-01-05 12:23:45 +01:00
"\n",
"\n",
"**Instructions**:\n",
"\n",
"| Step | Instruction |\n",
"| ----:|:----------- |\n",
"| 1 | Mix spaghetti, olive oil and cheese. Then simmer it. |\n",
"| 2 | slice mushroom, heat pasta sauce and mix it with tomato sauce and mix it together with the results of step 1. |\n"
2019-12-01 14:04:07 +01:00
],
2019-11-08 10:47:58 +01:00
"text/plain": [
2020-01-05 12:23:45 +01:00
"<IPython.core.display.Markdown object>"
2019-11-08 10:47:58 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"768pt\" height=\"434pt\"\n",
" viewBox=\"0.00 0.00 767.85 433.82\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
2020-01-05 12:23:45 +01:00
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 429.8234)\">\n",
2019-11-08 10:47:58 +01:00
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-429.8234 763.8528,-429.8234 763.8528,4 -4,4\"/>\n",
"<!-- 178 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"node1\" class=\"node\">\n",
"<title>178</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"517.8528,-425.8234 397.8528,-389.8234 517.8528,-353.8234 637.8528,-389.8234 517.8528,-425.8234\"/>\n",
"<text text-anchor=\"start\" x=\"504.3528\" y=\"-393.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"508.3528\" y=\"-393.6234\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"465.8528\" y=\"-379.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.5000</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 174 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"node2\" class=\"node\">\n",
"<title>174</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"423.8528\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"410.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"414.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">boil</text>\n",
"<text text-anchor=\"start\" x=\"371.8528\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.7500</text>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"<!-- 178&#45;&gt;174 -->\n",
2019-11-08 10:47:58 +01:00
"<g id=\"edge1\" class=\"edge\">\n",
"<title>178&#45;&gt;174</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M490.9162,-361.8964C479.5946,-350.1586 466.3608,-336.4383 454.6545,-324.3016\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"457.0553,-321.7491 447.5939,-316.9814 452.017,-326.6088 457.0553,-321.7491\"/>\n",
2020-01-04 13:49:14 +01:00
"</g>\n",
"<!-- 176 -->\n",
"<g id=\"node10\" class=\"node\">\n",
"<title>176</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"620.8528\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"599.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"603.8528\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">brown</text>\n",
"<text text-anchor=\"start\" x=\"568.8528\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 178&#45;&gt;176 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>178&#45;&gt;176</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M546.8182,-362.4171C559.452,-350.4633 574.3397,-336.377 587.439,-323.9827\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"590.0562,-326.3249 594.9146,-316.9096 585.2452,-321.2402 590.0562,-326.3249\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 175 -->\n",
2020-01-04 13:49:14 +01:00
"<g id=\"node3\" class=\"node\">\n",
"<title>175</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"406.8528,-230.9117 286.8528,-194.9117 406.8528,-158.9117 526.8528,-194.9117 406.8528,-230.9117\"/>\n",
"<text text-anchor=\"start\" x=\"393.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"397.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"354.8528\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.6667</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 174&#45;&gt;175 -->\n",
2020-01-04 13:49:14 +01:00
"<g id=\"edge2\" class=\"edge\">\n",
"<title>174&#45;&gt;175</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M419.3863,-266.7622C417.9125,-258.3134 416.2281,-248.6573 414.5825,-239.2238\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"417.9904,-238.3923 412.824,-229.1425 411.0945,-239.5952 417.9904,-238.3923\"/>\n",
2020-01-04 13:49:14 +01:00
"</g>\n",
"<!-- 172 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>172</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"84.8528\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"67.8528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"71.8528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">wash</text>\n",
"<text text-anchor=\"start\" x=\"32.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 175&#45;&gt;172 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>175&#45;&gt;172</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M347.0417,-176.8094C292.4544,-160.2881 211.7682,-135.8678 154.3399,-118.4867\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"155.2013,-115.0906 144.6161,-115.5437 153.1734,-121.7905 155.2013,-115.0906\"/>\n",
"</g>\n",
"<!-- 166 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>166</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"303.8528,-115.4558 187.8528,-115.4558 187.8528,-79.4558 303.8528,-79.4558 303.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"217.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"221.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">spaghetti</text>\n",
"<text text-anchor=\"start\" x=\"195.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 175&#45;&gt;166 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>175&#45;&gt;166</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M367.0551,-170.8215C341.8432,-155.5603 309.403,-135.9238 284.4295,-120.8069\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"285.9611,-117.6428 275.5938,-115.4585 282.3362,-123.6311 285.9611,-117.6428\"/>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 168 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>168</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"406.8528\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"390.8528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"394.8528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">chop</text>\n",
"<text text-anchor=\"start\" x=\"354.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 175&#45;&gt;168 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>175&#45;&gt;168</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M406.8528,-158.8996C406.8528,-150.5122 406.8528,-141.5843 406.8528,-133.2082\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"410.3529,-132.9756 406.8528,-122.9757 403.3529,-132.9757 410.3529,-132.9756\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 173 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node9\" class=\"node\">\n",
"<title>173</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"625.8528,-115.4558 509.8528,-115.4558 509.8528,-79.4558 625.8528,-79.4558 625.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"527.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"531.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">tomato sauce</text>\n",
"<text text-anchor=\"start\" x=\"517.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 175&#45;&gt;173 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge8\" class=\"edge\">\n",
"<title>175&#45;&gt;173</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M446.6506,-170.8215C471.8624,-155.5603 504.3026,-135.9238 529.2761,-120.8069\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"531.3695,-123.6311 538.1118,-115.4585 527.7446,-117.6428 531.3695,-123.6311\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 171 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>171</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"142.8528,-36 26.8528,-36 26.8528,0 142.8528,0 142.8528,-36\"/>\n",
"<text text-anchor=\"start\" x=\"50.8528\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"54.8528\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mushroom</text>\n",
"<text text-anchor=\"start\" x=\"34.8528\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 172&#45;&gt;171 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>172&#45;&gt;171</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M84.8528,-71.8782C84.8528,-63.7122 84.8528,-54.6289 84.8528,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"88.3529,-46.2287 84.8528,-36.2288 81.3529,-46.2288 88.3529,-46.2287\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 167 -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>167</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"464.8528,-36 348.8528,-36 348.8528,0 464.8528,0 464.8528,-36\"/>\n",
"<text text-anchor=\"start\" x=\"383.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"387.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">parsley</text>\n",
"<text text-anchor=\"start\" x=\"356.8528\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 168&#45;&gt;167 -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>168&#45;&gt;167</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M406.8528,-71.8782C406.8528,-63.7122 406.8528,-54.6289 406.8528,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"410.3529,-46.2287 406.8528,-36.2288 403.3529,-46.2288 410.3529,-46.2287\"/>\n",
"</g>\n",
"<!-- 170 -->\n",
"<g id=\"node11\" class=\"node\">\n",
"<title>170</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"665.8528\" cy=\"-194.9117\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"654.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"658.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cut</text>\n",
"<text text-anchor=\"start\" x=\"613.8528\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
"</g>\n",
"<!-- 176&#45;&gt;170 -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>176&#45;&gt;170</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M632.5586,-267.0166C637.871,-255.5114 644.2357,-241.7276 649.9707,-229.3074\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"653.1911,-230.6819 654.2057,-220.1357 646.8359,-227.7473 653.1911,-230.6819\"/>\n",
"</g>\n",
"<!-- 169 -->\n",
"<g id=\"node12\" class=\"node\">\n",
"<title>169</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"759.8528,-115.4558 643.8528,-115.4558 643.8528,-79.4558 759.8528,-79.4558 759.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"681.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"685.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cheese</text>\n",
"<text text-anchor=\"start\" x=\"651.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
"</g>\n",
"<!-- 170&#45;&gt;169 -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>170&#45;&gt;169</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M675.2174,-169.5607C680.2467,-155.9459 686.4547,-139.1402 691.6118,-125.1793\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"694.9674,-126.196 695.1494,-115.6027 688.4011,-123.7703 694.9674,-126.196\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.dot.Digraph at 0x7ff9e5a99a10>"
2020-01-04 13:49:14 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2020-01-05 12:23:45 +01:00
"text/markdown": [
"**Recipe Score**: 0.8263888888888888"
2020-01-05 12:23:45 +01:00
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Ingredients**:\n",
" * mushroom\n",
" * spaghetti\n",
" * tomato sauce\n",
" * parsley\n",
" * cheese\n",
2020-01-05 12:23:45 +01:00
"\n",
"\n",
"**Instructions**:\n",
"\n",
"| Step | Instruction |\n",
"| ----:|:----------- |\n",
"| 1 | wash mushroom, chop parsley and mix it with spaghetti and tomato sauce. Then boil it. |\n",
"| 2 | cut and brown cheese |\n",
"| 3 | Mix together the results of step 1 and step 2. |\n"
2020-01-05 12:23:45 +01:00
],
2020-01-04 13:49:14 +01:00
"text/plain": [
2020-01-05 12:23:45 +01:00
"<IPython.core.display.Markdown object>"
2019-12-01 14:04:07 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"541pt\" height=\"347pt\"\n",
" viewBox=\"0.00 0.00 540.85 346.91\" 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 342.9117)\">\n",
2019-12-01 14:04:07 +01:00
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-342.9117 536.8528,-342.9117 536.8528,4 -4,4\"/>\n",
"<!-- 37 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node1\" class=\"node\">\n",
"<title>37</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"325,-338.9117 205,-302.9117 325,-266.9117 445,-302.9117 325,-338.9117\"/>\n",
"<text text-anchor=\"start\" x=\"311.5\" y=\"-306.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"315.5\" y=\"-306.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"273\" y=\"-292.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.6667</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 33 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node2\" class=\"node\">\n",
"<title>33</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"231\" cy=\"-205.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"218\" y=\"-209.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"222\" y=\"-209.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">boil</text>\n",
"<text text-anchor=\"start\" x=\"179\" y=\"-195.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 37&#45;&gt;33 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"edge1\" class=\"edge\">\n",
"<title>37&#45;&gt;33</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M298.0634,-274.9848C286.7417,-263.2469 273.508,-249.5266 261.8017,-237.39\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"264.2025,-234.8375 254.741,-230.0697 259.1642,-239.6971 264.2025,-234.8375\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 35 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>35</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"428\" cy=\"-205.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"413.5\" y=\"-209.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"417.5\" y=\"-209.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">heat</text>\n",
"<text text-anchor=\"start\" x=\"376\" y=\"-195.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 37&#45;&gt;35 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>37&#45;&gt;35</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M353.9653,-275.5055C366.5992,-263.5516 381.4869,-249.4653 394.5862,-237.0711\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"397.2034,-239.4132 402.0617,-229.9979 392.3923,-234.3285 397.2034,-239.4132\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 34 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node3\" class=\"node\">\n",
"<title>34</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"214,-144 94,-108 214,-72 334,-108 214,-144\"/>\n",
"<text text-anchor=\"start\" x=\"200.5\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"204.5\" y=\"-111.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"162\" y=\"-97.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.3333</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 33&#45;&gt;34 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge2\" class=\"edge\">\n",
"<title>33&#45;&gt;34</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M226.5335,-179.8505C225.0597,-171.4017 223.3753,-161.7457 221.7297,-152.3122\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"225.1376,-151.4806 219.9712,-142.2308 218.2417,-152.6835 225.1376,-151.4806\"/>\n",
"</g>\n",
"<!-- 29 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>29</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"116,-36 0,-36 0,0 116,0 116,-36\"/>\n",
"<text text-anchor=\"start\" x=\"33\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"37\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">olive oil</text>\n",
"<text text-anchor=\"start\" x=\"8\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
"</g>\n",
"<!-- 34&#45;&gt;29 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>34&#45;&gt;29</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M172.6044,-84.1179C149.6545,-70.8776 121.2369,-54.4828 98.4412,-41.3315\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"100.0973,-38.2462 89.6864,-36.2806 96.5992,-44.3095 100.0973,-38.2462\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 28 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"node5\" class=\"node\">\n",
"<title>28</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"250,-36 134,-36 134,0 250,0 250,-36\"/>\n",
"<text text-anchor=\"start\" x=\"163.5\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"167.5\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">spaghetti</text>\n",
"<text text-anchor=\"start\" x=\"142\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 34&#45;&gt;28 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"edge4\" class=\"edge\">\n",
"<title>34&#45;&gt;28</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M205.7454,-74.2313C203.4669,-64.9102 201.0206,-54.9023 198.8324,-45.9507\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"202.1823,-44.9148 196.4078,-36.032 195.3825,-46.5771 202.1823,-44.9148\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 30 -->\n",
2020-01-04 13:49:14 +01:00
"<g id=\"node6\" class=\"node\">\n",
"<title>30</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"384,-36 268,-36 268,0 384,0 384,-36\"/>\n",
"<text text-anchor=\"start\" x=\"289\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"293\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">ground beef</text>\n",
"<text text-anchor=\"start\" x=\"276\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 34&#45;&gt;30 -->\n",
2020-01-04 13:49:14 +01:00
"<g id=\"edge5\" class=\"edge\">\n",
"<title>34&#45;&gt;30</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M246.6961,-81.7263C262.059,-69.3811 280.27,-54.7474 295.364,-42.6183\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"297.7882,-45.1602 303.3909,-36.168 293.4035,-39.7036 297.7882,-45.1602\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 32 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node8\" class=\"node\">\n",
"<title>32</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"448\" cy=\"-108\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"433.5\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"437.5\" y=\"-111.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">beat</text>\n",
"<text text-anchor=\"start\" x=\"396\" y=\"-97.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 35&#45;&gt;32 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge7\" class=\"edge\">\n",
"<title>35&#45;&gt;32</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M433.2548,-179.8505C435.5514,-168.6595 438.2827,-155.3503 440.7668,-143.2458\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"444.1985,-143.9339 442.7803,-133.4344 437.3414,-142.5266 444.1985,-143.9339\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 31 -->\n",
"<g id=\"node9\" class=\"node\">\n",
"<title>31</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"518,-36 402,-36 402,0 518,0 518,-36\"/>\n",
"<text text-anchor=\"start\" x=\"439.5\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"443.5\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cheese</text>\n",
"<text text-anchor=\"start\" x=\"410\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 32&#45;&gt;31 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>32&#45;&gt;31</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M451.4066,-82.4503C452.9133,-71.1504 454.6901,-57.8243 456.2359,-46.231\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"459.7237,-46.5539 457.5761,-36.179 452.7851,-45.6287 459.7237,-46.5539\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.dot.Digraph at 0x7ff9bf177450>"
2020-01-04 13:49:14 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2020-01-05 12:23:45 +01:00
"text/markdown": [
"**Recipe Score**: 0.7777777777777778"
2020-01-05 12:23:45 +01:00
],
2020-01-04 13:49:14 +01:00
"text/plain": [
2020-01-05 12:23:45 +01:00
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Ingredients**:\n",
" * ground beef\n",
" * spaghetti\n",
" * olive oil\n",
2020-01-05 12:23:45 +01:00
" * cheese\n",
"\n",
"\n",
"**Instructions**:\n",
"\n",
"| Step | Instruction |\n",
"| ----:|:----------- |\n",
"| 1 | Mix olive oil, spaghetti and ground beef. Then boil it. |\n",
"| 2 | beat and heat cheese |\n",
"| 3 | Mix together the results of step 1 and step 2. |\n"
2020-01-05 12:23:45 +01:00
],
"text/plain": [
"<IPython.core.display.Markdown object>"
2019-12-01 14:04:07 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"768pt\" height=\"434pt\"\n",
" viewBox=\"0.00 0.00 768.00 433.82\" 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 429.8234)\">\n",
2019-12-01 14:04:07 +01:00
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-429.8234 764,-429.8234 764,4 -4,4\"/>\n",
"<!-- 212 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node1\" class=\"node\">\n",
"<title>212</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"321,-425.8234 201,-389.8234 321,-353.8234 441,-389.8234 321,-425.8234\"/>\n",
"<text text-anchor=\"start\" x=\"307.5\" y=\"-393.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"311.5\" y=\"-393.6234\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"269\" y=\"-379.6234\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.8333</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 210 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node2\" class=\"node\">\n",
"<title>210</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"227\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"211\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"215\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">bake</text>\n",
"<text text-anchor=\"start\" x=\"175\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 212&#45;&gt;210 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"edge1\" class=\"edge\">\n",
"<title>212&#45;&gt;210</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M294.0634,-361.8964C282.7417,-350.1586 269.508,-336.4383 257.8017,-324.3016\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"260.2025,-321.7491 250.741,-316.9814 255.1642,-326.6088 260.2025,-321.7491\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 208 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>208</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"432\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"412.5\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"416.5\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">warm</text>\n",
"<text text-anchor=\"start\" x=\"380\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.0000</text>\n",
2020-01-04 13:49:14 +01:00
"</g>\n",
"<!-- 212&#45;&gt;208 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>212&#45;&gt;208</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M351.6251,-362.9352C365.5942,-350.6705 382.2142,-336.0785 396.7057,-323.3552\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"399.3018,-325.7335 404.5072,-316.5057 394.6833,-320.4733 399.3018,-325.7335\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 211 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node3\" class=\"node\">\n",
"<title>211</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"192,-230.9117 72,-194.9117 192,-158.9117 312,-194.9117 192,-230.9117\"/>\n",
"<text text-anchor=\"start\" x=\"178.5\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"182.5\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"140\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-04 13:49:14 +01:00
"</g>\n",
"<!-- 210&#45;&gt;211 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge2\" class=\"edge\">\n",
"<title>210&#45;&gt;211</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M217.8955,-267.0166C214.6108,-257.8704 210.8089,-247.2842 207.147,-237.0879\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"210.3746,-235.7196 203.7005,-227.4912 203.7865,-238.0856 210.3746,-235.7196\"/>\n",
"</g>\n",
"<!-- 206 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>206</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"116,-115.4558 0,-115.4558 0,-79.4558 116,-79.4558 116,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"22.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"26.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">pasta sauce</text>\n",
"<text text-anchor=\"start\" x=\"8\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
"</g>\n",
"<!-- 211&#45;&gt;206 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>211&#45;&gt;206</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M156.7931,-169.3063C136.4381,-154.5025 110.9865,-135.992 91.0148,-121.4669\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"92.9678,-118.5596 82.8218,-115.5083 88.8505,-124.2207 92.9678,-118.5596\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 207 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node5\" class=\"node\">\n",
"<title>207</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"250,-115.4558 134,-115.4558 134,-79.4558 250,-79.4558 250,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"155\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"159\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">ground beef</text>\n",
"<text text-anchor=\"start\" x=\"142\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 211&#45;&gt;207 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"edge4\" class=\"edge\">\n",
"<title>211&#45;&gt;207</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M192,-158.8996C192,-147.9536 192,-136.0871 192,-125.7278\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"195.5001,-125.5795 192,-115.5795 188.5001,-125.5795 195.5001,-125.5795\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 209 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>209</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"495,-230.9117 375,-194.9117 495,-158.9117 615,-194.9117 495,-230.9117\"/>\n",
"<text text-anchor=\"start\" x=\"481.5\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"485.5\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"443\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.6667</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 208&#45;&gt;209 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>208&#45;&gt;209</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M448.2241,-267.2702C454.848,-257.0235 462.6611,-244.9374 469.9852,-233.6076\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"472.9733,-235.4322 475.4629,-225.134 467.0946,-231.6319 472.9733,-235.4322\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 205 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node8\" class=\"node\">\n",
"<title>205</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"353\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"341.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"345.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cut</text>\n",
"<text text-anchor=\"start\" x=\"301\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 209&#45;&gt;205 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge7\" class=\"edge\">\n",
"<title>209&#45;&gt;205</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M458.4315,-169.8144C439.1614,-156.5892 415.4266,-140.2997 395.359,-126.5272\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"397.2324,-123.568 387.0069,-120.7951 393.2714,-129.3395 397.2324,-123.568\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 203 -->\n",
"<g id=\"node10\" class=\"node\">\n",
"<title>203</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"541\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"529.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"533.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cut</text>\n",
"<text text-anchor=\"start\" x=\"489\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 209&#45;&gt;203 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>209&#45;&gt;203</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M509.9349,-163.2706C514.675,-153.2281 519.9384,-142.077 524.7654,-131.8505\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"527.9448,-133.3143 529.0482,-122.777 521.6145,-130.3263 527.9448,-133.3143\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 201 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node12\" class=\"node\">\n",
"<title>201</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"760,-115.4558 644,-115.4558 644,-79.4558 760,-79.4558 760,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"673.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"677.5\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">spaghetti</text>\n",
"<text text-anchor=\"start\" x=\"652\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 209&#45;&gt;201 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge11\" class=\"edge\">\n",
"<title>209&#45;&gt;201</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M541.7129,-172.9192C575.3926,-157.0627 620.6918,-135.7358 654.5413,-119.7994\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"656.2092,-122.8827 663.7658,-115.4565 653.2275,-116.5495 656.2092,-122.8827\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 204 -->\n",
"<g id=\"node9\" class=\"node\">\n",
"<title>204</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"411,-36 295,-36 295,0 411,0 411,-36\"/>\n",
"<text text-anchor=\"start\" x=\"319\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"323\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mushroom</text>\n",
"<text text-anchor=\"start\" x=\"303\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 205&#45;&gt;204 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>205&#45;&gt;204</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M353,-71.8782C353,-63.7122 353,-54.6289 353,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"356.5001,-46.2287 353,-36.2288 349.5001,-46.2288 356.5001,-46.2287\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 202 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node11\" class=\"node\">\n",
"<title>202</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"599,-36 483,-36 483,0 599,0 599,-36\"/>\n",
"<text text-anchor=\"start\" x=\"505.5\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"509.5\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">garlic clove</text>\n",
"<text text-anchor=\"start\" x=\"491\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 203&#45;&gt;202 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge10\" class=\"edge\">\n",
"<title>203&#45;&gt;202</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M541,-71.8782C541,-63.7122 541,-54.6289 541,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"544.5001,-46.2287 541,-36.2288 537.5001,-46.2288 544.5001,-46.2287\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.dot.Digraph at 0x7ff9afdcb310>"
2020-01-04 13:49:14 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2020-01-05 12:23:45 +01:00
"text/markdown": [
"**Recipe Score**: 0.65625"
2020-01-05 12:23:45 +01:00
],
2020-01-04 13:49:14 +01:00
"text/plain": [
2020-01-05 12:23:45 +01:00
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Ingredients**:\n",
" * pasta sauce\n",
" * mushroom\n",
" * spaghetti\n",
" * ground beef\n",
" * garlic clove\n",
2020-01-05 12:23:45 +01:00
"\n",
"\n",
"**Instructions**:\n",
"\n",
"| Step | Instruction |\n",
"| ----:|:----------- |\n",
"| 1 | Mix pasta sauce and ground beef. Then bake it. |\n",
"| 2 | cut mushroom, cut garlic clove and mix it with spaghetti. Then warm it. |\n",
"| 3 | Mix together the results of step 1 and step 2. |\n"
2020-01-05 12:23:45 +01:00
],
"text/plain": [
"<IPython.core.display.Markdown object>"
2019-12-01 14:04:07 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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=\"956pt\" height=\"326pt\"\n",
" viewBox=\"0.00 0.00 955.85 325.82\" 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 321.8234)\">\n",
2019-12-01 14:04:07 +01:00
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-321.8234 951.8528,-321.8234 951.8528,4 -4,4\"/>\n",
"<!-- 153 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node1\" class=\"node\">\n",
"<title>153</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"513.8528\" cy=\"-292.3675\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"499.3528\" y=\"-296.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"503.3528\" y=\"-296.1675\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">heat</text>\n",
"<text text-anchor=\"start\" x=\"461.8528\" y=\"-282.1675\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 154 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"node2\" class=\"node\">\n",
"<title>154</title>\n",
"<polygon fill=\"#d5e8d4\" stroke=\"#d5e8d4\" points=\"513.8528,-230.9117 393.8528,-194.9117 513.8528,-158.9117 633.8528,-194.9117 513.8528,-230.9117\"/>\n",
"<text text-anchor=\"start\" x=\"500.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"504.3528\" y=\"-198.7117\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mix</text>\n",
"<text text-anchor=\"start\" x=\"461.8528\" y=\"-184.7117\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 0.8667</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 153&#45;&gt;154 -->\n",
2019-12-01 14:04:07 +01:00
"<g id=\"edge1\" class=\"edge\">\n",
"<title>153&#45;&gt;154</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M513.8528,-266.7622C513.8528,-258.8985 513.8528,-249.989 513.8528,-241.1865\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"517.3529,-240.9713 513.8528,-230.9713 510.3529,-240.9714 517.3529,-240.9713\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 149 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"node3\" class=\"node\">\n",
"<title>149</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"84.8528\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"70.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"74.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">slice</text>\n",
"<text text-anchor=\"start\" x=\"32.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-02 18:14:02 +01:00
"</g>\n",
"<!-- 154&#45;&gt;149 -->\n",
2020-01-02 18:14:02 +01:00
"<g id=\"edge2\" class=\"edge\">\n",
"<title>154&#45;&gt;149</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M441.3924,-180.4881C373.3712,-166.6764 268.8916,-144.7629 178.8528,-122.9117 171.7929,-121.1983 164.4547,-119.343 157.1306,-117.4416\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"157.7404,-113.9831 147.1794,-114.8292 155.9629,-120.7537 157.7404,-113.9831\"/>\n",
2020-01-04 13:49:14 +01:00
"</g>\n",
"<!-- 152 -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>152</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"272.8528\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"258.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"262.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">slice</text>\n",
"<text text-anchor=\"start\" x=\"220.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 154&#45;&gt;152 -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>154&#45;&gt;152</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M462.7429,-174.2438C424.7519,-158.881 372.8016,-137.8732 332.8414,-121.7141\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"334.0581,-118.4308 323.4753,-117.9266 331.4339,-124.9203 334.0581,-118.4308\"/>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 144 -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>144</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"491.8528,-115.4558 375.8528,-115.4558 375.8528,-79.4558 491.8528,-79.4558 491.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"405.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"409.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">spaghetti</text>\n",
"<text text-anchor=\"start\" x=\"383.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2019-12-01 14:04:07 +01:00
"</g>\n",
"<!-- 154&#45;&gt;144 -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>154&#45;&gt;144</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M490.0668,-165.9356C479.0056,-152.4609 465.9532,-136.5605 455.2112,-123.4746\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"457.91,-121.246 448.8599,-115.7374 452.4995,-125.6875 457.91,-121.246\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 146 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node8\" class=\"node\">\n",
"<title>146</title>\n",
"<ellipse fill=\"#dae8fc\" stroke=\"#dae8fc\" cx=\"594.8528\" cy=\"-97.4558\" rx=\"84.7059\" ry=\"25.4118\"/>\n",
"<text text-anchor=\"start\" x=\"580.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"584.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">slice</text>\n",
"<text text-anchor=\"start\" x=\"542.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score: 1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 154&#45;&gt;146 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge7\" class=\"edge\">\n",
"<title>154&#45;&gt;146</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M537.9362,-165.9356C547.3329,-154.6298 558.149,-141.6164 567.8117,-129.9906\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"570.5852,-132.1293 574.2855,-122.2016 565.2018,-127.655 570.5852,-132.1293\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 150 -->\n",
"<g id=\"node10\" class=\"node\">\n",
"<title>150</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"813.8528,-115.4558 697.8528,-115.4558 697.8528,-79.4558 813.8528,-79.4558 813.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"718.8528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"722.8528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">ground beef</text>\n",
"<text text-anchor=\"start\" x=\"705.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 154&#45;&gt;150 -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>154&#45;&gt;150</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M565.1748,-174.2438C605.2501,-158.1051 660.7944,-135.7368 701.5995,-119.3042\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"703.1451,-122.455 711.1137,-115.4728 700.5301,-115.9618 703.1451,-122.455\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 147 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"node11\" class=\"node\">\n",
"<title>147</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"947.8528,-115.4558 831.8528,-115.4558 831.8528,-79.4558 947.8528,-79.4558 947.8528,-115.4558\"/>\n",
"<text text-anchor=\"start\" x=\"854.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"858.3528\" y=\"-101.2558\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">pasta sauce</text>\n",
"<text text-anchor=\"start\" x=\"839.8528\" y=\"-87.2558\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 154&#45;&gt;147 -->\n",
2020-01-05 12:23:45 +01:00
"<g id=\"edge10\" class=\"edge\">\n",
"<title>154&#45;&gt;147</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M587.0069,-180.7553C650.0847,-167.8645 743.2951,-147.1743 822.8528,-122.9117 826.8697,-121.6866 830.992,-120.3422 835.1221,-118.9311\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"836.4613,-122.1701 844.727,-115.5423 834.1322,-115.5689 836.4613,-122.1701\"/>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 148 -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>148</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"142.8528,-36 26.8528,-36 26.8528,0 142.8528,0 142.8528,-36\"/>\n",
"<text text-anchor=\"start\" x=\"64.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"68.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">cheese</text>\n",
"<text text-anchor=\"start\" x=\"34.8528\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
2020-01-05 12:23:45 +01:00
"</g>\n",
"<!-- 149&#45;&gt;148 -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>149&#45;&gt;148</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M84.8528,-71.8782C84.8528,-63.7122 84.8528,-54.6289 84.8528,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"88.3529,-46.2287 84.8528,-36.2288 81.3529,-46.2288 88.3529,-46.2287\"/>\n",
"</g>\n",
"<!-- 151 -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>151</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"330.8528,-36 214.8528,-36 214.8528,0 330.8528,0 330.8528,-36\"/>\n",
"<text text-anchor=\"start\" x=\"238.8528\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"242.8528\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">mushroom</text>\n",
"<text text-anchor=\"start\" x=\"222.8528\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
"</g>\n",
"<!-- 152&#45;&gt;151 -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>152&#45;&gt;151</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M272.8528,-71.8782C272.8528,-63.7122 272.8528,-54.6289 272.8528,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"276.3529,-46.2287 272.8528,-36.2288 269.3529,-46.2288 276.3529,-46.2287\"/>\n",
"</g>\n",
"<!-- 145 -->\n",
"<g id=\"node9\" class=\"node\">\n",
"<title>145</title>\n",
"<polygon fill=\"#ffe6cc\" stroke=\"#ffe6cc\" points=\"652.8528,-36 536.8528,-36 536.8528,0 652.8528,0 652.8528,-36\"/>\n",
"<text text-anchor=\"start\" x=\"576.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\"> </text>\n",
"<text text-anchor=\"start\" x=\"580.3528\" y=\"-21.8\" font-family=\"Times,serif\" font-weight=\"bold\" font-size=\"14.00\" fill=\"#000000\">onion</text>\n",
"<text text-anchor=\"start\" x=\"544.8528\" y=\"-7.8\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">node score:1.0000</text>\n",
"</g>\n",
"<!-- 146&#45;&gt;145 -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>146&#45;&gt;145</title>\n",
"<path fill=\"none\" stroke=\"#000000\" d=\"M594.8528,-71.8782C594.8528,-63.7122 594.8528,-54.6289 594.8528,-46.2824\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" points=\"598.3529,-46.2287 594.8528,-36.2288 591.3529,-46.2288 598.3529,-46.2287\"/>\n",
2019-11-08 10:47:58 +01:00
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.dot.Digraph at 0x7ff9afdcb310>"
2020-01-05 12:23:45 +01:00
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Recipe Score**: 0.49393939393939396"
2020-01-05 12:23:45 +01:00
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Ingredients**:\n",
" * pasta sauce\n",
" * mushroom\n",
" * spaghetti\n",
" * ground beef\n",
2020-01-05 12:23:45 +01:00
" * cheese\n",
" * onion\n",
2020-01-05 12:23:45 +01:00
"\n",
"\n",
"**Instructions**:\n",
"\n",
"| Step | Instruction |\n",
"| ----:|:----------- |\n",
"| 1 | slice cheese, slice mushroom, slice onion and mix it with spaghetti, ground beef and pasta sauce. Then heat it. |\n"
2020-01-05 12:23:45 +01:00
],
"text/plain": [
"<IPython.core.display.Markdown object>"
2019-11-08 10:47:58 +01:00
]
},
"metadata": {},
2019-12-01 14:04:07 +01:00
"output_type": "display_data"
2019-11-08 10:47:58 +01:00
}
],
"source": [
2020-01-05 12:23:45 +01:00
"p.plot_population()"
2019-11-08 10:47:58 +01:00
]
},
2020-01-05 12:23:45 +01:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
2019-11-08 10:47:58 +01:00
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"file_extension": ".py",
"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",
2019-12-01 14:04:07 +01:00
"version": "3.7.5"
2019-11-08 10:47:58 +01:00
},
"mimetype": "text/x-python",
"name": "python",
"npconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": 3
},
"nbformat": 4,
"nbformat_minor": 4
2019-12-01 14:04:07 +01:00
}