"print(\"Dataset loaded successfully with shape:\", df.shape)"
]
]
},
},
{
{
...
@@ -1162,7 +1161,7 @@
...
@@ -1162,7 +1161,7 @@
"name": "stdout",
"name": "stdout",
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Execution time for Apriori: 11.543023109436035 seconds\n"
"Execution time for Apriori: 11.037009716033936 seconds\n"
]
]
}
}
],
],
...
@@ -1193,7 +1192,7 @@
...
@@ -1193,7 +1192,7 @@
"name": "stdout",
"name": "stdout",
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Execution time for FP Growth: 2.7200090885162354 seconds\n"
"Execution time for FP Growth: 2.707993268966675 seconds\n"
]
]
}
}
],
],
...
@@ -1219,7 +1218,7 @@
...
@@ -1219,7 +1218,7 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"> **As we can notice, `FP Growth` is much faster than `Apriori` ***(about 5 times faster!)***.** \n",
"> **As we can notice, `FP Growth` is much faster than `Apriori`** ***(about 5 times faster!)***. \n",
"> **This is because `FP Growth` requires access the dataset multiple times to find repeated groups, when `Apriori` constructs the tree from the beginning and then don't access dataset again (working only with tree)**"
"> **This is because `FP Growth` requires access the dataset multiple times to find repeated groups, when `Apriori` constructs the tree from the beginning and then don't access dataset again (working only with tree)**"