{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Regras de Associação\n", "#### Aplicando o algoritmo de regras de associação em uma base de dados do mercado complexa." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# importando a biblioteca pandas do python\n", "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# importando os dados no objeto 'dataframe'\n", "dataframe = pd.read_csv('mercado2.csv', encoding = 'utf-8', sep = ',', header = None)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
012345678910111213141516171819
0shrimpalmondsavocadovegetables mixgreen grapeswhole weat flouryamscottage cheeseenergy drinktomato juicelow fat yogurtgreen teahoneysaladmineral watersalmonantioxydant juicefrozen smoothiespinacholive oil
1burgersmeatballseggsNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
2chutneyNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
3turkeyavocadoNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
4mineral watermilkenergy barwhole wheat ricegreen teaNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
...............................................................
7496butterlight mayofresh breadNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
7497burgersfrozen vegetableseggsfrench friesmagazinesgreen teaNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
7498chickenNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
7499escalopegreen teaNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
7500eggsfrozen smoothieyogurt cakelow fat yogurtNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
\n", "

7501 rows × 20 columns

\n", "
" ], "text/plain": [ " 0 1 2 3 \\\n", "0 shrimp almonds avocado vegetables mix \n", "1 burgers meatballs eggs NaN \n", "2 chutney NaN NaN NaN \n", "3 turkey avocado NaN NaN \n", "4 mineral water milk energy bar whole wheat rice \n", "... ... ... ... ... \n", "7496 butter light mayo fresh bread NaN \n", "7497 burgers frozen vegetables eggs french fries \n", "7498 chicken NaN NaN NaN \n", "7499 escalope green tea NaN NaN \n", "7500 eggs frozen smoothie yogurt cake low fat yogurt \n", "\n", " 4 5 6 7 8 \\\n", "0 green grapes whole weat flour yams cottage cheese energy drink \n", "1 NaN NaN NaN NaN NaN \n", "2 NaN NaN NaN NaN NaN \n", "3 NaN NaN NaN NaN NaN \n", "4 green tea NaN NaN NaN NaN \n", "... ... ... ... ... ... \n", "7496 NaN NaN NaN NaN NaN \n", "7497 magazines green tea NaN NaN NaN \n", "7498 NaN NaN NaN NaN NaN \n", "7499 NaN NaN NaN NaN NaN \n", "7500 NaN NaN NaN NaN NaN \n", "\n", " 9 10 11 12 13 14 \\\n", "0 tomato juice low fat yogurt green tea honey salad mineral water \n", "1 NaN NaN NaN NaN NaN NaN \n", "2 NaN NaN NaN NaN NaN NaN \n", "3 NaN NaN NaN NaN NaN NaN \n", "4 NaN NaN NaN NaN NaN NaN \n", "... ... ... ... ... ... ... \n", "7496 NaN NaN NaN NaN NaN NaN \n", "7497 NaN NaN NaN NaN NaN NaN \n", "7498 NaN NaN NaN NaN NaN NaN \n", "7499 NaN NaN NaN NaN NaN NaN \n", "7500 NaN NaN NaN NaN NaN NaN \n", "\n", " 15 16 17 18 19 \n", "0 salmon antioxydant juice frozen smoothie spinach olive oil \n", "1 NaN NaN NaN NaN NaN \n", "2 NaN NaN NaN NaN NaN \n", "3 NaN NaN NaN NaN NaN \n", "4 NaN NaN NaN NaN NaN \n", "... ... ... ... ... ... \n", "7496 NaN NaN NaN NaN NaN \n", "7497 NaN NaN NaN NaN NaN \n", "7498 NaN NaN NaN NaN NaN \n", "7499 NaN NaN NaN NaN NaN \n", "7500 NaN NaN NaN NaN NaN \n", "\n", "[7501 rows x 20 columns]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# visualizando o objeto 'dataframe'\n", "dataframe" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# criando uma tupla vazia para armazenar os produtos do 'dataframe'\n", "transacoes = []" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(7501, 20)" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# visualizando as dimensões do 'dataframe'\n", "dataframe.shape" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "# iterando os produtos do 'dataframe'\n", "for i in range(0, 7501):\n", " transacoes.append([str(dataframe.values[i,j]) for j in range(0, 20)])" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [], "source": [ "# importando a biblioteca apyori \n", "from apyori import apriori" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "# configurando 'regras'\n", "regras = apriori(transacoes, min_support = 0.003, min_confidence = 0.2, min_lift = 3.0, min_lenght = 2)" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[RelationRecord(items=frozenset({'light cream', 'chicken'}), support=0.004532728969470737, ordered_statistics=[OrderedStatistic(items_base=frozenset({'light cream'}), items_add=frozenset({'chicken'}), confidence=0.29059829059829057, lift=4.84395061728395)]),\n", " RelationRecord(items=frozenset({'mushroom cream sauce', 'escalope'}), support=0.005732568990801226, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mushroom cream sauce'}), items_add=frozenset({'escalope'}), confidence=0.3006993006993007, lift=3.790832696715049)]),\n", " RelationRecord(items=frozenset({'pasta', 'escalope'}), support=0.005865884548726837, ordered_statistics=[OrderedStatistic(items_base=frozenset({'pasta'}), items_add=frozenset({'escalope'}), confidence=0.3728813559322034, lift=4.700811850163794)]),\n", " RelationRecord(items=frozenset({'fromage blanc', 'honey'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'fromage blanc'}), items_add=frozenset({'honey'}), confidence=0.2450980392156863, lift=5.164270764485569)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper'}), support=0.015997866951073192, ordered_statistics=[OrderedStatistic(items_base=frozenset({'herb & pepper'}), items_add=frozenset({'ground beef'}), confidence=0.3234501347708895, lift=3.2919938411349285)]),\n", " RelationRecord(items=frozenset({'ground beef', 'tomato sauce'}), support=0.005332622317024397, ordered_statistics=[OrderedStatistic(items_base=frozenset({'tomato sauce'}), items_add=frozenset({'ground beef'}), confidence=0.3773584905660377, lift=3.840659481324083)]),\n", " RelationRecord(items=frozenset({'light cream', 'olive oil'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'light cream'}), items_add=frozenset({'olive oil'}), confidence=0.20512820512820515, lift=3.1147098515519573)]),\n", " RelationRecord(items=frozenset({'whole wheat pasta', 'olive oil'}), support=0.007998933475536596, ordered_statistics=[OrderedStatistic(items_base=frozenset({'whole wheat pasta'}), items_add=frozenset({'olive oil'}), confidence=0.2714932126696833, lift=4.122410097642296)]),\n", " RelationRecord(items=frozenset({'pasta', 'shrimp'}), support=0.005065991201173177, ordered_statistics=[OrderedStatistic(items_base=frozenset({'pasta'}), items_add=frozenset({'shrimp'}), confidence=0.3220338983050847, lift=4.506672147735896)]),\n", " RelationRecord(items=frozenset({'milk', 'spaghetti', 'avocado'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'avocado'}), items_add=frozenset({'milk'}), confidence=0.41666666666666663, lift=3.215449245541838)]),\n", " RelationRecord(items=frozenset({'milk', 'burgers', 'cake'}), support=0.0037328356219170776, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'cake'}), items_add=frozenset({'burgers'}), confidence=0.27999999999999997, lift=3.211437308868501)]),\n", " RelationRecord(items=frozenset({'turkey', 'chocolate', 'burgers'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'turkey', 'chocolate'}), items_add=frozenset({'burgers'}), confidence=0.27058823529411763, lift=3.1034898363014927)]),\n", " RelationRecord(items=frozenset({'milk', 'turkey', 'burgers'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'turkey'}), items_add=frozenset({'burgers'}), confidence=0.2823529411764706, lift=3.2384241770102533)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'frozen vegetables', 'cake'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'frozen vegetables', 'cake'}), items_add=frozenset({'tomatoes'}), confidence=0.2987012987012987, lift=4.367560314928736), OrderedStatistic(items_base=frozenset({'tomatoes', 'cake'}), items_add=frozenset({'frozen vegetables'}), confidence=0.36507936507936506, lift=3.8300144300144296)]),\n", " RelationRecord(items=frozenset({'ground beef', 'cereals', 'spaghetti'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'cereals'}), items_add=frozenset({'spaghetti'}), confidence=0.6764705882352942, lift=3.8853031258445188), OrderedStatistic(items_base=frozenset({'cereals', 'spaghetti'}), items_add=frozenset({'ground beef'}), confidence=0.45999999999999996, lift=4.681763907734057)]),\n", " RelationRecord(items=frozenset({'ground beef', 'milk', 'chicken'}), support=0.0038661511798426876, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'chicken'}), items_add=frozenset({'milk'}), confidence=0.40845070422535207, lift=3.152046020981858)]),\n", " RelationRecord(items=frozenset({'light cream', 'nan', 'chicken'}), support=0.004532728969470737, ordered_statistics=[OrderedStatistic(items_base=frozenset({'light cream', 'nan'}), items_add=frozenset({'chicken'}), confidence=0.29059829059829057, lift=4.84395061728395)]),\n", " RelationRecord(items=frozenset({'milk', 'olive oil', 'chicken'}), support=0.0035995200639914677, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'chicken'}), items_add=frozenset({'olive oil'}), confidence=0.24324324324324323, lift=3.693456614509246), OrderedStatistic(items_base=frozenset({'olive oil', 'chicken'}), items_add=frozenset({'milk'}), confidence=0.5, lift=3.858539094650206), OrderedStatistic(items_base=frozenset({'milk', 'olive oil'}), items_add=frozenset({'chicken'}), confidence=0.2109375, lift=3.51609375)]),\n", " RelationRecord(items=frozenset({'spaghetti', 'olive oil', 'chicken'}), support=0.0034662045060658577, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'chicken'}), items_add=frozenset({'olive oil'}), confidence=0.20155038759689922, lift=3.0603835169318647)]),\n", " RelationRecord(items=frozenset({'chocolate', 'frozen vegetables', 'shrimp'}), support=0.005332622317024397, ordered_statistics=[OrderedStatistic(items_base=frozenset({'chocolate', 'frozen vegetables'}), items_add=frozenset({'shrimp'}), confidence=0.23255813953488375, lift=3.2545123221103784), OrderedStatistic(items_base=frozenset({'chocolate', 'shrimp'}), items_add=frozenset({'frozen vegetables'}), confidence=0.29629629629629634, lift=3.1084175084175087)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'chocolate'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'herb & pepper', 'chocolate'}), items_add=frozenset({'ground beef'}), confidence=0.4411764705882354, lift=4.4901827759597746)]),\n", " RelationRecord(items=frozenset({'milk', 'soup', 'chocolate'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'soup', 'chocolate'}), items_add=frozenset({'milk'}), confidence=0.3947368421052632, lift=3.0462150747238472)]),\n", " RelationRecord(items=frozenset({'ground beef', 'cooking oil', 'spaghetti'}), support=0.004799360085321957, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'cooking oil'}), items_add=frozenset({'spaghetti'}), confidence=0.5714285714285714, lift=3.2819951870487856), OrderedStatistic(items_base=frozenset({'cooking oil', 'spaghetti'}), items_add=frozenset({'ground beef'}), confidence=0.3025210084033613, lift=3.0789824749438446)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'eggs'}), support=0.0041327822956939075, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'eggs'}), items_add=frozenset({'herb & pepper'}), confidence=0.2066666666666667, lift=4.178454627133872), OrderedStatistic(items_base=frozenset({'herb & pepper', 'eggs'}), items_add=frozenset({'ground beef'}), confidence=0.3297872340425532, lift=3.3564912381997174)]),\n", " RelationRecord(items=frozenset({'spaghetti', 'red wine', 'eggs'}), support=0.0037328356219170776, ordered_statistics=[OrderedStatistic(items_base=frozenset({'red wine', 'eggs'}), items_add=frozenset({'spaghetti'}), confidence=0.5283018867924528, lift=3.0342974370828397)]),\n", " RelationRecord(items=frozenset({'mushroom cream sauce', 'nan', 'escalope'}), support=0.005732568990801226, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mushroom cream sauce', 'nan'}), items_add=frozenset({'escalope'}), confidence=0.3006993006993007, lift=3.790832696715049)]),\n", " RelationRecord(items=frozenset({'pasta', 'nan', 'escalope'}), support=0.005865884548726837, ordered_statistics=[OrderedStatistic(items_base=frozenset({'pasta', 'nan'}), items_add=frozenset({'escalope'}), confidence=0.3728813559322034, lift=4.700811850163794)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'french fries'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'french fries'}), items_add=frozenset({'herb & pepper'}), confidence=0.23076923076923078, lift=4.665768194070081), OrderedStatistic(items_base=frozenset({'herb & pepper', 'french fries'}), items_add=frozenset({'ground beef'}), confidence=0.46153846153846156, lift=4.697421981004071)]),\n", " RelationRecord(items=frozenset({'fromage blanc', 'honey', 'nan'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'fromage blanc', 'nan'}), items_add=frozenset({'honey'}), confidence=0.2450980392156863, lift=5.164270764485569)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'green tea', 'frozen vegetables'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'green tea', 'frozen vegetables'}), items_add=frozenset({'tomatoes'}), confidence=0.2314814814814815, lift=3.38468341635983)]),\n", " RelationRecord(items=frozenset({'ground beef', 'spaghetti', 'frozen vegetables'}), support=0.008665511265164644, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.31100478468899523, lift=3.165328208890303)]),\n", " RelationRecord(items=frozenset({'milk', 'olive oil', 'frozen vegetables'}), support=0.004799360085321957, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'frozen vegetables'}), items_add=frozenset({'olive oil'}), confidence=0.20338983050847456, lift=3.088314005352364), OrderedStatistic(items_base=frozenset({'olive oil', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.4235294117647058, lift=3.2684095860566447)]),\n", " RelationRecord(items=frozenset({'milk', 'soup', 'frozen vegetables'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'soup', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.5, lift=3.858539094650206)]),\n", " RelationRecord(items=frozenset({'milk', 'tomatoes', 'frozen vegetables'}), support=0.0041327822956939075, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'tomatoes'}), items_add=frozenset({'frozen vegetables'}), confidence=0.29523809523809524, lift=3.0973160173160172)]),\n", " RelationRecord(items=frozenset({'mineral water', 'frozen vegetables', 'shrimp'}), support=0.007199040127982935, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'shrimp'}), items_add=frozenset({'frozen vegetables'}), confidence=0.30508474576271183, lift=3.200616332819722)]),\n", " RelationRecord(items=frozenset({'spaghetti', 'olive oil', 'frozen vegetables'}), support=0.005732568990801226, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'frozen vegetables'}), items_add=frozenset({'olive oil'}), confidence=0.20574162679425836, lift=3.1240241752707125)]),\n", " RelationRecord(items=frozenset({'spaghetti', 'frozen vegetables', 'shrimp'}), support=0.005999200106652446, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'frozen vegetables'}), items_add=frozenset({'shrimp'}), confidence=0.21531100478468898, lift=3.0131489680782684)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'frozen vegetables', 'shrimp'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'frozen vegetables', 'shrimp'}), items_add=frozenset({'tomatoes'}), confidence=0.24000000000000002, lift=3.5092397660818717), OrderedStatistic(items_base=frozenset({'tomatoes', 'frozen vegetables'}), items_add=frozenset({'shrimp'}), confidence=0.2479338842975207, lift=3.4696866905143704), OrderedStatistic(items_base=frozenset({'tomatoes', 'shrimp'}), items_add=frozenset({'frozen vegetables'}), confidence=0.35714285714285715, lift=3.7467532467532467)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'spaghetti', 'frozen vegetables'}), support=0.006665777896280496, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'frozen vegetables'}), items_add=frozenset({'tomatoes'}), confidence=0.23923444976076558, lift=3.4980460188216425), OrderedStatistic(items_base=frozenset({'tomatoes', 'spaghetti'}), items_add=frozenset({'frozen vegetables'}), confidence=0.3184713375796179, lift=3.341053850607991)]),\n", " RelationRecord(items=frozenset({'ground beef', 'grated cheese', 'spaghetti'}), support=0.005332622317024397, ordered_statistics=[OrderedStatistic(items_base=frozenset({'grated cheese', 'spaghetti'}), items_add=frozenset({'ground beef'}), confidence=0.3225806451612903, lift=3.283144395325426)]),\n", " RelationRecord(items=frozenset({'ground beef', 'tomatoes', 'green tea'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'green tea'}), items_add=frozenset({'tomatoes'}), confidence=0.2072072072072072, lift=3.0297490472929067)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'milk'}), support=0.0035995200639914677, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'herb & pepper'}), items_add=frozenset({'ground beef'}), confidence=0.3913043478260869, lift=3.9825968969382335)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'mineral water'}), support=0.006665777896280496, ordered_statistics=[OrderedStatistic(items_base=frozenset({'herb & pepper', 'mineral water'}), items_add=frozenset({'ground beef'}), confidence=0.39062500000000006, lift=3.975682666214383)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'nan'}), support=0.015997866951073192, ordered_statistics=[OrderedStatistic(items_base=frozenset({'herb & pepper', 'nan'}), items_add=frozenset({'ground beef'}), confidence=0.3234501347708895, lift=3.2919938411349285)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'spaghetti'}), support=0.006399146780429276, ordered_statistics=[OrderedStatistic(items_base=frozenset({'herb & pepper', 'spaghetti'}), items_add=frozenset({'ground beef'}), confidence=0.3934426229508197, lift=4.004359721511667)]),\n", " RelationRecord(items=frozenset({'ground beef', 'olive oil', 'milk'}), support=0.004932675643247567, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'milk'}), items_add=frozenset({'olive oil'}), confidence=0.22424242424242427, lift=3.40494417862839)]),\n", " RelationRecord(items=frozenset({'ground beef', 'soup', 'milk'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'soup'}), items_add=frozenset({'milk'}), confidence=0.4109589041095891, lift=3.1714019956029094)]),\n", " RelationRecord(items=frozenset({'ground beef', 'tomato sauce', 'nan'}), support=0.005332622317024397, ordered_statistics=[OrderedStatistic(items_base=frozenset({'tomato sauce', 'nan'}), items_add=frozenset({'ground beef'}), confidence=0.3773584905660377, lift=3.840659481324083)]),\n", " RelationRecord(items=frozenset({'ground beef', 'spaghetti', 'pepper'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'pepper'}), items_add=frozenset({'ground beef'}), confidence=0.33783783783783783, lift=3.4384282518610876)]),\n", " RelationRecord(items=frozenset({'ground beef', 'spaghetti', 'shrimp'}), support=0.005999200106652446, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'shrimp'}), items_add=frozenset({'spaghetti'}), confidence=0.5232558139534884, lift=3.005315360233627)]),\n", " RelationRecord(items=frozenset({'ground beef', 'spaghetti', 'tomato sauce'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'tomato sauce'}), items_add=frozenset({'spaghetti'}), confidence=0.5750000000000001, lift=3.3025076569678413), OrderedStatistic(items_base=frozenset({'spaghetti', 'tomato sauce'}), items_add=frozenset({'ground beef'}), confidence=0.4893617021276596, lift=4.980599901844742)]),\n", " RelationRecord(items=frozenset({'light cream', 'olive oil', 'nan'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'light cream', 'nan'}), items_add=frozenset({'olive oil'}), confidence=0.20512820512820515, lift=3.1147098515519573)]),\n", " RelationRecord(items=frozenset({'milk', 'olive oil', 'shrimp'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'olive oil', 'shrimp'}), items_add=frozenset({'milk'}), confidence=0.3934426229508197, lift=3.0362274843149164)]),\n", " RelationRecord(items=frozenset({'milk', 'soup', 'olive oil'}), support=0.0035995200639914677, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'olive oil'}), items_add=frozenset({'soup'}), confidence=0.2109375, lift=4.174781497361478), OrderedStatistic(items_base=frozenset({'milk', 'soup'}), items_add=frozenset({'olive oil'}), confidence=0.23684210526315788, lift=3.5962603878116344), OrderedStatistic(items_base=frozenset({'soup', 'olive oil'}), items_add=frozenset({'milk'}), confidence=0.4029850746268656, lift=3.1098673300165833)]),\n", " RelationRecord(items=frozenset({'milk', 'spaghetti', 'olive oil'}), support=0.007199040127982935, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'spaghetti'}), items_add=frozenset({'olive oil'}), confidence=0.20300751879699247, lift=3.0825089038385434)]),\n", " RelationRecord(items=frozenset({'milk', 'tomatoes', 'soup'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'tomatoes'}), items_add=frozenset({'soup'}), confidence=0.21904761904761905, lift=4.335293378565146), OrderedStatistic(items_base=frozenset({'tomatoes', 'soup'}), items_add=frozenset({'milk'}), confidence=0.44230769230769235, lift=3.4133230452674903)]),\n", " RelationRecord(items=frozenset({'milk', 'whole wheat pasta', 'spaghetti'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'whole wheat pasta', 'spaghetti'}), items_add=frozenset({'milk'}), confidence=0.4545454545454546, lift=3.5077628133183696)]),\n", " RelationRecord(items=frozenset({'mineral water', 'soup', 'olive oil'}), support=0.005199306759098787, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'soup'}), items_add=frozenset({'olive oil'}), confidence=0.22543352601156072, lift=3.4230301186492245)]),\n", " RelationRecord(items=frozenset({'mineral water', 'whole wheat pasta', 'olive oil'}), support=0.0038661511798426876, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'whole wheat pasta'}), items_add=frozenset({'olive oil'}), confidence=0.4027777777777778, lift=6.115862573099416)]),\n", " RelationRecord(items=frozenset({'whole wheat pasta', 'olive oil', 'nan'}), support=0.007998933475536596, ordered_statistics=[OrderedStatistic(items_base=frozenset({'whole wheat pasta', 'nan'}), items_add=frozenset({'olive oil'}), confidence=0.2714932126696833, lift=4.122410097642296)]),\n", " RelationRecord(items=frozenset({'pasta', 'nan', 'shrimp'}), support=0.005065991201173177, ordered_statistics=[OrderedStatistic(items_base=frozenset({'pasta', 'nan'}), items_add=frozenset({'shrimp'}), confidence=0.3220338983050847, lift=4.506672147735896)]),\n", " RelationRecord(items=frozenset({'spaghetti', 'pancakes', 'olive oil'}), support=0.005065991201173177, ordered_statistics=[OrderedStatistic(items_base=frozenset({'pancakes', 'spaghetti'}), items_add=frozenset({'olive oil'}), confidence=0.20105820105820105, lift=3.0529100529100526)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'spaghetti', 'olive oil'}), support=0.004399413411545127, ordered_statistics=[OrderedStatistic(items_base=frozenset({'tomatoes', 'olive oil'}), items_add=frozenset({'spaghetti'}), confidence=0.6111111111111112, lift=3.5099115194827295), OrderedStatistic(items_base=frozenset({'tomatoes', 'spaghetti'}), items_add=frozenset({'olive oil'}), confidence=0.21019108280254778, lift=3.19158565202816)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'spaghetti', 'whole wheat rice'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'whole wheat rice', 'spaghetti'}), items_add=frozenset({'tomatoes'}), confidence=0.2169811320754717, lift=3.1726617382029496)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'spaghetti', 'avocado'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'nan', 'spaghetti', 'avocado'}), items_add=frozenset({'milk'}), confidence=0.41666666666666663, lift=3.215449245541838)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'burgers', 'cake'}), support=0.0037328356219170776, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'nan', 'cake'}), items_add=frozenset({'burgers'}), confidence=0.27999999999999997, lift=3.211437308868501)]),\n", " RelationRecord(items=frozenset({'nan', 'turkey', 'chocolate', 'burgers'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'turkey', 'chocolate', 'nan'}), items_add=frozenset({'burgers'}), confidence=0.27058823529411763, lift=3.1034898363014927)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'turkey', 'burgers'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'turkey', 'nan'}), items_add=frozenset({'burgers'}), confidence=0.2823529411764706, lift=3.2384241770102533)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'frozen vegetables', 'nan', 'cake'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'frozen vegetables', 'nan', 'cake'}), items_add=frozenset({'tomatoes'}), confidence=0.2987012987012987, lift=4.367560314928736), OrderedStatistic(items_base=frozenset({'tomatoes', 'nan', 'cake'}), items_add=frozenset({'frozen vegetables'}), confidence=0.36507936507936506, lift=3.8300144300144296)]),\n", " RelationRecord(items=frozenset({'ground beef', 'cereals', 'spaghetti', 'nan'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'cereals', 'nan'}), items_add=frozenset({'spaghetti'}), confidence=0.6764705882352942, lift=3.8853031258445188), OrderedStatistic(items_base=frozenset({'cereals', 'spaghetti', 'nan'}), items_add=frozenset({'ground beef'}), confidence=0.45999999999999996, lift=4.681763907734057)]),\n", " RelationRecord(items=frozenset({'ground beef', 'nan', 'milk', 'chicken'}), support=0.0038661511798426876, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'nan', 'chicken'}), items_add=frozenset({'milk'}), confidence=0.40845070422535207, lift=3.152046020981858)]),\n", " RelationRecord(items=frozenset({'milk', 'olive oil', 'nan', 'chicken'}), support=0.0035995200639914677, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'nan', 'chicken'}), items_add=frozenset({'olive oil'}), confidence=0.24324324324324323, lift=3.693456614509246), OrderedStatistic(items_base=frozenset({'olive oil', 'nan', 'chicken'}), items_add=frozenset({'milk'}), confidence=0.5, lift=3.858539094650206), OrderedStatistic(items_base=frozenset({'milk', 'olive oil', 'nan'}), items_add=frozenset({'chicken'}), confidence=0.2109375, lift=3.51609375)]),\n", " RelationRecord(items=frozenset({'spaghetti', 'olive oil', 'nan', 'chicken'}), support=0.0034662045060658577, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'nan', 'chicken'}), items_add=frozenset({'olive oil'}), confidence=0.20155038759689922, lift=3.0603835169318647)]),\n", " RelationRecord(items=frozenset({'ground beef', 'mineral water', 'chocolate', 'eggs'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'chocolate', 'eggs'}), items_add=frozenset({'ground beef'}), confidence=0.29702970297029707, lift=3.023093354111531)]),\n", " RelationRecord(items=frozenset({'ground beef', 'mineral water', 'chocolate', 'frozen vegetables'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'chocolate', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.34246575342465757, lift=3.4855300087358976), OrderedStatistic(items_base=frozenset({'ground beef', 'mineral water', 'chocolate'}), items_add=frozenset({'frozen vegetables'}), confidence=0.30487804878048785, lift=3.1984478935698455)]),\n", " RelationRecord(items=frozenset({'ground beef', 'spaghetti', 'chocolate', 'frozen vegetables'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'chocolate', 'frozen vegetables'}), items_add=frozenset({'spaghetti'}), confidence=0.5348837209302326, lift=3.0721001460165964), OrderedStatistic(items_base=frozenset({'spaghetti', 'chocolate', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.3898305084745763, lift=3.967596531978015), OrderedStatistic(items_base=frozenset({'ground beef', 'spaghetti', 'chocolate'}), items_add=frozenset({'frozen vegetables'}), confidence=0.33333333333333337, lift=3.4969696969696975)]),\n", " RelationRecord(items=frozenset({'milk', 'mineral water', 'chocolate', 'frozen vegetables'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'chocolate', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.4109589041095891, lift=3.1714019956029094)]),\n", " RelationRecord(items=frozenset({'milk', 'spaghetti', 'chocolate', 'frozen vegetables'}), support=0.0034662045060658577, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'chocolate', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.44067796610169485, lift=3.4007463207086555), OrderedStatistic(items_base=frozenset({'milk', 'spaghetti', 'chocolate'}), items_add=frozenset({'frozen vegetables'}), confidence=0.3170731707317073, lift=3.3263858093126384)]),\n", " RelationRecord(items=frozenset({'mineral water', 'chocolate', 'frozen vegetables', 'shrimp'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'chocolate', 'frozen vegetables'}), items_add=frozenset({'shrimp'}), confidence=0.32876712328767127, lift=4.600899611531385), OrderedStatistic(items_base=frozenset({'mineral water', 'chocolate', 'shrimp'}), items_add=frozenset({'frozen vegetables'}), confidence=0.4210526315789474, lift=4.417224880382776)]),\n", " RelationRecord(items=frozenset({'chocolate', 'nan', 'frozen vegetables', 'shrimp'}), support=0.005332622317024397, ordered_statistics=[OrderedStatistic(items_base=frozenset({'chocolate', 'nan', 'frozen vegetables'}), items_add=frozenset({'shrimp'}), confidence=0.23255813953488375, lift=3.2545123221103784), OrderedStatistic(items_base=frozenset({'chocolate', 'nan', 'shrimp'}), items_add=frozenset({'frozen vegetables'}), confidence=0.29629629629629634, lift=3.1084175084175087)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'chocolate', 'nan'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'herb & pepper', 'chocolate', 'nan'}), items_add=frozenset({'ground beef'}), confidence=0.4411764705882354, lift=4.4901827759597746)]),\n", " RelationRecord(items=frozenset({'milk', 'soup', 'chocolate', 'nan'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'soup', 'chocolate', 'nan'}), items_add=frozenset({'milk'}), confidence=0.3947368421052632, lift=3.0462150747238472)]),\n", " RelationRecord(items=frozenset({'olive oil', 'spaghetti', 'mineral water', 'chocolate'}), support=0.0038661511798426876, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'mineral water', 'chocolate'}), items_add=frozenset({'olive oil'}), confidence=0.2436974789915966, lift=3.700353825740822)]),\n", " RelationRecord(items=frozenset({'spaghetti', 'mineral water', 'chocolate', 'shrimp'}), support=0.0034662045060658577, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'mineral water', 'chocolate'}), items_add=frozenset({'shrimp'}), confidence=0.21848739495798317, lift=3.0576006522011783)]),\n", " RelationRecord(items=frozenset({'ground beef', 'cooking oil', 'spaghetti', 'nan'}), support=0.004799360085321957, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'cooking oil', 'nan'}), items_add=frozenset({'spaghetti'}), confidence=0.5714285714285714, lift=3.2819951870487856), OrderedStatistic(items_base=frozenset({'cooking oil', 'spaghetti', 'nan'}), items_add=frozenset({'ground beef'}), confidence=0.3025210084033613, lift=3.0789824749438446)]),\n", " RelationRecord(items=frozenset({'milk', 'mineral water', 'frozen vegetables', 'eggs'}), support=0.0037328356219170776, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'frozen vegetables', 'eggs'}), items_add=frozenset({'milk'}), confidence=0.411764705882353, lift=3.177620430888405)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'nan', 'eggs'}), support=0.0041327822956939075, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'nan', 'eggs'}), items_add=frozenset({'herb & pepper'}), confidence=0.2066666666666667, lift=4.178454627133872), OrderedStatistic(items_base=frozenset({'herb & pepper', 'nan', 'eggs'}), items_add=frozenset({'ground beef'}), confidence=0.3297872340425532, lift=3.3564912381997174)]),\n", " RelationRecord(items=frozenset({'spaghetti', 'red wine', 'nan', 'eggs'}), support=0.0037328356219170776, ordered_statistics=[OrderedStatistic(items_base=frozenset({'red wine', 'nan', 'eggs'}), items_add=frozenset({'spaghetti'}), confidence=0.5283018867924528, lift=3.0342974370828397)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'nan', 'french fries'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'nan', 'french fries'}), items_add=frozenset({'herb & pepper'}), confidence=0.23076923076923078, lift=4.665768194070081), OrderedStatistic(items_base=frozenset({'herb & pepper', 'nan', 'french fries'}), items_add=frozenset({'ground beef'}), confidence=0.46153846153846156, lift=4.697421981004071)]),\n", " RelationRecord(items=frozenset({'frozen smoothie', 'mineral water', 'spaghetti', 'milk'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'frozen smoothie', 'mineral water', 'spaghetti'}), items_add=frozenset({'milk'}), confidence=0.4705882352941177, lift=3.631566206729606), OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'spaghetti'}), items_add=frozenset({'frozen smoothie'}), confidence=0.2033898305084746, lift=3.211846565566459)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'nan', 'green tea', 'frozen vegetables'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'nan', 'green tea', 'frozen vegetables'}), items_add=frozenset({'tomatoes'}), confidence=0.2314814814814815, lift=3.38468341635983)]),\n", " RelationRecord(items=frozenset({'ground beef', 'mineral water', 'milk', 'frozen vegetables'}), support=0.0037328356219170776, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'mineral water', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.40579710144927533, lift=3.1315679608755294), OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.3373493975903614, lift=3.4334570302921317), OrderedStatistic(items_base=frozenset({'ground beef', 'mineral water', 'milk'}), items_add=frozenset({'frozen vegetables'}), confidence=0.3373493975903614, lift=3.539101861993428)]),\n", " RelationRecord(items=frozenset({'ground beef', 'spaghetti', 'milk', 'frozen vegetables'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'milk', 'frozen vegetables'}), items_add=frozenset({'spaghetti'}), confidence=0.5348837209302326, lift=3.0721001460165964), OrderedStatistic(items_base=frozenset({'milk', 'spaghetti', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.3709677419354839, lift=3.7756160546242397), OrderedStatistic(items_base=frozenset({'ground beef', 'spaghetti', 'milk'}), items_add=frozenset({'frozen vegetables'}), confidence=0.3150684931506849, lift=3.305354919053549)]),\n", " RelationRecord(items=frozenset({'ground beef', 'mineral water', 'spaghetti', 'frozen vegetables'}), support=0.004399413411545127, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'spaghetti', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.3666666666666667, lift=3.7318407960199007)]),\n", " RelationRecord(items=frozenset({'ground beef', 'spaghetti', 'nan', 'frozen vegetables'}), support=0.008665511265164644, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'nan', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.31100478468899523, lift=3.165328208890303)]),\n", " RelationRecord(items=frozenset({'milk', 'mineral water', 'olive oil', 'frozen vegetables'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'frozen vegetables'}), items_add=frozenset({'olive oil'}), confidence=0.30120481927710846, lift=4.573557387444516), OrderedStatistic(items_base=frozenset({'mineral water', 'olive oil', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.5102040816326531, lift=3.937284790459394), OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'olive oil'}), items_add=frozenset({'frozen vegetables'}), confidence=0.39062500000000006, lift=4.098011363636364)]),\n", " RelationRecord(items=frozenset({'milk', 'mineral water', 'soup', 'frozen vegetables'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'frozen vegetables'}), items_add=frozenset({'soup'}), confidence=0.27710843373493976, lift=5.484407286136631), OrderedStatistic(items_base=frozenset({'milk', 'soup', 'frozen vegetables'}), items_add=frozenset({'mineral water'}), confidence=0.7666666666666666, lift=3.21631245339299), OrderedStatistic(items_base=frozenset({'mineral water', 'soup', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.6052631578947368, lift=4.670863114576565), OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'soup'}), items_add=frozenset({'frozen vegetables'}), confidence=0.35937500000000006, lift=3.7701704545454553)]),\n", " RelationRecord(items=frozenset({'milk', 'mineral water', 'spaghetti', 'frozen vegetables'}), support=0.004532728969470737, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'spaghetti'}), items_add=frozenset({'frozen vegetables'}), confidence=0.28813559322033894, lift=3.0228043143297376)]),\n", " RelationRecord(items=frozenset({'milk', 'olive oil', 'nan', 'frozen vegetables'}), support=0.004799360085321957, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'nan', 'frozen vegetables'}), items_add=frozenset({'olive oil'}), confidence=0.20338983050847456, lift=3.088314005352364), OrderedStatistic(items_base=frozenset({'olive oil', 'nan', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.4235294117647058, lift=3.2684095860566447)]),\n", " RelationRecord(items=frozenset({'milk', 'soup', 'nan', 'frozen vegetables'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'soup', 'nan', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.5, lift=3.858539094650206)]),\n", " RelationRecord(items=frozenset({'milk', 'tomatoes', 'nan', 'frozen vegetables'}), support=0.0041327822956939075, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'tomatoes', 'nan'}), items_add=frozenset({'frozen vegetables'}), confidence=0.29523809523809524, lift=3.0973160173160172)]),\n", " RelationRecord(items=frozenset({'mineral water', 'nan', 'frozen vegetables', 'shrimp'}), support=0.007199040127982935, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'nan', 'shrimp'}), items_add=frozenset({'frozen vegetables'}), confidence=0.3068181818181818, lift=3.218801652892562)]),\n", " RelationRecord(items=frozenset({'mineral water', 'spaghetti', 'frozen vegetables', 'shrimp'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'spaghetti', 'frozen vegetables'}), items_add=frozenset({'shrimp'}), confidence=0.2777777777777778, lift=3.8873341625207294), OrderedStatistic(items_base=frozenset({'mineral water', 'spaghetti', 'shrimp'}), items_add=frozenset({'frozen vegetables'}), confidence=0.39062500000000006, lift=4.098011363636364)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'mineral water', 'spaghetti', 'frozen vegetables'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'spaghetti', 'frozen vegetables'}), items_add=frozenset({'tomatoes'}), confidence=0.2555555555555556, lift=3.7366904916612524), OrderedStatistic(items_base=frozenset({'tomatoes', 'mineral water', 'frozen vegetables'}), items_add=frozenset({'spaghetti'}), confidence=0.5227272727272727, lift=3.0022796881525826), OrderedStatistic(items_base=frozenset({'tomatoes', 'mineral water', 'spaghetti'}), items_add=frozenset({'frozen vegetables'}), confidence=0.32857142857142857, lift=3.447012987012987)]),\n", " RelationRecord(items=frozenset({'spaghetti', 'olive oil', 'nan', 'frozen vegetables'}), support=0.005732568990801226, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'nan', 'frozen vegetables'}), items_add=frozenset({'olive oil'}), confidence=0.20574162679425836, lift=3.1240241752707125)]),\n", " RelationRecord(items=frozenset({'spaghetti', 'nan', 'frozen vegetables', 'shrimp'}), support=0.005999200106652446, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'nan', 'frozen vegetables'}), items_add=frozenset({'shrimp'}), confidence=0.21531100478468898, lift=3.0131489680782684)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'nan', 'frozen vegetables', 'shrimp'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'nan', 'frozen vegetables', 'shrimp'}), items_add=frozenset({'tomatoes'}), confidence=0.24000000000000002, lift=3.5092397660818717), OrderedStatistic(items_base=frozenset({'tomatoes', 'nan', 'frozen vegetables'}), items_add=frozenset({'shrimp'}), confidence=0.2479338842975207, lift=3.4696866905143704), OrderedStatistic(items_base=frozenset({'tomatoes', 'nan', 'shrimp'}), items_add=frozenset({'frozen vegetables'}), confidence=0.35714285714285715, lift=3.7467532467532467)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'spaghetti', 'nan', 'frozen vegetables'}), support=0.006665777896280496, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'nan', 'frozen vegetables'}), items_add=frozenset({'tomatoes'}), confidence=0.23923444976076558, lift=3.4980460188216425), OrderedStatistic(items_base=frozenset({'tomatoes', 'spaghetti', 'nan'}), items_add=frozenset({'frozen vegetables'}), confidence=0.3184713375796179, lift=3.341053850607991)]),\n", " RelationRecord(items=frozenset({'ground beef', 'grated cheese', 'spaghetti', 'nan'}), support=0.005332622317024397, ordered_statistics=[OrderedStatistic(items_base=frozenset({'grated cheese', 'spaghetti', 'nan'}), items_add=frozenset({'ground beef'}), confidence=0.3225806451612903, lift=3.283144395325426)]),\n", " RelationRecord(items=frozenset({'ground beef', 'nan', 'tomatoes', 'green tea'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'nan', 'green tea'}), items_add=frozenset({'tomatoes'}), confidence=0.2072072072072072, lift=3.0297490472929067)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'nan', 'milk'}), support=0.0035995200639914677, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'herb & pepper', 'nan'}), items_add=frozenset({'ground beef'}), confidence=0.3913043478260869, lift=3.9825968969382335)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'mineral water', 'nan'}), support=0.006665777896280496, ordered_statistics=[OrderedStatistic(items_base=frozenset({'herb & pepper', 'mineral water', 'nan'}), items_add=frozenset({'ground beef'}), confidence=0.39062500000000006, lift=3.975682666214383)]),\n", " RelationRecord(items=frozenset({'ground beef', 'herb & pepper', 'spaghetti', 'nan'}), support=0.006399146780429276, ordered_statistics=[OrderedStatistic(items_base=frozenset({'herb & pepper', 'spaghetti', 'nan'}), items_add=frozenset({'ground beef'}), confidence=0.3934426229508197, lift=4.004359721511667)]),\n", " RelationRecord(items=frozenset({'ground beef', 'nan', 'olive oil', 'milk'}), support=0.004932675643247567, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'nan', 'milk'}), items_add=frozenset({'olive oil'}), confidence=0.22424242424242427, lift=3.40494417862839)]),\n", " RelationRecord(items=frozenset({'ground beef', 'nan', 'soup', 'milk'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'soup', 'nan'}), items_add=frozenset({'milk'}), confidence=0.4109589041095891, lift=3.1714019956029094)]),\n", " RelationRecord(items=frozenset({'ground beef', 'spaghetti', 'mineral water', 'olive oil'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'mineral water', 'olive oil'}), items_add=frozenset({'ground beef'}), confidence=0.2987012987012987, lift=3.0401064335935435)]),\n", " RelationRecord(items=frozenset({'ground beef', 'mineral water', 'spaghetti', 'tomatoes'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'mineral water', 'tomatoes'}), items_add=frozenset({'spaghetti'}), confidence=0.5609756097560976, lift=3.221958689724723), OrderedStatistic(items_base=frozenset({'tomatoes', 'mineral water', 'spaghetti'}), items_add=frozenset({'ground beef'}), confidence=0.32857142857142857, lift=3.344117076952898)]),\n", " RelationRecord(items=frozenset({'ground beef', 'spaghetti', 'nan', 'pepper'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'nan', 'pepper'}), items_add=frozenset({'ground beef'}), confidence=0.33783783783783783, lift=3.4384282518610876)]),\n", " RelationRecord(items=frozenset({'ground beef', 'spaghetti', 'nan', 'shrimp'}), support=0.005999200106652446, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'nan', 'shrimp'}), items_add=frozenset({'spaghetti'}), confidence=0.5232558139534884, lift=3.005315360233627)]),\n", " RelationRecord(items=frozenset({'ground beef', 'spaghetti', 'nan', 'tomato sauce'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'tomato sauce', 'nan'}), items_add=frozenset({'spaghetti'}), confidence=0.5750000000000001, lift=3.3025076569678413), OrderedStatistic(items_base=frozenset({'spaghetti', 'nan', 'tomato sauce'}), items_add=frozenset({'ground beef'}), confidence=0.4893617021276596, lift=4.980599901844742)]),\n", " RelationRecord(items=frozenset({'milk', 'spaghetti', 'mineral water', 'olive oil'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'spaghetti'}), items_add=frozenset({'olive oil'}), confidence=0.211864406779661, lift=3.216993755575379)]),\n", " RelationRecord(items=frozenset({'milk', 'mineral water', 'spaghetti', 'tomatoes'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'spaghetti'}), items_add=frozenset({'tomatoes'}), confidence=0.211864406779661, lift=3.0978458387022165)]),\n", " RelationRecord(items=frozenset({'milk', 'olive oil', 'nan', 'shrimp'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'olive oil', 'nan', 'shrimp'}), items_add=frozenset({'milk'}), confidence=0.39999999999999997, lift=3.0868312757201646)]),\n", " RelationRecord(items=frozenset({'milk', 'soup', 'olive oil', 'nan'}), support=0.0035995200639914677, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'olive oil', 'nan'}), items_add=frozenset({'soup'}), confidence=0.2109375, lift=4.174781497361478), OrderedStatistic(items_base=frozenset({'milk', 'soup', 'nan'}), items_add=frozenset({'olive oil'}), confidence=0.23684210526315788, lift=3.5962603878116344), OrderedStatistic(items_base=frozenset({'soup', 'olive oil', 'nan'}), items_add=frozenset({'milk'}), confidence=0.4029850746268656, lift=3.1098673300165833)]),\n", " RelationRecord(items=frozenset({'milk', 'spaghetti', 'olive oil', 'nan'}), support=0.007199040127982935, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'spaghetti', 'nan'}), items_add=frozenset({'olive oil'}), confidence=0.20300751879699247, lift=3.0825089038385434)]),\n", " RelationRecord(items=frozenset({'milk', 'tomatoes', 'soup', 'nan'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'tomatoes', 'nan'}), items_add=frozenset({'soup'}), confidence=0.21904761904761905, lift=4.335293378565146), OrderedStatistic(items_base=frozenset({'tomatoes', 'soup', 'nan'}), items_add=frozenset({'milk'}), confidence=0.44230769230769235, lift=3.4133230452674903)]),\n", " RelationRecord(items=frozenset({'milk', 'whole wheat pasta', 'spaghetti', 'nan'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'whole wheat pasta', 'spaghetti', 'nan'}), items_add=frozenset({'milk'}), confidence=0.4545454545454546, lift=3.5077628133183696)]),\n", " RelationRecord(items=frozenset({'mineral water', 'soup', 'olive oil', 'nan'}), support=0.005199306759098787, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'soup', 'nan'}), items_add=frozenset({'olive oil'}), confidence=0.22543352601156072, lift=3.4230301186492245)]),\n", " RelationRecord(items=frozenset({'mineral water', 'whole wheat pasta', 'olive oil', 'nan'}), support=0.0038661511798426876, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'whole wheat pasta', 'nan'}), items_add=frozenset({'olive oil'}), confidence=0.4027777777777778, lift=6.115862573099416)]),\n", " RelationRecord(items=frozenset({'spaghetti', 'pancakes', 'olive oil', 'nan'}), support=0.005065991201173177, ordered_statistics=[OrderedStatistic(items_base=frozenset({'pancakes', 'spaghetti', 'nan'}), items_add=frozenset({'olive oil'}), confidence=0.20105820105820105, lift=3.0529100529100526)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'spaghetti', 'olive oil', 'nan'}), support=0.004399413411545127, ordered_statistics=[OrderedStatistic(items_base=frozenset({'tomatoes', 'olive oil', 'nan'}), items_add=frozenset({'spaghetti'}), confidence=0.6111111111111112, lift=3.5099115194827295), OrderedStatistic(items_base=frozenset({'tomatoes', 'spaghetti', 'nan'}), items_add=frozenset({'olive oil'}), confidence=0.21019108280254778, lift=3.19158565202816)]),\n", " RelationRecord(items=frozenset({'tomatoes', 'spaghetti', 'nan', 'whole wheat rice'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'whole wheat rice', 'spaghetti', 'nan'}), items_add=frozenset({'tomatoes'}), confidence=0.2169811320754717, lift=3.1726617382029496)]),\n", " RelationRecord(items=frozenset({'ground beef', 'nan', 'eggs', 'mineral water', 'chocolate'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'chocolate', 'nan', 'eggs'}), items_add=frozenset({'ground beef'}), confidence=0.29702970297029707, lift=3.023093354111531)]),\n", " RelationRecord(items=frozenset({'ground beef', 'nan', 'frozen vegetables', 'mineral water', 'chocolate'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'chocolate', 'nan', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.34246575342465757, lift=3.4855300087358976), OrderedStatistic(items_base=frozenset({'ground beef', 'mineral water', 'chocolate', 'nan'}), items_add=frozenset({'frozen vegetables'}), confidence=0.30487804878048785, lift=3.1984478935698455)]),\n", " RelationRecord(items=frozenset({'ground beef', 'nan', 'frozen vegetables', 'chocolate', 'spaghetti'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'chocolate', 'nan', 'frozen vegetables'}), items_add=frozenset({'spaghetti'}), confidence=0.5348837209302326, lift=3.0721001460165964), OrderedStatistic(items_base=frozenset({'spaghetti', 'chocolate', 'nan', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.3898305084745763, lift=3.967596531978015), OrderedStatistic(items_base=frozenset({'ground beef', 'spaghetti', 'chocolate', 'nan'}), items_add=frozenset({'frozen vegetables'}), confidence=0.33333333333333337, lift=3.4969696969696975)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'frozen vegetables', 'mineral water', 'chocolate'}), support=0.003999466737768298, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'chocolate', 'nan', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.4109589041095891, lift=3.1714019956029094)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'frozen vegetables', 'chocolate', 'spaghetti'}), support=0.0034662045060658577, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'chocolate', 'nan', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.44067796610169485, lift=3.4007463207086555), OrderedStatistic(items_base=frozenset({'milk', 'spaghetti', 'chocolate', 'nan'}), items_add=frozenset({'frozen vegetables'}), confidence=0.3170731707317073, lift=3.3263858093126384)]),\n", " RelationRecord(items=frozenset({'nan', 'frozen vegetables', 'shrimp', 'mineral water', 'chocolate'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'chocolate', 'nan', 'frozen vegetables'}), items_add=frozenset({'shrimp'}), confidence=0.32876712328767127, lift=4.600899611531385), OrderedStatistic(items_base=frozenset({'mineral water', 'chocolate', 'nan', 'shrimp'}), items_add=frozenset({'frozen vegetables'}), confidence=0.4210526315789474, lift=4.417224880382776)]),\n", " RelationRecord(items=frozenset({'nan', 'olive oil', 'mineral water', 'chocolate', 'spaghetti'}), support=0.0038661511798426876, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'mineral water', 'chocolate', 'nan'}), items_add=frozenset({'olive oil'}), confidence=0.2436974789915966, lift=3.700353825740822)]),\n", " RelationRecord(items=frozenset({'nan', 'shrimp', 'mineral water', 'chocolate', 'spaghetti'}), support=0.0034662045060658577, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'mineral water', 'chocolate', 'nan'}), items_add=frozenset({'shrimp'}), confidence=0.21848739495798317, lift=3.0576006522011783)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'frozen vegetables', 'eggs', 'mineral water'}), support=0.0037328356219170776, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'nan', 'frozen vegetables', 'eggs'}), items_add=frozenset({'milk'}), confidence=0.411764705882353, lift=3.177620430888405)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'frozen smoothie', 'mineral water', 'spaghetti'}), support=0.003199573390214638, ordered_statistics=[OrderedStatistic(items_base=frozenset({'frozen smoothie', 'mineral water', 'spaghetti', 'nan'}), items_add=frozenset({'milk'}), confidence=0.4705882352941177, lift=3.631566206729606), OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'spaghetti', 'nan'}), items_add=frozenset({'frozen smoothie'}), confidence=0.2033898305084746, lift=3.211846565566459)]),\n", " RelationRecord(items=frozenset({'ground beef', 'milk', 'nan', 'frozen vegetables', 'mineral water'}), support=0.0037328356219170776, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'mineral water', 'nan', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.40579710144927533, lift=3.1315679608755294), OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'nan', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.3373493975903614, lift=3.4334570302921317), OrderedStatistic(items_base=frozenset({'ground beef', 'nan', 'mineral water', 'milk'}), items_add=frozenset({'frozen vegetables'}), confidence=0.3373493975903614, lift=3.539101861993428)]),\n", " RelationRecord(items=frozenset({'ground beef', 'milk', 'nan', 'frozen vegetables', 'spaghetti'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'nan', 'milk', 'frozen vegetables'}), items_add=frozenset({'spaghetti'}), confidence=0.5348837209302326, lift=3.0721001460165964), OrderedStatistic(items_base=frozenset({'milk', 'spaghetti', 'nan', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.3709677419354839, lift=3.7756160546242397), OrderedStatistic(items_base=frozenset({'ground beef', 'nan', 'spaghetti', 'milk'}), items_add=frozenset({'frozen vegetables'}), confidence=0.3150684931506849, lift=3.305354919053549)]),\n", " RelationRecord(items=frozenset({'ground beef', 'nan', 'frozen vegetables', 'mineral water', 'spaghetti'}), support=0.004399413411545127, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'spaghetti', 'nan', 'frozen vegetables'}), items_add=frozenset({'ground beef'}), confidence=0.3666666666666667, lift=3.7318407960199007)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'frozen vegetables', 'olive oil', 'mineral water'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'nan', 'frozen vegetables'}), items_add=frozenset({'olive oil'}), confidence=0.30120481927710846, lift=4.573557387444516), OrderedStatistic(items_base=frozenset({'mineral water', 'olive oil', 'nan', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.5102040816326531, lift=3.937284790459394), OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'olive oil', 'nan'}), items_add=frozenset({'frozen vegetables'}), confidence=0.39062500000000006, lift=4.098011363636364)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'frozen vegetables', 'soup', 'mineral water'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'nan', 'frozen vegetables'}), items_add=frozenset({'soup'}), confidence=0.27710843373493976, lift=5.484407286136631), OrderedStatistic(items_base=frozenset({'milk', 'soup', 'nan', 'frozen vegetables'}), items_add=frozenset({'mineral water'}), confidence=0.7666666666666666, lift=3.21631245339299), OrderedStatistic(items_base=frozenset({'mineral water', 'soup', 'nan', 'frozen vegetables'}), items_add=frozenset({'milk'}), confidence=0.6052631578947368, lift=4.670863114576565), OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'soup', 'nan'}), items_add=frozenset({'frozen vegetables'}), confidence=0.35937500000000006, lift=3.7701704545454553)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'frozen vegetables', 'mineral water', 'spaghetti'}), support=0.004532728969470737, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'spaghetti', 'nan'}), items_add=frozenset({'frozen vegetables'}), confidence=0.28813559322033894, lift=3.0228043143297376)]),\n", " RelationRecord(items=frozenset({'nan', 'frozen vegetables', 'shrimp', 'mineral water', 'spaghetti'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'spaghetti', 'nan', 'frozen vegetables'}), items_add=frozenset({'shrimp'}), confidence=0.2777777777777778, lift=3.8873341625207294), OrderedStatistic(items_base=frozenset({'mineral water', 'spaghetti', 'nan', 'shrimp'}), items_add=frozenset({'frozen vegetables'}), confidence=0.39062500000000006, lift=4.098011363636364)]),\n", " RelationRecord(items=frozenset({'nan', 'frozen vegetables', 'tomatoes', 'mineral water', 'spaghetti'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'mineral water', 'spaghetti', 'nan', 'frozen vegetables'}), items_add=frozenset({'tomatoes'}), confidence=0.2555555555555556, lift=3.7366904916612524), OrderedStatistic(items_base=frozenset({'tomatoes', 'mineral water', 'nan', 'frozen vegetables'}), items_add=frozenset({'spaghetti'}), confidence=0.5227272727272727, lift=3.0022796881525826), OrderedStatistic(items_base=frozenset({'tomatoes', 'mineral water', 'spaghetti', 'nan'}), items_add=frozenset({'frozen vegetables'}), confidence=0.32857142857142857, lift=3.447012987012987)]),\n", " RelationRecord(items=frozenset({'ground beef', 'nan', 'olive oil', 'mineral water', 'spaghetti'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'spaghetti', 'mineral water', 'olive oil', 'nan'}), items_add=frozenset({'ground beef'}), confidence=0.2987012987012987, lift=3.0401064335935435)]),\n", " RelationRecord(items=frozenset({'ground beef', 'nan', 'tomatoes', 'mineral water', 'spaghetti'}), support=0.0030662578322890282, ordered_statistics=[OrderedStatistic(items_base=frozenset({'ground beef', 'mineral water', 'nan', 'tomatoes'}), items_add=frozenset({'spaghetti'}), confidence=0.5609756097560976, lift=3.221958689724723), OrderedStatistic(items_base=frozenset({'tomatoes', 'mineral water', 'spaghetti', 'nan'}), items_add=frozenset({'ground beef'}), confidence=0.32857142857142857, lift=3.344117076952898)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'olive oil', 'mineral water', 'spaghetti'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'spaghetti', 'nan'}), items_add=frozenset({'olive oil'}), confidence=0.211864406779661, lift=3.216993755575379)]),\n", " RelationRecord(items=frozenset({'milk', 'nan', 'tomatoes', 'mineral water', 'spaghetti'}), support=0.003332888948140248, ordered_statistics=[OrderedStatistic(items_base=frozenset({'milk', 'mineral water', 'spaghetti', 'nan'}), items_add=frozenset({'tomatoes'}), confidence=0.211864406779661, lift=3.0978458387022165)])]" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# criando uma lista para armazenar as regras\n", "resultados = list(regras)\n", "resultados" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Observe que foi gerada inúmeras regras de associação entre os produtos. Outra mudança válida está nos parâmetros, pois eles precisam ser adequados a quantidades de dados que serão analisados." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Alguma Dúvida? Entre em Contato Comigo:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- [Me envie um e-mail](mailto:alysson.barbosa@ee.ufcg.edu.br);" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }