Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
D
DM-Project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
almohanad.hafez
DM-Project
Commits
0520c617
Commit
0520c617
authored
Nov 12, 2024
by
Almouhannad Hafez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rerun cells
parent
acbe4a86
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
79 deletions
+79
-79
1.data_preprocessing.ipynb
1.data_preprocessing.ipynb
+14
-14
2.1.association_rules_apriori_fpg.ipynb
2.1.association_rules_apriori_fpg.ipynb
+19
-19
2.2.association_rules_eclat.ipynb
2.2.association_rules_eclat.ipynb
+46
-46
No files found.
1.data_preprocessing.ipynb
View file @
0520c617
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
2
,
"execution_count":
1
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
3
,
"execution_count":
2
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
4
,
"execution_count":
3
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
5
,
"execution_count":
4
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -131,7 +131,7 @@
...
@@ -131,7 +131,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
6
,
"execution_count":
5
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
7
,
"execution_count":
6
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -182,7 +182,7 @@
...
@@ -182,7 +182,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
8
,
"execution_count":
7
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -209,7 +209,7 @@
...
@@ -209,7 +209,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
9
,
"execution_count":
8
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -249,7 +249,7 @@
...
@@ -249,7 +249,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
10
,
"execution_count":
9
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -295,7 +295,7 @@
...
@@ -295,7 +295,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
1
,
"execution_count": 1
0
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -369,7 +369,7 @@
...
@@ -369,7 +369,7 @@
"5 3 Cookies"
"5 3 Cookies"
]
]
},
},
"execution_count": 1
1
,
"execution_count": 1
0
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -381,7 +381,7 @@
...
@@ -381,7 +381,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
2
,
"execution_count": 1
1
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -408,7 +408,7 @@
...
@@ -408,7 +408,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
3
,
"execution_count": 1
2
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -450,7 +450,7 @@
...
@@ -450,7 +450,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
4
,
"execution_count": 1
3
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
...
2.1.association_rules_apriori_fpg.ipynb
View file @
0520c617
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
2
,
"execution_count":
1
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
3
,
"execution_count":
2
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
4
,
"execution_count":
3
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
5
,
"execution_count":
4
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
6
,
"execution_count":
5
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -201,7 +201,7 @@
...
@@ -201,7 +201,7 @@
"8 0.200000 (Pastry, Medialuna)"
"8 0.200000 (Pastry, Medialuna)"
]
]
},
},
"execution_count":
6
,
"execution_count":
5
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -225,7 +225,7 @@
...
@@ -225,7 +225,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
7
,
"execution_count":
6
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -354,7 +354,7 @@
...
@@ -354,7 +354,7 @@
"4 0.60 1.500000 0.066667 1.500000 0.500000 "
"4 0.60 1.500000 0.066667 1.500000 0.500000 "
]
]
},
},
"execution_count":
7
,
"execution_count":
6
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -386,7 +386,7 @@
...
@@ -386,7 +386,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
8
,
"execution_count":
7
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -413,7 +413,7 @@
...
@@ -413,7 +413,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
9
,
"execution_count":
8
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -429,7 +429,7 @@
...
@@ -429,7 +429,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
10
,
"execution_count":
9
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -527,7 +527,7 @@
...
@@ -527,7 +527,7 @@
"8 0.200000 (Pastry, Medialuna)"
"8 0.200000 (Pastry, Medialuna)"
]
]
},
},
"execution_count":
10
,
"execution_count":
9
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -551,7 +551,7 @@
...
@@ -551,7 +551,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
1
,
"execution_count": 1
0
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -680,7 +680,7 @@
...
@@ -680,7 +680,7 @@
"4 0.60 1.500000 0.066667 1.500000 0.500000 "
"4 0.60 1.500000 0.066667 1.500000 0.500000 "
]
]
},
},
"execution_count": 1
1
,
"execution_count": 1
0
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -712,7 +712,7 @@
...
@@ -712,7 +712,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
2
,
"execution_count": 1
1
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -739,14 +739,14 @@
...
@@ -739,14 +739,14 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
3
,
"execution_count": 1
2
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
"name": "stdout",
"name": "stdout",
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Execution time for Apriori: 1
1.745002031326294
seconds\n"
"Execution time for Apriori: 1
0.434999465942383
seconds\n"
]
]
}
}
],
],
...
@@ -776,14 +776,14 @@
...
@@ -776,14 +776,14 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
4
,
"execution_count": 1
3
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
"name": "stdout",
"name": "stdout",
"output_type": "stream",
"output_type": "stream",
"text": [
"text": [
"Execution time for FP Growth: 2.
662003278732
3 seconds\n"
"Execution time for FP Growth: 2.
47198677062988
3 seconds\n"
]
]
}
}
],
],
...
...
2.2.association_rules_eclat.ipynb
View file @
0520c617
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
2
,
"execution_count":
1
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
3
,
"execution_count":
2
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
4
,
"execution_count":
3
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
5
,
"execution_count":
4
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -136,13 +136,13 @@
...
@@ -136,13 +136,13 @@
" </tr>\n",
" </tr>\n",
" <tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <th>2</th>\n",
" <td>[
Bread
]</td>\n",
" <td>[
Muffin
]</td>\n",
" <td>0.
466667
</td>\n",
" <td>0.
200000
</td>\n",
" </tr>\n",
" </tr>\n",
" <tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <th>3</th>\n",
" <td>[
Muffin
]</td>\n",
" <td>[
Pastry
]</td>\n",
" <td>0.
2
00000</td>\n",
" <td>0.
4
00000</td>\n",
" </tr>\n",
" </tr>\n",
" <tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <th>4</th>\n",
...
@@ -151,8 +151,8 @@
...
@@ -151,8 +151,8 @@
" </tr>\n",
" </tr>\n",
" <tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <th>5</th>\n",
" <td>[
Pastry
]</td>\n",
" <td>[
Bread
]</td>\n",
" <td>0.4
00000
</td>\n",
" <td>0.4
66667
</td>\n",
" </tr>\n",
" </tr>\n",
" <tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <th>6</th>\n",
...
@@ -166,7 +166,7 @@
...
@@ -166,7 +166,7 @@
" </tr>\n",
" </tr>\n",
" <tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <th>8</th>\n",
" <td>[
Bread, Pastry
]</td>\n",
" <td>[
Pastry, Bread
]</td>\n",
" <td>0.200000</td>\n",
" <td>0.200000</td>\n",
" </tr>\n",
" </tr>\n",
" </tbody>\n",
" </tbody>\n",
...
@@ -177,16 +177,16 @@
...
@@ -177,16 +177,16 @@
" itemsets support\n",
" itemsets support\n",
"0 [Coffee] 0.266667\n",
"0 [Coffee] 0.266667\n",
"1 [Medialuna] 0.333333\n",
"1 [Medialuna] 0.333333\n",
"2
[Bread] 0.466667
\n",
"2
[Muffin] 0.200000
\n",
"3 [
Muffin] 0.2
00000\n",
"3 [
Pastry] 0.4
00000\n",
"4 [Scandinavian] 0.200000\n",
"4 [Scandinavian] 0.200000\n",
"5
[Pastry] 0.400000
\n",
"5
[Bread] 0.466667
\n",
"6 [Coffee, Pastry] 0.200000\n",
"6 [Coffee, Pastry] 0.200000\n",
"7 [Medialuna, Pastry] 0.200000\n",
"7 [Medialuna, Pastry] 0.200000\n",
"8 [
Bread, Pastry
] 0.200000"
"8 [
Pastry, Bread
] 0.200000"
]
]
},
},
"execution_count":
5
,
"execution_count":
4
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -211,7 +211,7 @@
...
@@ -211,7 +211,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
6
,
"execution_count":
5
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -257,55 +257,55 @@
...
@@ -257,55 +257,55 @@
" <tbody>\n",
" <tbody>\n",
" <tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <th>0</th>\n",
" <td>(Coffee)</td>\n",
" <td>(Pastry)</td>\n",
" <td>(Pastry)</td>\n",
" <td>
0.266667
</td>\n",
" <td>
(Coffee)
</td>\n",
" <td>0.400000</td>\n",
" <td>0.400000</td>\n",
" <td>0.266667</td>\n",
" <td>0.2</td>\n",
" <td>0.2</td>\n",
" <td>0.
75
</td>\n",
" <td>0.
50
</td>\n",
" <td>1.875000</td>\n",
" <td>1.875000</td>\n",
" <td>0.093333</td>\n",
" <td>0.093333</td>\n",
" <td>
2.400000
</td>\n",
" <td>
1.466667
</td>\n",
" <td>0.
636364
</td>\n",
" <td>0.
777778
</td>\n",
" </tr>\n",
" </tr>\n",
" <tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <th>1</th>\n",
" <td>(Pastry)</td>\n",
" <td>(Coffee)</td>\n",
" <td>(Coffee)</td>\n",
" <td>
0.400000
</td>\n",
" <td>
(Pastry)
</td>\n",
" <td>0.266667</td>\n",
" <td>0.266667</td>\n",
" <td>0.400000</td>\n",
" <td>0.2</td>\n",
" <td>0.2</td>\n",
" <td>0.
50
</td>\n",
" <td>0.
75
</td>\n",
" <td>1.875000</td>\n",
" <td>1.875000</td>\n",
" <td>0.093333</td>\n",
" <td>0.093333</td>\n",
" <td>
1.466667
</td>\n",
" <td>
2.400000
</td>\n",
" <td>0.
777778
</td>\n",
" <td>0.
636364
</td>\n",
" </tr>\n",
" </tr>\n",
" <tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <th>2</th>\n",
" <td>(Medialuna)</td>\n",
" <td>(Pastry)</td>\n",
" <td>(Pastry)</td>\n",
" <td>
0.333333
</td>\n",
" <td>
(Medialuna)
</td>\n",
" <td>0.400000</td>\n",
" <td>0.400000</td>\n",
" <td>0.333333</td>\n",
" <td>0.2</td>\n",
" <td>0.2</td>\n",
" <td>0.
6
0</td>\n",
" <td>0.
5
0</td>\n",
" <td>1.500000</td>\n",
" <td>1.500000</td>\n",
" <td>0.066667</td>\n",
" <td>0.066667</td>\n",
" <td>1.
500000
</td>\n",
" <td>1.
333333
</td>\n",
" <td>0.5
00000
</td>\n",
" <td>0.5
55556
</td>\n",
" </tr>\n",
" </tr>\n",
" <tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <th>3</th>\n",
" <td>(Pastry)</td>\n",
" <td>(Medialuna)</td>\n",
" <td>(Medialuna)</td>\n",
" <td>
0.400000
</td>\n",
" <td>
(Pastry)
</td>\n",
" <td>0.333333</td>\n",
" <td>0.333333</td>\n",
" <td>0.400000</td>\n",
" <td>0.2</td>\n",
" <td>0.2</td>\n",
" <td>0.
5
0</td>\n",
" <td>0.
6
0</td>\n",
" <td>1.500000</td>\n",
" <td>1.500000</td>\n",
" <td>0.066667</td>\n",
" <td>0.066667</td>\n",
" <td>1.
333333
</td>\n",
" <td>1.
500000
</td>\n",
" <td>0.5
55556
</td>\n",
" <td>0.5
00000
</td>\n",
" </tr>\n",
" </tr>\n",
" <tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <th>4</th>\n",
...
@@ -326,21 +326,21 @@
...
@@ -326,21 +326,21 @@
],
],
"text/plain": [
"text/plain": [
" antecedents consequents antecedent support consequent support support \\\n",
" antecedents consequents antecedent support consequent support support \\\n",
"0 (
Coffee) (Pastry) 0.266667 0.400000
0.2 \n",
"0 (
Pastry) (Coffee) 0.400000 0.266667
0.2 \n",
"1 (
Pastry) (Coffee) 0.400000 0.266667
0.2 \n",
"1 (
Coffee) (Pastry) 0.266667 0.400000
0.2 \n",
"2
(Medialuna) (Pastry) 0.333333 0.400000
0.2 \n",
"2
(Pastry) (Medialuna) 0.400000 0.333333
0.2 \n",
"3
(Pastry) (Medialuna) 0.400000 0.333333
0.2 \n",
"3
(Medialuna) (Pastry) 0.333333 0.400000
0.2 \n",
"4 (Pastry) (Bread) 0.400000 0.466667 0.2 \n",
"4 (Pastry) (Bread) 0.400000 0.466667 0.2 \n",
"\n",
"\n",
" confidence lift leverage conviction zhangs_metric \n",
" confidence lift leverage conviction zhangs_metric \n",
"0 0.
75 1.875000 0.093333 2.400000 0.636364
\n",
"0 0.
50 1.875000 0.093333 1.466667 0.777778
\n",
"1 0.
50 1.875000 0.093333 1.466667 0.777778
\n",
"1 0.
75 1.875000 0.093333 2.400000 0.636364
\n",
"2 0.
60 1.500000 0.066667 1.500000 0.500000
\n",
"2 0.
50 1.500000 0.066667 1.333333 0.555556
\n",
"3 0.
50 1.500000 0.066667 1.333333 0.555556
\n",
"3 0.
60 1.500000 0.066667 1.500000 0.500000
\n",
"4 0.50 1.071429 0.013333 1.066667 0.111111 "
"4 0.50 1.071429 0.013333 1.066667 0.111111 "
]
]
},
},
"execution_count":
6
,
"execution_count":
5
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment