-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path5-pattern-discovery.html
688 lines (630 loc) · 160 KB
/
5-pattern-discovery.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Chasing The Trajectory of Terrorism: A Machine Learning Based Approach to Achieve Open Source Intelligence</title>
<meta name="description" content="Chasing The Trajectory of Terrorism: A Machine Learning Based Approach to Achieve Open Source Intelligence">
<meta name="generator" content="bookdown 0.7.13 and GitBook 2.6.7">
<meta property="og:title" content="Chasing The Trajectory of Terrorism: A Machine Learning Based Approach to Achieve Open Source Intelligence" />
<meta property="og:type" content="book" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Chasing The Trajectory of Terrorism: A Machine Learning Based Approach to Achieve Open Source Intelligence" />
<meta name="author" content="Pranav Pandya">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="prev" href="4-hypothesis-testing.html">
<link rel="next" href="6-time-series.html">
<style type="text/css">
p.abstract{
text-align: center;
font-weight: bold;
}
div.abstract{
margin: auto;
width: 90%;
}
</style>
<script src="libs/jquery-2.2.3/jquery.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<script src="libs/htmlwidgets-1.2.1/htmlwidgets.js"></script>
<script src="libs/plotly-binding-4.7.1.9000/plotly.js"></script>
<script src="libs/typedarray-0.1/typedarray.min.js"></script>
<link href="libs/crosstalk-1.0.0/css/crosstalk.css" rel="stylesheet" />
<script src="libs/crosstalk-1.0.0/js/crosstalk.min.js"></script>
<link href="libs/plotly-htmlwidgets-css-1.38.3/plotly-htmlwidgets.css" rel="stylesheet" />
<script src="libs/plotly-main-1.38.3/plotly-latest.min.js"></script>
<script src="libs/proj4js-2.3.15/proj4.js"></script>
<link href="libs/highcharts-6.0.3/css/motion.css" rel="stylesheet" />
<script src="libs/highcharts-6.0.3/highcharts.js"></script>
<script src="libs/highcharts-6.0.3/highcharts-3d.js"></script>
<script src="libs/highcharts-6.0.3/highcharts-more.js"></script>
<script src="libs/highcharts-6.0.3/modules/stock.js"></script>
<script src="libs/highcharts-6.0.3/modules/heatmap.js"></script>
<script src="libs/highcharts-6.0.3/modules/treemap.js"></script>
<script src="libs/highcharts-6.0.3/modules/annotations.js"></script>
<script src="libs/highcharts-6.0.3/modules/boost.js"></script>
<script src="libs/highcharts-6.0.3/modules/data.js"></script>
<script src="libs/highcharts-6.0.3/modules/drag-panes.js"></script>
<script src="libs/highcharts-6.0.3/modules/drilldown.js"></script>
<script src="libs/highcharts-6.0.3/modules/funnel.js"></script>
<script src="libs/highcharts-6.0.3/modules/item-series.js"></script>
<script src="libs/highcharts-6.0.3/modules/offline-exporting.js"></script>
<script src="libs/highcharts-6.0.3/modules/overlapping-datalabels.js"></script>
<script src="libs/highcharts-6.0.3/modules/parallel-coordinates.js"></script>
<script src="libs/highcharts-6.0.3/modules/sankey.js"></script>
<script src="libs/highcharts-6.0.3/modules/solid-gauge.js"></script>
<script src="libs/highcharts-6.0.3/modules/streamgraph.js"></script>
<script src="libs/highcharts-6.0.3/modules/sunburst.js"></script>
<script src="libs/highcharts-6.0.3/modules/vector.js"></script>
<script src="libs/highcharts-6.0.3/modules/wordcloud.js"></script>
<script src="libs/highcharts-6.0.3/modules/xrange.js"></script>
<script src="libs/highcharts-6.0.3/modules/exporting.js"></script>
<script src="libs/highcharts-6.0.3/modules/export-data.js"></script>
<script src="libs/highcharts-6.0.3/maps/modules/map.js"></script>
<script src="libs/highcharts-6.0.3/plugins/grouped-categories.js"></script>
<script src="libs/highcharts-6.0.3/plugins/motion.js"></script>
<script src="libs/highcharts-6.0.3/plugins/multicolor_series.js"></script>
<script src="libs/highcharts-6.0.3/custom/reset.js"></script>
<script src="libs/highcharts-6.0.3/custom/symbols-extra.js"></script>
<script src="libs/highcharts-6.0.3/custom/text-symbols.js"></script>
<script src="libs/highchart-binding-0.6.0/highchart.js"></script>
<script src="libs/kePrint-0.0.1/kePrint.js"></script>
<link href="libs/vis-4.20.1/vis.css" rel="stylesheet" />
<script src="libs/vis-4.20.1/vis.min.js"></script>
<script src="libs/visNetwork-binding-2.0.4/visNetwork.js"></script>
<style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
</style>
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./"></a></li>
<li class="divider"></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Introduction</a><ul>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#definition-of-terrorism"><i class="fa fa-check"></i>Definition of terrorism</a></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#problem-statement"><i class="fa fa-check"></i>Problem statement</a></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#research-design-and-data"><i class="fa fa-check"></i>Research design and data</a></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#policy-and-practice-implications"><i class="fa fa-check"></i>Policy and practice implications</a></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#deliverables"><i class="fa fa-check"></i>Deliverables</a></li>
</ul></li>
<li class="chapter" data-level="1" data-path="1-essentials-counter.html"><a href="1-essentials-counter.html"><i class="fa fa-check"></i><b>1</b> Essentials of Counterterrorism</a><ul>
<li class="chapter" data-level="1.1" data-path="1-essentials-counter.html"><a href="1-essentials-counter.html#intelligence-disciplines"><i class="fa fa-check"></i><b>1.1</b> Intelligence disciplines</a></li>
<li class="chapter" data-level="1.2" data-path="1-essentials-counter.html"><a href="1-essentials-counter.html#osint-and-data-relevance"><i class="fa fa-check"></i><b>1.2</b> OSINT and data relevance</a><ul>
<li class="chapter" data-level="1.2.1" data-path="1-essentials-counter.html"><a href="1-essentials-counter.html#open-source-databases-on-terrorism"><i class="fa fa-check"></i><b>1.2.1</b> Open-source databases on terrorism</a></li>
</ul></li>
<li class="chapter" data-level="1.3" data-path="1-essentials-counter.html"><a href="1-essentials-counter.html#whats-important-in-terrorism-research"><i class="fa fa-check"></i><b>1.3</b> What’s important in terrorism research?</a><ul>
<li class="chapter" data-level="1.3.1" data-path="1-essentials-counter.html"><a href="1-essentials-counter.html#primary-vs-secondary-sources"><i class="fa fa-check"></i><b>1.3.1</b> Primary vs secondary sources</a></li>
<li class="chapter" data-level="1.3.2" data-path="1-essentials-counter.html"><a href="1-essentials-counter.html#use-of-statistical-analysis"><i class="fa fa-check"></i><b>1.3.2</b> Use of statistical analysis</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="2" data-path="2-literature-review.html"><a href="2-literature-review.html"><i class="fa fa-check"></i><b>2</b> Literature Review</a><ul>
<li class="chapter" data-level="2.1" data-path="2-literature-review.html"><a href="2-literature-review.html#overview-of-prior-research"><i class="fa fa-check"></i><b>2.1</b> Overview of prior research</a><ul>
<li class="chapter" data-level="2.1.1" data-path="2-literature-review.html"><a href="2-literature-review.html#harsh-realities"><i class="fa fa-check"></i><b>2.1.1</b> Harsh realities</a></li>
<li class="chapter" data-level="2.1.2" data-path="2-literature-review.html"><a href="2-literature-review.html#review-of-relevant-literature"><i class="fa fa-check"></i><b>2.1.2</b> Review of relevant literature</a></li>
<li class="chapter" data-level="2.1.3" data-path="2-literature-review.html"><a href="2-literature-review.html#gtd-and-machine-learning-in-previous-research"><i class="fa fa-check"></i><b>2.1.3</b> GTD and machine learning in previous research</a></li>
</ul></li>
<li class="chapter" data-level="2.2" data-path="2-literature-review.html"><a href="2-literature-review.html#literature-gap-and-relevance"><i class="fa fa-check"></i><b>2.2</b> Literature gap and relevance</a></li>
</ul></li>
<li class="chapter" data-level="3" data-path="3-impact-analysis.html"><a href="3-impact-analysis.html"><i class="fa fa-check"></i><b>3</b> Impact Analysis</a><ul>
<li class="chapter" data-level="3.1" data-path="3-impact-analysis.html"><a href="3-impact-analysis.html#data-preparation"><i class="fa fa-check"></i><b>3.1</b> Data preparation</a></li>
<li class="chapter" data-level="3.2" data-path="3-impact-analysis.html"><a href="3-impact-analysis.html#global-overview"><i class="fa fa-check"></i><b>3.2</b> Global overview</a></li>
<li class="chapter" data-level="3.3" data-path="3-impact-analysis.html"><a href="3-impact-analysis.html#the-top-10-most-active-and-violent-groups"><i class="fa fa-check"></i><b>3.3</b> The top 10 most active and violent groups</a></li>
<li class="chapter" data-level="3.4" data-path="3-impact-analysis.html"><a href="3-impact-analysis.html#the-major-and-minor-epicenters"><i class="fa fa-check"></i><b>3.4</b> The major and minor epicenters</a></li>
</ul></li>
<li class="chapter" data-level="4" data-path="4-hypothesis-testing.html"><a href="4-hypothesis-testing.html"><i class="fa fa-check"></i><b>4</b> Statistical Hypothesis Testing</a><ul>
<li class="chapter" data-level="4.1" data-path="4-hypothesis-testing.html"><a href="4-hypothesis-testing.html#data-preparation-1"><i class="fa fa-check"></i><b>4.1</b> Data preparation</a></li>
<li class="chapter" data-level="4.2" data-path="4-hypothesis-testing.html"><a href="4-hypothesis-testing.html#correlation-test"><i class="fa fa-check"></i><b>4.2</b> Correlation test</a></li>
<li class="chapter" data-level="4.3" data-path="4-hypothesis-testing.html"><a href="4-hypothesis-testing.html#hypothesis-test-fatalities-vs-groups"><i class="fa fa-check"></i><b>4.3</b> Hypothesis test: fatalities vs groups</a><ul>
<li class="chapter" data-level="4.3.1" data-path="4-hypothesis-testing.html"><a href="4-hypothesis-testing.html#anova-test"><i class="fa fa-check"></i><b>4.3.1</b> ANOVA test</a></li>
<li class="chapter" data-level="4.3.2" data-path="4-hypothesis-testing.html"><a href="4-hypothesis-testing.html#posthoc-test"><i class="fa fa-check"></i><b>4.3.2</b> PostHoc test</a></li>
<li class="chapter" data-level="4.3.3" data-path="4-hypothesis-testing.html"><a href="4-hypothesis-testing.html#interpretation"><i class="fa fa-check"></i><b>4.3.3</b> Interpretation</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="5" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html"><i class="fa fa-check"></i><b>5</b> Pattern discovery</a><ul>
<li class="chapter" data-level="5.1" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#data-preparation-2"><i class="fa fa-check"></i><b>5.1</b> Data preparation</a></li>
<li class="chapter" data-level="5.2" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#explanation-of-key-terms"><i class="fa fa-check"></i><b>5.2</b> Explanation of key terms</a></li>
<li class="chapter" data-level="5.3" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#islamic-state-isil"><i class="fa fa-check"></i><b>5.3</b> Islamic State (ISIL)</a><ul>
<li class="chapter" data-level="5.3.1" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#apriori-model-summary"><i class="fa fa-check"></i><b>5.3.1</b> Apriori model summary</a></li>
<li class="chapter" data-level="5.3.2" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#top-5-patterns-isil"><i class="fa fa-check"></i><b>5.3.2</b> Top 5 patterns (ISIL)</a></li>
<li class="chapter" data-level="5.3.3" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#network-graph-isil"><i class="fa fa-check"></i><b>5.3.3</b> Network graph (ISIL)</a></li>
</ul></li>
<li class="chapter" data-level="5.4" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#taliban"><i class="fa fa-check"></i><b>5.4</b> Taliban</a><ul>
<li class="chapter" data-level="5.4.1" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#apriori-model-summary-1"><i class="fa fa-check"></i><b>5.4.1</b> Apriori model summary</a></li>
<li class="chapter" data-level="5.4.2" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#top-5-patterns-taliban"><i class="fa fa-check"></i><b>5.4.2</b> Top 5 patterns (Taliban)</a></li>
<li class="chapter" data-level="5.4.3" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#network-graph-taliban"><i class="fa fa-check"></i><b>5.4.3</b> Network graph (Taliban)</a></li>
</ul></li>
<li class="chapter" data-level="5.5" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#boko-haram"><i class="fa fa-check"></i><b>5.5</b> Boko Haram</a><ul>
<li class="chapter" data-level="5.5.1" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#apriori-model-summary-2"><i class="fa fa-check"></i><b>5.5.1</b> Apriori model summary</a></li>
<li class="chapter" data-level="5.5.2" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#top-5-patterns-boko-haram"><i class="fa fa-check"></i><b>5.5.2</b> Top 5 patterns (Boko Haram)</a></li>
<li class="chapter" data-level="5.5.3" data-path="5-pattern-discovery.html"><a href="5-pattern-discovery.html#network-graph-boko-haram"><i class="fa fa-check"></i><b>5.5.3</b> Network graph (Boko Haram)</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="6" data-path="6-time-series.html"><a href="6-time-series.html"><i class="fa fa-check"></i><b>6</b> Time-series Forecasting</a><ul>
<li class="chapter" data-level="6.1" data-path="6-time-series.html"><a href="6-time-series.html#afghanistan-predict-future-attacks"><i class="fa fa-check"></i><b>6.1</b> Afghanistan (Predict future attacks)</a><ul>
<li class="chapter" data-level="6.1.1" data-path="6-time-series.html"><a href="6-time-series.html#data-preparation-3"><i class="fa fa-check"></i><b>6.1.1</b> Data preparation</a></li>
<li class="chapter" data-level="6.1.2" data-path="6-time-series.html"><a href="6-time-series.html#seasonality-analysis"><i class="fa fa-check"></i><b>6.1.2</b> Seasonality analysis</a></li>
<li class="chapter" data-level="6.1.3" data-path="6-time-series.html"><a href="6-time-series.html#correlation-test-1"><i class="fa fa-check"></i><b>6.1.3</b> Correlation test</a></li>
<li class="chapter" data-level="6.1.4" data-path="6-time-series.html"><a href="6-time-series.html#modelling"><i class="fa fa-check"></i><b>6.1.4</b> Modelling</a></li>
<li class="chapter" data-level="6.1.5" data-path="6-time-series.html"><a href="6-time-series.html#evaluating-models-performance"><i class="fa fa-check"></i><b>6.1.5</b> Evaluating models’ Performance</a></li>
<li class="chapter" data-level="6.1.6" data-path="6-time-series.html"><a href="6-time-series.html#ensemble"><i class="fa fa-check"></i><b>6.1.6</b> Ensemble</a></li>
<li class="chapter" data-level="6.1.7" data-path="6-time-series.html"><a href="6-time-series.html#forecast-future-number-of-attacks"><i class="fa fa-check"></i><b>6.1.7</b> Forecast future number of attacks</a></li>
</ul></li>
<li class="chapter" data-level="6.2" data-path="6-time-series.html"><a href="6-time-series.html#iraq-predict-future-fatalities"><i class="fa fa-check"></i><b>6.2</b> Iraq (Predict future fatalities)</a><ul>
<li class="chapter" data-level="6.2.1" data-path="6-time-series.html"><a href="6-time-series.html#data-preparation-4"><i class="fa fa-check"></i><b>6.2.1</b> Data preparation</a></li>
<li class="chapter" data-level="6.2.2" data-path="6-time-series.html"><a href="6-time-series.html#seasonality-analysis-1"><i class="fa fa-check"></i><b>6.2.2</b> Seasonality analysis</a></li>
<li class="chapter" data-level="6.2.3" data-path="6-time-series.html"><a href="6-time-series.html#correlation-test-2"><i class="fa fa-check"></i><b>6.2.3</b> Correlation test</a></li>
<li class="chapter" data-level="6.2.4" data-path="6-time-series.html"><a href="6-time-series.html#modelling-1"><i class="fa fa-check"></i><b>6.2.4</b> Modelling</a></li>
<li class="chapter" data-level="6.2.5" data-path="6-time-series.html"><a href="6-time-series.html#ensemble-1"><i class="fa fa-check"></i><b>6.2.5</b> Ensemble</a></li>
<li class="chapter" data-level="6.2.6" data-path="6-time-series.html"><a href="6-time-series.html#forecast-future-fatalities"><i class="fa fa-check"></i><b>6.2.6</b> Forecast future fatalities</a></li>
</ul></li>
<li class="chapter" data-level="6.3" data-path="6-time-series.html"><a href="6-time-series.html#sahel-region-predict-future-attacks"><i class="fa fa-check"></i><b>6.3</b> SAHEL Region (Predict future attacks)</a><ul>
<li class="chapter" data-level="6.3.1" data-path="6-time-series.html"><a href="6-time-series.html#data-preparation-5"><i class="fa fa-check"></i><b>6.3.1</b> Data preparation</a></li>
<li class="chapter" data-level="6.3.2" data-path="6-time-series.html"><a href="6-time-series.html#seasonality-analysis-2"><i class="fa fa-check"></i><b>6.3.2</b> Seasonality analysis</a></li>
<li class="chapter" data-level="6.3.3" data-path="6-time-series.html"><a href="6-time-series.html#correlation-test-3"><i class="fa fa-check"></i><b>6.3.3</b> Correlation test</a></li>
<li class="chapter" data-level="6.3.4" data-path="6-time-series.html"><a href="6-time-series.html#modelling-2"><i class="fa fa-check"></i><b>6.3.4</b> Modelling</a></li>
<li class="chapter" data-level="6.3.5" data-path="6-time-series.html"><a href="6-time-series.html#ensemble-2"><i class="fa fa-check"></i><b>6.3.5</b> Ensemble</a></li>
<li class="chapter" data-level="6.3.6" data-path="6-time-series.html"><a href="6-time-series.html#forecast-future-attacks"><i class="fa fa-check"></i><b>6.3.6</b> Forecast future attacks</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="7" data-path="7-classification.html"><a href="7-classification.html"><i class="fa fa-check"></i><b>7</b> Predicting Class Probabilities</a><ul>
<li class="chapter" data-level="7.1" data-path="7-classification.html"><a href="7-classification.html#evolution-of-gradient-boosting-machines"><i class="fa fa-check"></i><b>7.1</b> Evolution of Gradient Boosting Machines</a><ul>
<li class="chapter" data-level="7.1.1" data-path="7-classification.html"><a href="7-classification.html#lightgbm"><i class="fa fa-check"></i><b>7.1.1</b> LightGBM</a></li>
<li class="chapter" data-level="7.1.2" data-path="7-classification.html"><a href="7-classification.html#the-mechanism-behind-the-improvised-accuracy"><i class="fa fa-check"></i><b>7.1.2</b> The mechanism behind the improvised accuracy</a></li>
</ul></li>
<li class="chapter" data-level="7.2" data-path="7-classification.html"><a href="7-classification.html#data-preparation-6"><i class="fa fa-check"></i><b>7.2</b> Data preparation</a></li>
<li class="chapter" data-level="7.3" data-path="7-classification.html"><a href="7-classification.html#overview-of-the-target-variable"><i class="fa fa-check"></i><b>7.3</b> Overview of the target variable</a><ul>
<li class="chapter" data-level="7.3.1" data-path="7-classification.html"><a href="7-classification.html#dealing-with-class-imbalance"><i class="fa fa-check"></i><b>7.3.1</b> Dealing with class imbalance</a></li>
</ul></li>
<li class="chapter" data-level="7.4" data-path="7-classification.html"><a href="7-classification.html#feature-engineering"><i class="fa fa-check"></i><b>7.4</b> Feature engineering</a></li>
<li class="chapter" data-level="7.5" data-path="7-classification.html"><a href="7-classification.html#validation-strategy"><i class="fa fa-check"></i><b>7.5</b> Validation strategy</a></li>
<li class="chapter" data-level="7.6" data-path="7-classification.html"><a href="7-classification.html#hyperparameter-optimization"><i class="fa fa-check"></i><b>7.6</b> Hyperparameter optimization</a></li>
<li class="chapter" data-level="7.7" data-path="7-classification.html"><a href="7-classification.html#modelling-3"><i class="fa fa-check"></i><b>7.7</b> Modelling</a><ul>
<li class="chapter" data-level="7.7.1" data-path="7-classification.html"><a href="7-classification.html#model-evaluation"><i class="fa fa-check"></i><b>7.7.1</b> Model evaluation</a></li>
<li class="chapter" data-level="7.7.2" data-path="7-classification.html"><a href="7-classification.html#confusion-matrix"><i class="fa fa-check"></i><b>7.7.2</b> Confusion Matrix</a></li>
<li class="chapter" data-level="7.7.3" data-path="7-classification.html"><a href="7-classification.html#feature-importance"><i class="fa fa-check"></i><b>7.7.3</b> Feature importance</a></li>
</ul></li>
<li class="chapter" data-level="7.8" data-path="7-classification.html"><a href="7-classification.html#model-interpretation"><i class="fa fa-check"></i><b>7.8</b> Model interpretation</a></li>
</ul></li>
<li class="chapter" data-level="8" data-path="8-conclusion.html"><a href="8-conclusion.html"><i class="fa fa-check"></i><b>8</b> Discussion and Conclusion</a><ul>
<li class="chapter" data-level="8.1" data-path="8-conclusion.html"><a href="8-conclusion.html#research-limitations-and-future-work"><i class="fa fa-check"></i><b>8.1</b> Research limitations and future work</a></li>
</ul></li>
<li class="appendix"><span><b>Appendix</b></span></li>
<li class="chapter" data-level="A" data-path="A-appendix-i.html"><a href="A-appendix-i.html"><i class="fa fa-check"></i><b>A</b> Appendix I</a><ul>
<li class="chapter" data-level="A.1" data-path="A-appendix-i.html"><a href="A-appendix-i.html#initial-data-preparation-script"><i class="fa fa-check"></i><b>A.1</b> Initial data preparation script</a></li>
<li class="chapter" data-level="A.2" data-path="A-appendix-i.html"><a href="A-appendix-i.html#list-of-variables-and-short-description"><i class="fa fa-check"></i><b>A.2</b> List of variables and short description</a></li>
<li class="chapter" data-level="A.3" data-path="A-appendix-i.html"><a href="A-appendix-i.html#r-session-info"><i class="fa fa-check"></i><b>A.3</b> R Session Info:</a></li>
</ul></li>
<li class="chapter" data-level="" data-path="references.html"><a href="references.html"><i class="fa fa-check"></i>References</a></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Chasing The Trajectory of Terrorism: A Machine Learning Based Approach to Achieve Open Source Intelligence</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="pattern-discovery" class="section level1">
<h1><span class="header-section-number">Chapter 5</span> Pattern discovery</h1>
<p>This part of the analysis is based on unsupervised machine learning algorithm and makes use of association rules to discover patterns in terrorist incidents from Islamic State, Taliban and Boko Haram group that were identified in top ten most active and violent groups.</p>
<p>Mining of association rules is a widely used method in retail and eCommerce environment and commonly known as Market Basket Analysis using Apriori algorithm. The logic behind this approach is that if a customer buys a certain group of products then they are more or less likely to buy another group of products <span class="citation">(Karthiyayini & Balasubramanian, 2016)</span>.</p>
<p><strong>Pseudocode of the Apriori algorithm:</strong> (minimal version<a href="#fn11" class="footnoteRef" id="fnref11"><sup>11</sup></a>)</p>
<p><span class="math display">\[
\begin{aligned}
& \mathrm{Apriori}(T,\epsilon)\\
&\qquad L_1 \gets \{ \mathrm{large~1-item sets} \} \\
&\qquad k \gets 2\\
&\qquad \mathrm{\textbf{while}}~ L_{k-1} \neq \ \emptyset \\
&\qquad \qquad C_k \gets \{ a \cup \{b\} \mid a \in L_{k-1} \land b \not \in a \} - \{ c \mid \{ s \mid s \subseteq c \land |s| = k-1 \} \nsubseteq L_{k-1} \}\\
&\qquad \qquad \mathrm{\textbf{for}~transactions}~t \in T\\
&\qquad \qquad\qquad D_t \gets \{ c \mid c \in C_k \land c \subseteq t \} \\
&\qquad \qquad\qquad \mathrm{\textbf{for}~candidates}~c \in D_t\\
&\qquad \qquad\qquad\qquad \mathit{count}[c] \gets \mathit{count}[c]+1\\
&\qquad \qquad L_k \gets \{ c \mid c \in C_k \land ~ \mathit{count}[c] \geq \epsilon \}\\
&\qquad \qquad k \gets k+1\\
&\qquad \mathrm{\textbf{return}}~\bigcup_k L_k
\end{aligned}
\]</span></p>
<p>As the goal of this algorithm is to determine the set of frequent items among the candidates, this methodology can also be applied to discover patterns within the terrorism context. The idea is to understand attack habits from terrorist groups by finding association and correlation between different attacks that were carried out in the past. It’s important to note that output from this algorithm is a list of association rules (frequent patterns) and provides descriptive analysis only. The real value of such unsupervised learning is in the insights we can take away from the algorithm’s finding.</p>
<div id="data-preparation-2" class="section level2">
<h2><span class="header-section-number">5.1</span> Data preparation</h2>
<p>For this analysis, I have chosen specific variables that are not highly correlated with chosen groups i.e. target type, weapon type, attack type, suicide attack and a number of fatalities while excluding the observations where the value is “Unknown”.</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">tmp <-<span class="st"> </span>dfh <span class="op">%>%</span>
<span class="st"> </span><span class="kw">select</span>(group_name, target_type, weapon_type, attack_type, suicide_attack, nkill) <span class="op">%>%</span>
<span class="st"> </span><span class="kw">filter</span>(target_type <span class="op">!=</span><span class="st"> "Unknown"</span> <span class="op">&</span><span class="st"> </span>target_type <span class="op">!=</span><span class="st"> "Other"</span> <span class="op">&</span><span class="st"> </span>
<span class="st"> </span>weapon_type <span class="op">!=</span><span class="st"> "Unknown"</span> <span class="op">&</span><span class="st"> </span>attack_type <span class="op">!=</span><span class="st"> "Unknown"</span>) <span class="op">%>%</span>
<span class="st"> </span><span class="kw">mutate</span>(<span class="dt">nkill =</span> <span class="kw">if_else</span>(nkill <span class="op">==</span><span class="st"> </span><span class="dv">0</span>, <span class="st">"0"</span>,
<span class="kw">if_else</span>(nkill <span class="op">>=</span><span class="st"> </span><span class="dv">1</span> <span class="op">&</span><span class="st"> </span>nkill <span class="op"><=</span><span class="st"> </span><span class="dv">5</span>, <span class="st">"1 to 5"</span>,
<span class="kw">if_else</span>(nkill <span class="op">></span><span class="st"> </span><span class="dv">5</span> <span class="op">&</span><span class="st"> </span>nkill <span class="op"><=</span><span class="st"> </span><span class="dv">10</span>, <span class="st">"6 to 10"</span>,
<span class="kw">if_else</span>(nkill <span class="op">></span><span class="st"> </span><span class="dv">10</span> <span class="op">&</span><span class="st"> </span>nkill <span class="op"><=</span><span class="st"> </span><span class="dv">50</span>, <span class="st">"11 to 50"</span>, <span class="st">"more than 50"</span>)))))
<span class="co">#shorten lengthy names for visualization purpose</span>
tmp<span class="op">$</span>weapon_type[
tmp<span class="op">$</span>weapon_type <span class="op">==</span><span class="st"> "Explosives/Bombs/Dynamite"</span>] <-<span class="st"> "Explosives"</span>
tmp<span class="op">$</span>attack_type[
tmp<span class="op">$</span>attack_type <span class="op">==</span><span class="st"> "Facility/Infrastructure Attack"</span>] <-<span class="st"> "Facility/Infra."</span>
tmp<span class="op">$</span>target_type[
tmp<span class="op">$</span>target_type <span class="op">==</span><span class="st"> "Private Citizens & Property"</span>] <-<span class="st"> "Civilians"</span>
tmp<span class="op">$</span>target_type[
tmp<span class="op">$</span>target_type <span class="op">==</span><span class="st"> "Terrorists/Non-State Militia"</span>] <-<span class="st"> "Non-State Militia"</span>
tmp<span class="op">$</span>target_type[
tmp<span class="op">$</span>target_type <span class="op">==</span><span class="st"> "Religious Figures/Institutions"</span>] <-<span class="st"> "Religious Figures"</span>
<span class="co">#convert everything to factor</span>
tmp[] <-<span class="st"> </span><span class="kw">lapply</span>(tmp, factor)
<span class="kw">str</span>(tmp)</code></pre></div>
<pre><code>'data.frame': 18006 obs. of 6 variables:
$ group_name : Factor w/ 10 levels "Al-Nusrah","Al-Shabaab",..: 8 8 8 8 8 8 8 8 8 8 ...
$ target_type : Factor w/ 19 levels "Airports & Aircraft",..: 10 10 2 3 3 3 3 6 3 3 ...
$ weapon_type : Factor w/ 8 levels "Chemical","Explosives",..: 2 3 3 3 3 3 3 3 3 3 ...
$ attack_type : Factor w/ 8 levels "Armed Assault",..: 3 3 4 3 3 1 1 2 1 1 ...
$ suicide_attack: Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
$ nkill : Factor w/ 5 levels "0","1 to 5","11 to 50",..: 2 2 1 3 4 3 2 2 1 4 ...</code></pre>
</div>
<div id="explanation-of-key-terms" class="section level2">
<h2><span class="header-section-number">5.2</span> Explanation of key terms</h2>
<p>The Apriori algorithm has three main measures namely support, confidence and lift. These three measures are used to decide the relative strength of the rules. In the model parameters, we set RHS to the chosen group and LHS refers to a frequent pattern that is observed.</p>
<p><strong>Support</strong> indicates how interesting a pattern is. In the algorithm configuration (params), I have set the threshold to 0.001 which means a pattern must have appeared at least 0.001 * nrow(tmp) = 18 times.</p>
<p><strong>Confidence</strong> value i.e 0.5 (set as a threshold in model params) means that in order to be included in the results, the rule has to be correct at least 50 percent of the time. This is particularly helpful to eliminate the unreliable rules.</p>
<p><strong>Lift</strong> indicates probability (support) of the itemset (pattern) over the product of the probabilities of all items in the itemset <span class="citation">(Hahsler et al., 2018)</span>.</p>
<p>In general, high confidence and good lift are the standard measures to evaluate the importance of a particular rule/ association however not all the rules are useful. This rules normally fall into three categories i.e. actionable, trivial(useless) and inexplicable <span class="citation">(Klimberg & McCullough, 2017)</span>. Example of the useless rule can be an association that is obvious and thus not worth mentioning.</p>
</div>
<div id="islamic-state-isil" class="section level2">
<h2><span class="header-section-number">5.3</span> Islamic State (ISIL)</h2>
<div id="apriori-model-summary" class="section level3">
<h3><span class="header-section-number">5.3.1</span> Apriori model summary</h3>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># set params</span>
params <-<span class="st"> </span><span class="kw">list</span>(<span class="dt">support =</span> <span class="fl">0.001</span>, <span class="dt">confidence =</span> <span class="fl">0.5</span>, <span class="dt">minlen =</span> <span class="dv">2</span>)
group_ISIL <-<span class="st"> </span><span class="kw">list</span>(<span class="dt">rhs=</span><span class="st">'group_name=ISIL'</span>, <span class="dt">default=</span><span class="st">"lhs"</span>)
<span class="co"># apriori model</span>
rules <-<span class="st"> </span><span class="kw">apriori</span>(<span class="dt">data =</span> tmp, <span class="dt">parameter=</span> params, <span class="dt">appearance =</span> group_ISIL)</code></pre></div>
<pre><code>Apriori
Parameter specification:
confidence minval smax arem aval originalSupport maxtime support minlen
0.5 0.1 1 none FALSE TRUE 5 0.001 2
maxlen target ext
10 rules FALSE
Algorithmic control:
filter tree heap memopt load sort verbose
0.1 TRUE TRUE FALSE TRUE 2 TRUE
Absolute minimum support count: 18
set item appearances ...[1 item(s)] done [0.00s].
set transactions ...[52 item(s), 18006 transaction(s)] done [0.00s].
sorting and recoding items ... [48 item(s)] done [0.00s].
creating transaction tree ... done [0.01s].
checking subsets of size 1 2 3 4 5 6 done [0.00s].
writing ... [51 rule(s)] done [0.00s].
creating S4 object ... done [0.00s].</code></pre>
<p>In the model summary, we can see that the Absolute minimum support count is 18 which means the pattern needs to appear at least 18 times in order to be included. We have set this threshold with support value as explained previously. Out of all the patterns, the model is able to find 51 association rules for the ISIL group. We further remove the rules that may be redundant before starting our analysis.</p>
</div>
<div id="top-5-patterns-isil" class="section level3">
<h3><span class="header-section-number">5.3.2</span> Top 5 patterns (ISIL)</h3>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">rules <-<span class="st"> </span>rules[<span class="op">!</span><span class="kw">is.redundant</span>(rules)] <span class="co"># Remove redundant rules if any </span>
<span class="co"># Extract top 5 patterns based on confidence</span>
subrules <-<span class="st"> </span><span class="kw">head</span>(<span class="kw">sort</span>(rules, <span class="dt">by=</span><span class="st">"confidence"</span>), <span class="dv">5</span>)</code></pre></div>
<pre><code> lhs rhs support confidence lift count
[1] {weapon_type=Chemical,
attack_type=Bombing/Explosion} : {group_name=ISIL} 0.001055 0.9048 4.869 19
[2] {target_type=Non-State Militia,
attack_type=Bombing/Explosion,
nkill=6 to 10} : {group_name=ISIL} 0.001055 0.7308 3.933 19
[3] {target_type=Non-State Militia,
attack_type=Bombing/Explosion,
suicide_attack=1} : {group_name=ISIL} 0.003443 0.6526 3.512 62
[4] {target_type=Military,
suicide_attack=1,
nkill=11 to 50} : {group_name=ISIL} 0.007997 0.6457 3.475 144
[5] {target_type=Non-State Militia,
suicide_attack=1} : {group_name=ISIL} 0.003499 0.6238 3.357 63</code></pre>
<table>
<caption>
<span id="tab:unnamed-chunk-37">Table 5.1: </span>Five most important patterns (ISIL)
</caption>
<tbody>
<tr>
</tr>
</tbody>
</table>
<p>From the top five patterns based on confidence, we can see that the use of chemical weapon turns out to be the most frequent pattern with relatively high lift value. It is also interesting to see that attacks on other terrorists (non state militia) are observed in 3 out of top 5 patterns.</p>
<div class="figure" style="text-align: center"><span id="fig:unnamed-chunk-38"></span>
<div id="htmlwidget-4724e8bc8b31c39ca635" style="width:100%;height:384px;" class="plotly html-widget"></div>
<script type="application/json" data-for="htmlwidget-4724e8bc8b31c39ca635">{"x":{"visdat":{"1b1864ed61b1":["function () ","plotlyVisDat"]},"cur_data":"1b1864ed61b1","attrs":{"1b1864ed61b1":{"x":[0.0018007119933404,0.0237071700011825,0.0228551357851096,0.00109895683112146,0.00142163674564872,0.00802075761967525,0.00703472317956709,0.00345601320700483,0.00420784962294936,0.00245237668118008,0.00110456187887641,0.00241937097339925,0.00164814274502676,0.00102634147770898,0.00163431012090985,0.00352408220563778,0.00794869191396373,0.00342087226108082,0.00107195360234202,0.00101597637198594],"y":[0.507970364427321,0.524531466438196,0.52626565962187,0.52635083141357,0.531828505718667,0.539120275331422,0.545038257565749,0.552546776269141,0.562864021271091,0.586638052271415,0.588188906804108,0.594606105555259,0.604225441685567,0.612963744678305,0.617028275920426,0.623767723415709,0.645789491273691,0.652662116875311,0.730728046235331,0.904836835289944],"hoverinfo":"text","text":["[11]<BR> <B>{target_type=Business,<BR> attack_type=Bombing/Explosion,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00178 <BR>confidence: 0.508 <BR>lift: 2.73","[6]<BR> <B>{target_type=Military,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.0237 <BR>confidence: 0.525 <BR>lift: 2.82","[18]<BR> <B>{target_type=Military,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.0228 <BR>confidence: 0.526 <BR>lift: 2.83","[12]<BR> <B>{target_type=Military,<BR> weapon_type=Explosives,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00111 <BR>confidence: 0.526 <BR>lift: 2.83","[2]<BR> <B>{target_type=Non-State Militia,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00139 <BR>confidence: 0.532 <BR>lift: 2.86","[15]<BR> <B>{target_type=Military,<BR> attack_type=Bombing/Explosion,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00805 <BR>confidence: 0.539 <BR>lift: 2.9","[4]<BR> <B>{target_type=Non-State Militia,<BR> attack_type=Bombing/Explosion}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00705 <BR>confidence: 0.545 <BR>lift: 2.93","[10]<BR> <B>{target_type=Non-State Militia,<BR> attack_type=Bombing/Explosion,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.0035 <BR>confidence: 0.553 <BR>lift: 2.97","[13]<BR> <B>{target_type=Civilians,<BR> suicide_attack=1,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00422 <BR>confidence: 0.563 <BR>lift: 3.03","[16]<BR> <B>{target_type=Civilians,<BR> suicide_attack=1,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00244 <BR>confidence: 0.587 <BR>lift: 3.16","[5]<BR> <B>{attack_type=Hostage Taking (Kidnapping),<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00111 <BR>confidence: 0.588 <BR>lift: 3.17","[19]<BR> <B>{target_type=Civilians,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00244 <BR>confidence: 0.595 <BR>lift: 3.2","[17]<BR> <B>{target_type=Military,<BR> suicide_attack=1,<BR> nkill=0}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00161 <BR>confidence: 0.604 <BR>lift: 3.25","[8]<BR> <B>{target_type=Non-State Militia,<BR> weapon_type=Explosives,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.613 <BR>lift: 3.3","[20]<BR> <B>{target_type=Military,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1,<BR> nkill=0}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00161 <BR>confidence: 0.617 <BR>lift: 3.32","[3]<BR> <B>{target_type=Non-State Militia,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.0035 <BR>confidence: 0.624 <BR>lift: 3.36","[14]<BR> <B>{target_type=Military,<BR> suicide_attack=1,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.008 <BR>confidence: 0.646 <BR>lift: 3.47","[9]<BR> <B>{target_type=Non-State Militia,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00344 <BR>confidence: 0.653 <BR>lift: 3.51","[7]<BR> <B>{target_type=Non-State Militia,<BR> attack_type=Bombing/Explosion,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.731 <BR>lift: 3.93","[1]<BR> <B>{weapon_type=Chemical,<BR> attack_type=Bombing/Explosion}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.905 <BR>lift: 4.87"],"mode":"markers","marker":{"colorbar":{"title":"lift"},"opacity":0.5,"size":10},"color":[2.73338456721601,2.82289535636816,2.83192728068678,2.83228992984553,2.86242067378006,2.9007281623511,2.93318266125205,2.97390442633781,3.02950122866441,3.15705917513449,3.16550050982736,3.19972213696063,3.25123281530185,3.29824730540077,3.32040798158487,3.35668420398525,3.4749530260347,3.51203951300846,3.93252563336245,4.86884126035351],"colors":["#BBDF27FF","#7AD151FF","#43BF71FF","#22A884FF","#21908CFF","#2A788EFF","#35608DFF","#414487FF","#482576FF","#440154FF"],"alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"scatter"}},"layout":{"margin":{"b":40,"l":60,"t":25,"r":10},"hovermode":"closest","xaxis":{"domain":[0,1],"automargin":true,"title":"support"},"yaxis":{"domain":[0,1],"automargin":true,"title":"confidence"},"title":"Association rules in ISIL group","showlegend":false,"legend":{"yanchor":"top","y":0.5}},"source":"A","config":{"modeBarButtonsToAdd":[{"name":"Collaborate","icon":{"width":1000,"ascent":500,"descent":-50,"path":"M487 375c7-10 9-23 5-36l-79-259c-3-12-11-23-22-31-11-8-22-12-35-12l-263 0c-15 0-29 5-43 15-13 10-23 23-28 37-5 13-5 25-1 37 0 0 0 3 1 7 1 5 1 8 1 11 0 2 0 4-1 6 0 3-1 5-1 6 1 2 2 4 3 6 1 2 2 4 4 6 2 3 4 5 5 7 5 7 9 16 13 26 4 10 7 19 9 26 0 2 0 5 0 9-1 4-1 6 0 8 0 2 2 5 4 8 3 3 5 5 5 7 4 6 8 15 12 26 4 11 7 19 7 26 1 1 0 4 0 9-1 4-1 7 0 8 1 2 3 5 6 8 4 4 6 6 6 7 4 5 8 13 13 24 4 11 7 20 7 28 1 1 0 4 0 7-1 3-1 6-1 7 0 2 1 4 3 6 1 1 3 4 5 6 2 3 3 5 5 6 1 2 3 5 4 9 2 3 3 7 5 10 1 3 2 6 4 10 2 4 4 7 6 9 2 3 4 5 7 7 3 2 7 3 11 3 3 0 8 0 13-1l0-1c7 2 12 2 14 2l218 0c14 0 25-5 32-16 8-10 10-23 6-37l-79-259c-7-22-13-37-20-43-7-7-19-10-37-10l-248 0c-5 0-9-2-11-5-2-3-2-7 0-12 4-13 18-20 41-20l264 0c5 0 10 2 16 5 5 3 8 6 10 11l85 282c2 5 2 10 2 17 7-3 13-7 17-13z m-304 0c-1-3-1-5 0-7 1-1 3-2 6-2l174 0c2 0 4 1 7 2 2 2 4 4 5 7l6 18c0 3 0 5-1 7-1 1-3 2-6 2l-173 0c-3 0-5-1-8-2-2-2-4-4-4-7z m-24-73c-1-3-1-5 0-7 2-2 3-2 6-2l174 0c2 0 5 0 7 2 3 2 4 4 5 7l6 18c1 2 0 5-1 6-1 2-3 3-5 3l-174 0c-3 0-5-1-7-3-3-1-4-4-5-6z"},"click":"function(gd) { \n // is this being viewed in RStudio?\n if (location.search == '?viewer_pane=1') {\n alert('To learn about plotly for collaboration, visit:\\n https://cpsievert.github.io/plotly_book/plot-ly-for-collaboration.html');\n } else {\n window.open('https://cpsievert.github.io/plotly_book/plot-ly-for-collaboration.html', '_blank');\n }\n }"}],"cloud":false},"data":[{"x":[0.0018007119933404,0.0237071700011825,0.0228551357851096,0.00109895683112146,0.00142163674564872,0.00802075761967525,0.00703472317956709,0.00345601320700483,0.00420784962294936,0.00245237668118008,0.00110456187887641,0.00241937097339925,0.00164814274502676,0.00102634147770898,0.00163431012090985,0.00352408220563778,0.00794869191396373,0.00342087226108082,0.00107195360234202,0.00101597637198594],"y":[0.507970364427321,0.524531466438196,0.52626565962187,0.52635083141357,0.531828505718667,0.539120275331422,0.545038257565749,0.552546776269141,0.562864021271091,0.586638052271415,0.588188906804108,0.594606105555259,0.604225441685567,0.612963744678305,0.617028275920426,0.623767723415709,0.645789491273691,0.652662116875311,0.730728046235331,0.904836835289944],"hoverinfo":["text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text"],"text":["[11]<BR> <B>{target_type=Business,<BR> attack_type=Bombing/Explosion,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00178 <BR>confidence: 0.508 <BR>lift: 2.73","[6]<BR> <B>{target_type=Military,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.0237 <BR>confidence: 0.525 <BR>lift: 2.82","[18]<BR> <B>{target_type=Military,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.0228 <BR>confidence: 0.526 <BR>lift: 2.83","[12]<BR> <B>{target_type=Military,<BR> weapon_type=Explosives,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00111 <BR>confidence: 0.526 <BR>lift: 2.83","[2]<BR> <B>{target_type=Non-State Militia,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00139 <BR>confidence: 0.532 <BR>lift: 2.86","[15]<BR> <B>{target_type=Military,<BR> attack_type=Bombing/Explosion,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00805 <BR>confidence: 0.539 <BR>lift: 2.9","[4]<BR> <B>{target_type=Non-State Militia,<BR> attack_type=Bombing/Explosion}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00705 <BR>confidence: 0.545 <BR>lift: 2.93","[10]<BR> <B>{target_type=Non-State Militia,<BR> attack_type=Bombing/Explosion,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.0035 <BR>confidence: 0.553 <BR>lift: 2.97","[13]<BR> <B>{target_type=Civilians,<BR> suicide_attack=1,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00422 <BR>confidence: 0.563 <BR>lift: 3.03","[16]<BR> <B>{target_type=Civilians,<BR> suicide_attack=1,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00244 <BR>confidence: 0.587 <BR>lift: 3.16","[5]<BR> <B>{attack_type=Hostage Taking (Kidnapping),<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00111 <BR>confidence: 0.588 <BR>lift: 3.17","[19]<BR> <B>{target_type=Civilians,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00244 <BR>confidence: 0.595 <BR>lift: 3.2","[17]<BR> <B>{target_type=Military,<BR> suicide_attack=1,<BR> nkill=0}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00161 <BR>confidence: 0.604 <BR>lift: 3.25","[8]<BR> <B>{target_type=Non-State Militia,<BR> weapon_type=Explosives,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.613 <BR>lift: 3.3","[20]<BR> <B>{target_type=Military,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1,<BR> nkill=0}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00161 <BR>confidence: 0.617 <BR>lift: 3.32","[3]<BR> <B>{target_type=Non-State Militia,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.0035 <BR>confidence: 0.624 <BR>lift: 3.36","[14]<BR> <B>{target_type=Military,<BR> suicide_attack=1,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.008 <BR>confidence: 0.646 <BR>lift: 3.47","[9]<BR> <B>{target_type=Non-State Militia,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00344 <BR>confidence: 0.653 <BR>lift: 3.51","[7]<BR> <B>{target_type=Non-State Militia,<BR> attack_type=Bombing/Explosion,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.731 <BR>lift: 3.93","[1]<BR> <B>{weapon_type=Chemical,<BR> attack_type=Bombing/Explosion}<\/B><BR> => <B>{group_name=ISIL}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.905 <BR>lift: 4.87"],"mode":"markers","marker":{"colorbar":{"title":"lift","ticklen":2},"cmin":2.73338456721601,"cmax":4.86884126035351,"colorscale":[["0","rgba(187,223,39,1)"],["0.0331838656838658","rgba(169,219,55,1)"],["0.044383673045645","rgba(163,218,59,1)"],["0.0462096502459735","rgba(162,217,60,1)"],["0.0486674132138857","rgba(160,217,61,1)"],["0.0598376259798434","rgba(154,216,65,1)"],["0.0738796171794671","rgba(146,214,70,1)"],["0.0865965186591575","rgba(138,212,74,1)"],["0.0999186808222275","rgba(129,210,78,1)"],["0.115885964912281","rgba(120,208,83,1)"],["0.136497076023392","rgba(112,205,89,1)"],["0.180977777777778","rgba(91,198,102,1)"],["0.200376470588235","rgba(81,195,107,1)"],["0.207027027027027","rgba(77,193,109,1)"],["0.220388513513514","rgba(68,191,113,1)"],["0.239484797297297","rgba(63,187,116,1)"],["0.257177419354839","rgba(59,184,119,1)"],["0.269272477693892","rgba(56,181,121,1)"],["0.279140509795661","rgba(53,179,123,1)"],["0.294188829196821","rgba(49,176,126,1)"],["0.338034009678995","rgba(34,167,132,1)"],["0.358118952088742","rgba(35,163,134,1)"],["0.446676113360324","rgba(33,144,140,1)"],["0.652884615384615","rgba(52,99,141,1)"],["1","rgba(68,1,84,1)"]],"showscale":false,"color":[2.73338456721601,2.82289535636816,2.83192728068678,2.83228992984553,2.86242067378006,2.9007281623511,2.93318266125205,2.97390442633781,3.02950122866441,3.15705917513449,3.16550050982736,3.19972213696063,3.25123281530185,3.29824730540077,3.32040798158487,3.35668420398525,3.4749530260347,3.51203951300846,3.93252563336245,4.86884126035351],"opacity":0.5,"size":10,"line":{"colorbar":{"title":"","ticklen":2},"cmin":2.73338456721601,"cmax":4.86884126035351,"colorscale":[["0","rgba(187,223,39,1)"],["0.0331838656838658","rgba(169,219,55,1)"],["0.044383673045645","rgba(163,218,59,1)"],["0.0462096502459735","rgba(162,217,60,1)"],["0.0486674132138857","rgba(160,217,61,1)"],["0.0598376259798434","rgba(154,216,65,1)"],["0.0738796171794671","rgba(146,214,70,1)"],["0.0865965186591575","rgba(138,212,74,1)"],["0.0999186808222275","rgba(129,210,78,1)"],["0.115885964912281","rgba(120,208,83,1)"],["0.136497076023392","rgba(112,205,89,1)"],["0.180977777777778","rgba(91,198,102,1)"],["0.200376470588235","rgba(81,195,107,1)"],["0.207027027027027","rgba(77,193,109,1)"],["0.220388513513514","rgba(68,191,113,1)"],["0.239484797297297","rgba(63,187,116,1)"],["0.257177419354839","rgba(59,184,119,1)"],["0.269272477693892","rgba(56,181,121,1)"],["0.279140509795661","rgba(53,179,123,1)"],["0.294188829196821","rgba(49,176,126,1)"],["0.338034009678995","rgba(34,167,132,1)"],["0.358118952088742","rgba(35,163,134,1)"],["0.446676113360324","rgba(33,144,140,1)"],["0.652884615384615","rgba(52,99,141,1)"],["1","rgba(68,1,84,1)"]],"showscale":false,"color":[2.73338456721601,2.82289535636816,2.83192728068678,2.83228992984553,2.86242067378006,2.9007281623511,2.93318266125205,2.97390442633781,3.02950122866441,3.15705917513449,3.16550050982736,3.19972213696063,3.25123281530185,3.29824730540077,3.32040798158487,3.35668420398525,3.4749530260347,3.51203951300846,3.93252563336245,4.86884126035351]}},"type":"scatter","xaxis":"x","yaxis":"y","frame":null},{"x":[0.00101597637198594,0.0237071700011825],"y":[0.507970364427321,0.904836835289944],"type":"scatter","mode":"markers","opacity":0,"hoverinfo":"none","showlegend":false,"marker":{"colorbar":{"title":"","ticklen":2,"len":0.5,"lenmode":"fraction","y":1,"yanchor":"top"},"cmin":2.73338456721601,"cmax":4.86884126035351,"colorscale":[["0","rgba(187,223,39,1)"],["0.0331838656838658","rgba(169,219,55,1)"],["0.044383673045645","rgba(163,218,59,1)"],["0.0462096502459735","rgba(162,217,60,1)"],["0.0486674132138857","rgba(160,217,61,1)"],["0.0598376259798434","rgba(154,216,65,1)"],["0.0738796171794671","rgba(146,214,70,1)"],["0.0865965186591575","rgba(138,212,74,1)"],["0.0999186808222275","rgba(129,210,78,1)"],["0.115885964912281","rgba(120,208,83,1)"],["0.136497076023392","rgba(112,205,89,1)"],["0.180977777777778","rgba(91,198,102,1)"],["0.200376470588235","rgba(81,195,107,1)"],["0.207027027027027","rgba(77,193,109,1)"],["0.220388513513514","rgba(68,191,113,1)"],["0.239484797297297","rgba(63,187,116,1)"],["0.257177419354839","rgba(59,184,119,1)"],["0.269272477693892","rgba(56,181,121,1)"],["0.279140509795661","rgba(53,179,123,1)"],["0.294188829196821","rgba(49,176,126,1)"],["0.338034009678995","rgba(34,167,132,1)"],["0.358118952088742","rgba(35,163,134,1)"],["0.446676113360324","rgba(33,144,140,1)"],["0.652884615384615","rgba(52,99,141,1)"],["1","rgba(68,1,84,1)"]],"showscale":true,"color":[2.73338456721601,4.86884126035351],"line":{"color":"rgba(255,127,14,1)"}},"xaxis":"x","yaxis":"y","frame":null}],"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.2,"selected":{"opacity":1},"debounce":0},"base_url":"https://plot.ly"},"evals":["config.modeBarButtonsToAdd.0.click"],"jsHooks":[]}</script>
<p class="caption">
Figure 5.1: Association rules in ISIL group
</p>
</div>
<p>The plot shown above represents all the discovered patterns (after removing redundant rules). We can see that majority of discovered rules are between 0.5 to 0.7 confidence while two rules with high support and both indicating an attack on the military with a suicide attack.</p>
</div>
<div id="network-graph-isil" class="section level3">
<h3><span class="header-section-number">5.3.3</span> Network graph (ISIL)</h3>
<p>The network graph shown below summarizes how things are related and interconnected with each other and describes the habits of the ISIL group.</p>
<div class="figure" style="text-align: center"><span id="fig:unnamed-chunk-40"></span>
<div id="htmlwidget-c26190c303e790d9eea8" style="width:100%;height:672px;" class="visNetwork html-widget"></div>
<script type="application/json" data-for="htmlwidget-c26190c303e790d9eea8">{"x":{"nodes":{"id":["7","12","13","20","22","30","31","40","44","47","48","49","50","51","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20"],"value":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,0.00105520382094857,0.00138842608019549,0.00349883372209264,0.00705320448739309,0.00111074086415639,0.023714317449739,0.00105520382094857,0.00105520382094857,0.00344329667888482,0.00349883372209264,0.00177718538265023,0.00111074086415639,0.00422081528379429,0.00799733422192602,0.00805287126513385,0.00244362990114406,0.00161057425302677,0.0228257247584139,0.00244362990114406,0.00161057425302677],"title":["group_name=ISIL","target_type=Business","target_type=Civilians","target_type=Military","target_type=Non-State Militia","weapon_type=Chemical","weapon_type=Explosives","attack_type=Bombing/Explosion","attack_type=Hostage Taking (Kidnapping)","suicide_attack=1","nkill=0","nkill=1 to 5","nkill=11 to 50","nkill=6 to 10","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20"],"name":["7","12","13","20","22","30","31","40","44","47","48","49","50","51","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20"],"label":["group_name=ISIL","target_type=Business","target_type=Civilians","target_type=Military","target_type=Non-State Militia","weapon_type=Chemical","weapon_type=Explosives","attack_type=Bombing/Explosion","attack_type=Hostage Taking (Kidnapping)","suicide_attack=1","nkill=0","nkill=1 to 5","nkill=11 to 50","nkill=6 to 10","","","","","","","","","","","","","","","","","","","",""],"support":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,0.00105520382094857,0.00138842608019549,0.00349883372209264,0.00705320448739309,0.00111074086415639,0.023714317449739,0.00105520382094857,0.00105520382094857,0.00344329667888482,0.00349883372209264,0.00177718538265023,0.00111074086415639,0.00422081528379429,0.00799733422192602,0.00805287126513385,0.00244362990114406,0.00161057425302677,0.0228257247584139,0.00244362990114406,0.00161057425302677],"confidence":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,0.904761904761905,0.531914893617021,0.623762376237624,0.545064377682403,0.588235294117647,0.524570024570025,0.730769230769231,0.612903225806452,0.652631578947368,0.552631578947368,0.507936507936508,0.526315789473684,0.562962962962963,0.645739910313901,0.539033457249071,0.586666666666667,0.604166666666667,0.526248399487836,0.594594594594595,0.617021276595745],"lift":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,4.86884126035351,2.86242067378006,3.35668420398525,2.93318266125205,3.16550050982736,2.82289535636816,3.93252563336245,3.29824730540077,3.51203951300846,2.97390442633781,2.73338456721601,2.83228992984553,3.02950122866441,3.4749530260347,2.9007281623511,3.15705917513449,3.25123281530185,2.83192728068678,3.19972213696063,3.32040798158487],"count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,19,25,63,127,20,427,19,19,62,63,32,20,76,144,145,44,29,411,44,29],"order":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,5,5]},"edges":{"from":["30","40","22","51","22","47","22","40","44","47","20","47","22","40","51","22","31","51","22","40","47","22","40","49","12","40","51","20","31","44","13","47","50","20","47","50","20","40","50","13","47","51","20","47","48","20","40","47","13","40","47","51","20","40","47","48","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20"],"to":["assoc1","assoc1","assoc2","assoc2","assoc3","assoc3","assoc4","assoc4","assoc5","assoc5","assoc6","assoc6","assoc7","assoc7","assoc7","assoc8","assoc8","assoc8","assoc9","assoc9","assoc9","assoc10","assoc10","assoc10","assoc11","assoc11","assoc11","assoc12","assoc12","assoc12","assoc13","assoc13","assoc13","assoc14","assoc14","assoc14","assoc15","assoc15","assoc15","assoc16","assoc16","assoc16","assoc17","assoc17","assoc17","assoc18","assoc18","assoc18","assoc19","assoc19","assoc19","assoc19","assoc20","assoc20","assoc20","assoc20","7","7","7","7","7","7","7","7","7","7","7","7","7","7","7","7","7","7","7","7"]},"nodesToDataframe":true,"edgesToDataframe":true,"options":{"width":"100%","height":"100%","nodes":{"shape":"dot","size":5,"color":"#9cb7f4"},"manipulation":{"enabled":false},"edges":{"color":"#ffd596","smooth":true,"arrows":"from"},"physics":{"solver":"barnesHut","maxVelocity":35,"forceAtlas2Based":{"gravitationalConstant":-6000}}},"groups":null,"width":null,"height":null,"idselection":{"enabled":true,"style":"width: 150px; height: 26px","useLabels":true,"main":"Select by id"},"byselection":{"enabled":false,"style":"width: 150px; height: 26px","multiple":false,"hideColor":"rgba(200,200,200,0.5)"},"main":null,"submain":null,"footer":null,"background":"rgba(0, 0, 0, 0)","events":[],"legend":{"width":0.2,"useGroups":true,"position":"left","ncol":1,"stepX":100,"stepY":100,"zoom":true},"highlight":{"enabled":true,"hoverNearest":false,"degree":1,"algorithm":"all","hideColor":"rgba(200,200,200,0.5)","labelOnly":true},"collapse":{"enabled":false,"fit":false,"resetHighlight":true,"clusterOptions":null}},"evals":[],"jsHooks":[]}</script>
<p class="caption">
Figure 5.2: Network graph of discovered patterns- ISIL group
</p>
</div>
</div>
</div>
<div id="taliban" class="section level2">
<h2><span class="header-section-number">5.4</span> Taliban</h2>
<div id="apriori-model-summary-1" class="section level3">
<h3><span class="header-section-number">5.4.1</span> Apriori model summary</h3>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co">#---------------------------------------</span>
<span class="co">#Apriori model on Taliban group</span>
<span class="co">#---------------------------------------</span>
params <-<span class="st"> </span><span class="kw">list</span>(<span class="dt">support =</span> <span class="fl">0.001</span>, <span class="dt">confidence =</span> <span class="fl">0.5</span>, <span class="dt">minlen =</span> <span class="dv">2</span>)
group_Taliban <-<span class="st"> </span><span class="kw">list</span>(<span class="dt">rhs=</span><span class="st">'group_name=Taliban'</span>, <span class="dt">default=</span><span class="st">"lhs"</span>)
rules <-<span class="st"> </span><span class="kw">apriori</span>(<span class="dt">data =</span> tmp,
<span class="dt">parameter=</span> params,
<span class="dt">appearance =</span> group_Taliban)</code></pre></div>
<pre><code>Apriori
Parameter specification:
confidence minval smax arem aval originalSupport maxtime support minlen
0.5 0.1 1 none FALSE TRUE 5 0.001 2
maxlen target ext
10 rules FALSE
Algorithmic control:
filter tree heap memopt load sort verbose
0.1 TRUE TRUE FALSE TRUE 2 TRUE
Absolute minimum support count: 18
set item appearances ...[1 item(s)] done [0.00s].
set transactions ...[52 item(s), 18006 transaction(s)] done [0.02s].
sorting and recoding items ... [48 item(s)] done [0.00s].
creating transaction tree ... done [0.02s].
checking subsets of size 1 2 3 4 5 6 done [0.01s].
writing ... [139 rule(s)] done [0.00s].
creating S4 object ... done [0.02s].</code></pre>
<p>From the model summary, we can see that the algorithm is able to identify 139 rules within the set threshold as defined in model parameters. However, it is possible that many rules may be redundant so we eliminate those rules.</p>
</div>
<div id="top-5-patterns-taliban" class="section level3">
<h3><span class="header-section-number">5.4.2</span> Top 5 patterns (Taliban)</h3>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co">#---------------------------------------</span>
<span class="co">#Remove redundant rules if any</span>
<span class="co">#---------------------------------------</span>
rules <-<span class="st"> </span>rules[<span class="op">!</span><span class="kw">is.redundant</span>(rules)]
<span class="co"># Extract top 5 patterns based on confidence</span>
subrules <-<span class="st"> </span><span class="kw">head</span>(<span class="kw">sort</span>(rules, <span class="dt">by=</span><span class="st">"confidence"</span>), <span class="dv">5</span>)</code></pre></div>
<pre><code> lhs rhs support confidence lift count
[1] {weapon_type=Chemical,
attack_type=Unarmed Assault} : {group_name=Taliban} 0.001222 0.8800 2.945 22
[2] {target_type=Police,
weapon_type=Firearms,
attack_type=Armed Assault,
nkill=11 to 50} : {group_name=Taliban} 0.004998 0.8257 2.763 90
[3] {target_type=Police,
weapon_type=Firearms,
nkill=6 to 10} : {group_name=Taliban} 0.010163 0.8243 2.759 183
[4] {target_type=Police,
weapon_type=Incendiary,
attack_type=Facility/Infra.,
nkill=0} : {group_name=Taliban} 0.001999 0.8000 2.677 36
[5] {target_type=Police,
weapon_type=Firearms,
nkill=11 to 50} : {group_name=Taliban} 0.005665 0.7969 2.667 102</code></pre>
<table>
<caption>
<span id="tab:unnamed-chunk-43">Table 5.2: </span>Five most important patterns (Taliban)
</caption>
<tbody>
<tr>
</tr>
</tbody>
</table>
<p>From the top five patterns above, we can see that the use of chemical weapon indicates the highest confidence and lift value. This was also the case in the ISIL group. It is also observed that police is the most common target in the incidents involving the use of firearms and resulting fatalities between 11 to 50.</p>
<div class="figure" style="text-align: center"><span id="fig:unnamed-chunk-44"></span>
<div id="htmlwidget-5091a4bf8cf53fb84905" style="width:100%;height:384px;" class="plotly html-widget"></div>
<script type="application/json" data-for="htmlwidget-5091a4bf8cf53fb84905">{"x":{"visdat":{"1b184a4726b0":["function () ","plotlyVisDat"]},"cur_data":"1b184a4726b0","attrs":{"1b184a4726b0":{"x":[0.00214335689835174,0.00124124281857276,0.00349619558600938,0.00335962544105655,0.00101936238107466,0.00938445633920072,0.00331910589159311,0.00681519904264322,0.00789353617985262,0.100436509578204,0.00679222559446542,0.00596895499866582,0.00197846896447904,0.00182260256528667,0.0899623705194302,0.00136704205105852,0.00287775209371337,0.0031790363521453,0.00840378339148752,0.00347814317304541,0.00157053459608822,0.00169594360027083,0.00228829021324848,0.00267131466907867,0.0604358236991351,0.0544061286573875,0.00125099301253559,0.016703558893253,0.0507375634543201,0.0309246410970174,0.00130558996779355,0.00271246234074051,0.0553419361464325,0.00117736750202503,0.0144113268806781,0.00505302016482812,0.04872986364545,0.00357097799655142,0.00505960201634217,0.00149623654183032,0.00124511721252111,0.00659750756029989,0.00130856005136366,0.00249874026052085,0.0017539055093466,0.00338377302064131,0.00134063159019197,0.00245299224868314,0.00239280200974255,0.0121992847756513,0.00522871181672481,0.00278763416265282,0.0025456325391856,0.00991747546460205,0.00247609533896567,0.00215463662286541,0.00570137655020241,0.00197210285414208,0.0101838718815764,0.00502910119834616,0.00120192369438492],"y":[0.50002572083734,0.511158154251157,0.512106750517017,0.512842872323015,0.513609287020051,0.513748904011667,0.517640358374407,0.523679819054026,0.525711919556985,0.526220391512061,0.528186595360831,0.529331426681674,0.529465142922618,0.533283218911973,0.534683719552574,0.543562148977429,0.547306290616703,0.552344119722751,0.552694455780394,0.558582624866513,0.559966879272694,0.566059711254664,0.569508004737081,0.571443112972545,0.572111655947527,0.574157170698832,0.575002045750152,0.575441674205938,0.577409004782861,0.579678803497279,0.600096833633957,0.60497673806636,0.605129213333825,0.611100056840816,0.622630171091299,0.623277244948876,0.623241873251993,0.627472497401724,0.627514223039239,0.627850161670361,0.657226075865322,0.65742368954203,0.66671155176141,0.671594535385254,0.673946696754349,0.685389377440022,0.685742837513717,0.692332799389253,0.693547980867418,0.699620923737278,0.753915291000407,0.7576642738153,0.762625527658943,0.785075210989638,0.789544034569255,0.795871177572575,0.796879314921005,0.800020249539986,0.824234751072356,0.825649604196429,0.88001870859284],"hoverinfo":"text","text":["[27]<BR> <B>{target_type=Government (Diplomatic),<BR> weapon_type=Explosives,<BR> attack_type=Bombing/Explosion}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00211 <BR>confidence: 0.5 <BR>lift: 1.67","[30]<BR> <B>{target_type=Business,<BR> weapon_type=Firearms,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00128 <BR>confidence: 0.511 <BR>lift: 1.71","[17]<BR> <B>{target_type=Government (General),<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0035 <BR>confidence: 0.512 <BR>lift: 1.71","[13]<BR> <B>{target_type=Government (General),<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00333 <BR>confidence: 0.513 <BR>lift: 1.72","[5]<BR> <B>{weapon_type=Chemical,<BR> nkill=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.514 <BR>lift: 1.72","[45]<BR> <B>{target_type=Government (General),<BR> weapon_type=Explosives,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00939 <BR>confidence: 0.514 <BR>lift: 1.72","[33]<BR> <B>{target_type=Government (General),<BR> attack_type=Hostage Taking (Kidnapping),<BR> suicide_attack=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00328 <BR>confidence: 0.518 <BR>lift: 1.73","[44]<BR> <B>{target_type=Government (General),<BR> attack_type=Bombing/Explosion,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00678 <BR>confidence: 0.524 <BR>lift: 1.75","[18]<BR> <B>{target_type=Government (General),<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00794 <BR>confidence: 0.526 <BR>lift: 1.76","[3]<BR> <B>{target_type=Police}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.1 <BR>confidence: 0.526 <BR>lift: 1.76","[59]<BR> <B>{target_type=Government (General),<BR> weapon_type=Explosives,<BR> attack_type=Bombing/Explosion,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00678 <BR>confidence: 0.528 <BR>lift: 1.77","[15]<BR> <B>{target_type=Police,<BR> attack_type=Assassination}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.006 <BR>confidence: 0.529 <BR>lift: 1.77","[61]<BR> <B>{target_type=Government (General),<BR> weapon_type=Explosives,<BR> attack_type=Assassination,<BR> suicide_attack=0,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.002 <BR>confidence: 0.529 <BR>lift: 1.77","[1]<BR> <B>{attack_type=Unarmed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00178 <BR>confidence: 0.533 <BR>lift: 1.78","[23]<BR> <B>{target_type=Police,<BR> suicide_attack=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0899 <BR>confidence: 0.535 <BR>lift: 1.79","[37]<BR> <B>{target_type=Government (General),<BR> attack_type=Assassination,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00139 <BR>confidence: 0.543 <BR>lift: 1.82","[31]<BR> <B>{target_type=Government (General),<BR> weapon_type=Firearms,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00289 <BR>confidence: 0.547 <BR>lift: 1.83","[43]<BR> <B>{target_type=Government (General),<BR> suicide_attack=1,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00322 <BR>confidence: 0.552 <BR>lift: 1.85","[16]<BR> <B>{target_type=Police,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00844 <BR>confidence: 0.553 <BR>lift: 1.85","[2]<BR> <B>{target_type=NGO}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00344 <BR>confidence: 0.559 <BR>lift: 1.87","[32]<BR> <B>{target_type=Government (General),<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00156 <BR>confidence: 0.56 <BR>lift: 1.87","[6]<BR> <B>{target_type=Telecommunication,<BR> nkill=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00167 <BR>confidence: 0.566 <BR>lift: 1.89","[42]<BR> <B>{target_type=Government (General),<BR> suicide_attack=1,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00228 <BR>confidence: 0.569 <BR>lift: 1.91","[58]<BR> <B>{target_type=Government (General),<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00267 <BR>confidence: 0.571 <BR>lift: 1.91","[22]<BR> <B>{target_type=Police,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0604 <BR>confidence: 0.572 <BR>lift: 1.91","[51]<BR> <B>{target_type=Police,<BR> suicide_attack=0,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0544 <BR>confidence: 0.574 <BR>lift: 1.92","[10]<BR> <B>{target_type=Government (Diplomatic),<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00128 <BR>confidence: 0.575 <BR>lift: 1.92","[60]<BR> <B>{target_type=Police,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=0,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0167 <BR>confidence: 0.576 <BR>lift: 1.93","[20]<BR> <B>{target_type=Police,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0508 <BR>confidence: 0.577 <BR>lift: 1.93","[50]<BR> <B>{target_type=Police,<BR> attack_type=Armed Assault,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0309 <BR>confidence: 0.58 <BR>lift: 1.94","[53]<BR> <B>{target_type=Government (General),<BR> weapon_type=Firearms,<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00133 <BR>confidence: 0.6 <BR>lift: 2.01","[9]<BR> <B>{target_type=NGO,<BR> weapon_type=Firearms}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00272 <BR>confidence: 0.605 <BR>lift: 2.02","[21]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0553 <BR>confidence: 0.605 <BR>lift: 2.03","[26]<BR> <B>{target_type=Government (Diplomatic),<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00122 <BR>confidence: 0.611 <BR>lift: 2.05","[19]<BR> <B>{target_type=Police,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0144 <BR>confidence: 0.623 <BR>lift: 2.08","[14]<BR> <B>{target_type=Police,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00505 <BR>confidence: 0.623 <BR>lift: 2.09","[49]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0487 <BR>confidence: 0.623 <BR>lift: 2.09","[34]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00355 <BR>confidence: 0.627 <BR>lift: 2.1","[36]<BR> <B>{target_type=Police,<BR> attack_type=Hostage Taking (Kidnapping),<BR> suicide_attack=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00505 <BR>confidence: 0.628 <BR>lift: 2.1","[7]<BR> <B>{target_type=NGO,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0015 <BR>confidence: 0.628 <BR>lift: 2.1","[24]<BR> <B>{target_type=NGO,<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00128 <BR>confidence: 0.657 <BR>lift: 2.2","[41]<BR> <B>{target_type=Police,<BR> suicide_attack=0,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00661 <BR>confidence: 0.657 <BR>lift: 2.2","[8]<BR> <B>{target_type=NGO,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00133 <BR>confidence: 0.667 <BR>lift: 2.23","[35]<BR> <B>{target_type=Police,<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0025 <BR>confidence: 0.672 <BR>lift: 2.25","[54]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00172 <BR>confidence: 0.674 <BR>lift: 2.26","[38]<BR> <B>{target_type=Police,<BR> weapon_type=Explosives,<BR> attack_type=Assassination}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00339 <BR>confidence: 0.685 <BR>lift: 2.29","[25]<BR> <B>{target_type=NGO,<BR> weapon_type=Firearms,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00133 <BR>confidence: 0.686 <BR>lift: 2.29","[12]<BR> <B>{target_type=Police,<BR> attack_type=Facility/Infra.}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0025 <BR>confidence: 0.692 <BR>lift: 2.32","[56]<BR> <B>{target_type=Police,<BR> weapon_type=Explosives,<BR> attack_type=Assassination,<BR> suicide_attack=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00239 <BR>confidence: 0.694 <BR>lift: 2.32","[48]<BR> <B>{target_type=Police,<BR> suicide_attack=0,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0122 <BR>confidence: 0.7 <BR>lift: 2.34","[39]<BR> <B>{target_type=Police,<BR> attack_type=Armed Assault,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00528 <BR>confidence: 0.754 <BR>lift: 2.52","[11]<BR> <B>{target_type=Police,<BR> weapon_type=Incendiary}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00278 <BR>confidence: 0.758 <BR>lift: 2.54","[55]<BR> <B>{target_type=Police,<BR> weapon_type=Explosives,<BR> attack_type=Assassination,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0025 <BR>confidence: 0.763 <BR>lift: 2.55","[46]<BR> <B>{target_type=Police,<BR> attack_type=Armed Assault,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00994 <BR>confidence: 0.785 <BR>lift: 2.63","[29]<BR> <B>{target_type=Police,<BR> weapon_type=Incendiary,<BR> nkill=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0025 <BR>confidence: 0.789 <BR>lift: 2.64","[28]<BR> <B>{target_type=Police,<BR> weapon_type=Incendiary,<BR> attack_type=Facility/Infra.}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00217 <BR>confidence: 0.796 <BR>lift: 2.66","[40]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00566 <BR>confidence: 0.797 <BR>lift: 2.67","[52]<BR> <B>{target_type=Police,<BR> weapon_type=Incendiary,<BR> attack_type=Facility/Infra.,<BR> nkill=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.002 <BR>confidence: 0.8 <BR>lift: 2.68","[47]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0102 <BR>confidence: 0.824 <BR>lift: 2.76","[57]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> attack_type=Armed Assault,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.005 <BR>confidence: 0.826 <BR>lift: 2.76","[4]<BR> <B>{weapon_type=Chemical,<BR> attack_type=Unarmed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00122 <BR>confidence: 0.88 <BR>lift: 2.95"],"mode":"markers","marker":{"colorbar":{"title":"lift"},"opacity":0.5,"size":10},"color":[1.67342007434944,1.71060718711276,1.71423519811406,1.71632828138404,1.71864764392645,1.71919752319183,1.73213656818627,1.75242273880371,1.75955198994096,1.76108468825599,1.76759523004876,1.77185654931117,1.77185654931117,1.78498141263941,1.7894762882244,1.81893486342331,1.83195460770886,1.8487307488051,1.84988982764447,1.86940620918316,1.87423048327138,1.89443782001824,1.9058395291202,1.91248008497079,1.91449110503911,1.92173402086581,1.92443308550186,1.9261928962875,1.93241433727781,1.93984387390768,2.00810408921933,2.02463169489192,2.0251839538907,2.04529120198265,2.08372980411782,2.08604420227122,2.0861256648251,2.09997813251695,2.10043071401102,2.10150427941558,2.19935209771641,2.20040871654789,2.23122676579926,2.24787771181268,2.2554792306449,2.29390167495092,2.29497610196495,2.31704317986846,2.32119558700084,2.34171882608644,2.52341122322535,2.53548496113552,2.55267468968559,2.62756309919781,2.64224222265701,2.6638115469236,2.66701324349442,2.67747211895911,2.75888174419773,2.76344599433853,2.94521933085502],"colors":["#BBDF27FF","#7AD151FF","#43BF71FF","#22A884FF","#21908CFF","#2A788EFF","#35608DFF","#414487FF","#482576FF","#440154FF"],"alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"scatter"}},"layout":{"margin":{"b":40,"l":60,"t":25,"r":10},"hovermode":"closest","xaxis":{"domain":[0,1],"automargin":true,"title":"support"},"yaxis":{"domain":[0,1],"automargin":true,"title":"confidence"},"title":"Association Rules in Taliban group","showlegend":false,"legend":{"yanchor":"top","y":0.5}},"source":"A","config":{"modeBarButtonsToAdd":[{"name":"Collaborate","icon":{"width":1000,"ascent":500,"descent":-50,"path":"M487 375c7-10 9-23 5-36l-79-259c-3-12-11-23-22-31-11-8-22-12-35-12l-263 0c-15 0-29 5-43 15-13 10-23 23-28 37-5 13-5 25-1 37 0 0 0 3 1 7 1 5 1 8 1 11 0 2 0 4-1 6 0 3-1 5-1 6 1 2 2 4 3 6 1 2 2 4 4 6 2 3 4 5 5 7 5 7 9 16 13 26 4 10 7 19 9 26 0 2 0 5 0 9-1 4-1 6 0 8 0 2 2 5 4 8 3 3 5 5 5 7 4 6 8 15 12 26 4 11 7 19 7 26 1 1 0 4 0 9-1 4-1 7 0 8 1 2 3 5 6 8 4 4 6 6 6 7 4 5 8 13 13 24 4 11 7 20 7 28 1 1 0 4 0 7-1 3-1 6-1 7 0 2 1 4 3 6 1 1 3 4 5 6 2 3 3 5 5 6 1 2 3 5 4 9 2 3 3 7 5 10 1 3 2 6 4 10 2 4 4 7 6 9 2 3 4 5 7 7 3 2 7 3 11 3 3 0 8 0 13-1l0-1c7 2 12 2 14 2l218 0c14 0 25-5 32-16 8-10 10-23 6-37l-79-259c-7-22-13-37-20-43-7-7-19-10-37-10l-248 0c-5 0-9-2-11-5-2-3-2-7 0-12 4-13 18-20 41-20l264 0c5 0 10 2 16 5 5 3 8 6 10 11l85 282c2 5 2 10 2 17 7-3 13-7 17-13z m-304 0c-1-3-1-5 0-7 1-1 3-2 6-2l174 0c2 0 4 1 7 2 2 2 4 4 5 7l6 18c0 3 0 5-1 7-1 1-3 2-6 2l-173 0c-3 0-5-1-8-2-2-2-4-4-4-7z m-24-73c-1-3-1-5 0-7 2-2 3-2 6-2l174 0c2 0 5 0 7 2 3 2 4 4 5 7l6 18c1 2 0 5-1 6-1 2-3 3-5 3l-174 0c-3 0-5-1-7-3-3-1-4-4-5-6z"},"click":"function(gd) { \n // is this being viewed in RStudio?\n if (location.search == '?viewer_pane=1') {\n alert('To learn about plotly for collaboration, visit:\\n https://cpsievert.github.io/plotly_book/plot-ly-for-collaboration.html');\n } else {\n window.open('https://cpsievert.github.io/plotly_book/plot-ly-for-collaboration.html', '_blank');\n }\n }"}],"cloud":false},"data":[{"x":[0.00214335689835174,0.00124124281857276,0.00349619558600938,0.00335962544105655,0.00101936238107466,0.00938445633920072,0.00331910589159311,0.00681519904264322,0.00789353617985262,0.100436509578204,0.00679222559446542,0.00596895499866582,0.00197846896447904,0.00182260256528667,0.0899623705194302,0.00136704205105852,0.00287775209371337,0.0031790363521453,0.00840378339148752,0.00347814317304541,0.00157053459608822,0.00169594360027083,0.00228829021324848,0.00267131466907867,0.0604358236991351,0.0544061286573875,0.00125099301253559,0.016703558893253,0.0507375634543201,0.0309246410970174,0.00130558996779355,0.00271246234074051,0.0553419361464325,0.00117736750202503,0.0144113268806781,0.00505302016482812,0.04872986364545,0.00357097799655142,0.00505960201634217,0.00149623654183032,0.00124511721252111,0.00659750756029989,0.00130856005136366,0.00249874026052085,0.0017539055093466,0.00338377302064131,0.00134063159019197,0.00245299224868314,0.00239280200974255,0.0121992847756513,0.00522871181672481,0.00278763416265282,0.0025456325391856,0.00991747546460205,0.00247609533896567,0.00215463662286541,0.00570137655020241,0.00197210285414208,0.0101838718815764,0.00502910119834616,0.00120192369438492],"y":[0.50002572083734,0.511158154251157,0.512106750517017,0.512842872323015,0.513609287020051,0.513748904011667,0.517640358374407,0.523679819054026,0.525711919556985,0.526220391512061,0.528186595360831,0.529331426681674,0.529465142922618,0.533283218911973,0.534683719552574,0.543562148977429,0.547306290616703,0.552344119722751,0.552694455780394,0.558582624866513,0.559966879272694,0.566059711254664,0.569508004737081,0.571443112972545,0.572111655947527,0.574157170698832,0.575002045750152,0.575441674205938,0.577409004782861,0.579678803497279,0.600096833633957,0.60497673806636,0.605129213333825,0.611100056840816,0.622630171091299,0.623277244948876,0.623241873251993,0.627472497401724,0.627514223039239,0.627850161670361,0.657226075865322,0.65742368954203,0.66671155176141,0.671594535385254,0.673946696754349,0.685389377440022,0.685742837513717,0.692332799389253,0.693547980867418,0.699620923737278,0.753915291000407,0.7576642738153,0.762625527658943,0.785075210989638,0.789544034569255,0.795871177572575,0.796879314921005,0.800020249539986,0.824234751072356,0.825649604196429,0.88001870859284],"hoverinfo":["text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text"],"text":["[27]<BR> <B>{target_type=Government (Diplomatic),<BR> weapon_type=Explosives,<BR> attack_type=Bombing/Explosion}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00211 <BR>confidence: 0.5 <BR>lift: 1.67","[30]<BR> <B>{target_type=Business,<BR> weapon_type=Firearms,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00128 <BR>confidence: 0.511 <BR>lift: 1.71","[17]<BR> <B>{target_type=Government (General),<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0035 <BR>confidence: 0.512 <BR>lift: 1.71","[13]<BR> <B>{target_type=Government (General),<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00333 <BR>confidence: 0.513 <BR>lift: 1.72","[5]<BR> <B>{weapon_type=Chemical,<BR> nkill=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.514 <BR>lift: 1.72","[45]<BR> <B>{target_type=Government (General),<BR> weapon_type=Explosives,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00939 <BR>confidence: 0.514 <BR>lift: 1.72","[33]<BR> <B>{target_type=Government (General),<BR> attack_type=Hostage Taking (Kidnapping),<BR> suicide_attack=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00328 <BR>confidence: 0.518 <BR>lift: 1.73","[44]<BR> <B>{target_type=Government (General),<BR> attack_type=Bombing/Explosion,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00678 <BR>confidence: 0.524 <BR>lift: 1.75","[18]<BR> <B>{target_type=Government (General),<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00794 <BR>confidence: 0.526 <BR>lift: 1.76","[3]<BR> <B>{target_type=Police}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.1 <BR>confidence: 0.526 <BR>lift: 1.76","[59]<BR> <B>{target_type=Government (General),<BR> weapon_type=Explosives,<BR> attack_type=Bombing/Explosion,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00678 <BR>confidence: 0.528 <BR>lift: 1.77","[15]<BR> <B>{target_type=Police,<BR> attack_type=Assassination}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.006 <BR>confidence: 0.529 <BR>lift: 1.77","[61]<BR> <B>{target_type=Government (General),<BR> weapon_type=Explosives,<BR> attack_type=Assassination,<BR> suicide_attack=0,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.002 <BR>confidence: 0.529 <BR>lift: 1.77","[1]<BR> <B>{attack_type=Unarmed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00178 <BR>confidence: 0.533 <BR>lift: 1.78","[23]<BR> <B>{target_type=Police,<BR> suicide_attack=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0899 <BR>confidence: 0.535 <BR>lift: 1.79","[37]<BR> <B>{target_type=Government (General),<BR> attack_type=Assassination,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00139 <BR>confidence: 0.543 <BR>lift: 1.82","[31]<BR> <B>{target_type=Government (General),<BR> weapon_type=Firearms,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00289 <BR>confidence: 0.547 <BR>lift: 1.83","[43]<BR> <B>{target_type=Government (General),<BR> suicide_attack=1,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00322 <BR>confidence: 0.552 <BR>lift: 1.85","[16]<BR> <B>{target_type=Police,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00844 <BR>confidence: 0.553 <BR>lift: 1.85","[2]<BR> <B>{target_type=NGO}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00344 <BR>confidence: 0.559 <BR>lift: 1.87","[32]<BR> <B>{target_type=Government (General),<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00156 <BR>confidence: 0.56 <BR>lift: 1.87","[6]<BR> <B>{target_type=Telecommunication,<BR> nkill=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00167 <BR>confidence: 0.566 <BR>lift: 1.89","[42]<BR> <B>{target_type=Government (General),<BR> suicide_attack=1,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00228 <BR>confidence: 0.569 <BR>lift: 1.91","[58]<BR> <B>{target_type=Government (General),<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00267 <BR>confidence: 0.571 <BR>lift: 1.91","[22]<BR> <B>{target_type=Police,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0604 <BR>confidence: 0.572 <BR>lift: 1.91","[51]<BR> <B>{target_type=Police,<BR> suicide_attack=0,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0544 <BR>confidence: 0.574 <BR>lift: 1.92","[10]<BR> <B>{target_type=Government (Diplomatic),<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00128 <BR>confidence: 0.575 <BR>lift: 1.92","[60]<BR> <B>{target_type=Police,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=0,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0167 <BR>confidence: 0.576 <BR>lift: 1.93","[20]<BR> <B>{target_type=Police,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0508 <BR>confidence: 0.577 <BR>lift: 1.93","[50]<BR> <B>{target_type=Police,<BR> attack_type=Armed Assault,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0309 <BR>confidence: 0.58 <BR>lift: 1.94","[53]<BR> <B>{target_type=Government (General),<BR> weapon_type=Firearms,<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00133 <BR>confidence: 0.6 <BR>lift: 2.01","[9]<BR> <B>{target_type=NGO,<BR> weapon_type=Firearms}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00272 <BR>confidence: 0.605 <BR>lift: 2.02","[21]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0553 <BR>confidence: 0.605 <BR>lift: 2.03","[26]<BR> <B>{target_type=Government (Diplomatic),<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00122 <BR>confidence: 0.611 <BR>lift: 2.05","[19]<BR> <B>{target_type=Police,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0144 <BR>confidence: 0.623 <BR>lift: 2.08","[14]<BR> <B>{target_type=Police,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00505 <BR>confidence: 0.623 <BR>lift: 2.09","[49]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0487 <BR>confidence: 0.623 <BR>lift: 2.09","[34]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00355 <BR>confidence: 0.627 <BR>lift: 2.1","[36]<BR> <B>{target_type=Police,<BR> attack_type=Hostage Taking (Kidnapping),<BR> suicide_attack=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00505 <BR>confidence: 0.628 <BR>lift: 2.1","[7]<BR> <B>{target_type=NGO,<BR> attack_type=Hostage Taking (Kidnapping)}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0015 <BR>confidence: 0.628 <BR>lift: 2.1","[24]<BR> <B>{target_type=NGO,<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00128 <BR>confidence: 0.657 <BR>lift: 2.2","[41]<BR> <B>{target_type=Police,<BR> suicide_attack=0,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00661 <BR>confidence: 0.657 <BR>lift: 2.2","[8]<BR> <B>{target_type=NGO,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00133 <BR>confidence: 0.667 <BR>lift: 2.23","[35]<BR> <B>{target_type=Police,<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0025 <BR>confidence: 0.672 <BR>lift: 2.25","[54]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00172 <BR>confidence: 0.674 <BR>lift: 2.26","[38]<BR> <B>{target_type=Police,<BR> weapon_type=Explosives,<BR> attack_type=Assassination}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00339 <BR>confidence: 0.685 <BR>lift: 2.29","[25]<BR> <B>{target_type=NGO,<BR> weapon_type=Firearms,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00133 <BR>confidence: 0.686 <BR>lift: 2.29","[12]<BR> <B>{target_type=Police,<BR> attack_type=Facility/Infra.}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0025 <BR>confidence: 0.692 <BR>lift: 2.32","[56]<BR> <B>{target_type=Police,<BR> weapon_type=Explosives,<BR> attack_type=Assassination,<BR> suicide_attack=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00239 <BR>confidence: 0.694 <BR>lift: 2.32","[48]<BR> <B>{target_type=Police,<BR> suicide_attack=0,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0122 <BR>confidence: 0.7 <BR>lift: 2.34","[39]<BR> <B>{target_type=Police,<BR> attack_type=Armed Assault,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00528 <BR>confidence: 0.754 <BR>lift: 2.52","[11]<BR> <B>{target_type=Police,<BR> weapon_type=Incendiary}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00278 <BR>confidence: 0.758 <BR>lift: 2.54","[55]<BR> <B>{target_type=Police,<BR> weapon_type=Explosives,<BR> attack_type=Assassination,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0025 <BR>confidence: 0.763 <BR>lift: 2.55","[46]<BR> <B>{target_type=Police,<BR> attack_type=Armed Assault,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00994 <BR>confidence: 0.785 <BR>lift: 2.63","[29]<BR> <B>{target_type=Police,<BR> weapon_type=Incendiary,<BR> nkill=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0025 <BR>confidence: 0.789 <BR>lift: 2.64","[28]<BR> <B>{target_type=Police,<BR> weapon_type=Incendiary,<BR> attack_type=Facility/Infra.}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00217 <BR>confidence: 0.796 <BR>lift: 2.66","[40]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00566 <BR>confidence: 0.797 <BR>lift: 2.67","[52]<BR> <B>{target_type=Police,<BR> weapon_type=Incendiary,<BR> attack_type=Facility/Infra.,<BR> nkill=0}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.002 <BR>confidence: 0.8 <BR>lift: 2.68","[47]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.0102 <BR>confidence: 0.824 <BR>lift: 2.76","[57]<BR> <B>{target_type=Police,<BR> weapon_type=Firearms,<BR> attack_type=Armed Assault,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.005 <BR>confidence: 0.826 <BR>lift: 2.76","[4]<BR> <B>{weapon_type=Chemical,<BR> attack_type=Unarmed Assault}<\/B><BR> => <B>{group_name=Taliban}<\/B> <BR><BR>support: 0.00122 <BR>confidence: 0.88 <BR>lift: 2.95"],"mode":"markers","marker":{"colorbar":{"title":"lift","ticklen":2},"cmin":1.67342007434944,"cmax":2.94521933085502,"colorscale":[["0","rgba(187,223,39,1)"],["0.0329153089101742","rgba(169,219,55,1)"],["0.0359942409214528","rgba(168,219,56,1)"],["0.0649216372792624","rgba(151,215,67,1)"],["0.0740487582592846","rgba(146,214,70,1)"],["0.0825593395252838","rgba(140,213,73,1)"],["0.11441647597254","rgba(121,208,82,1)"],["0.138300296195033","rgba(111,205,90,1)"],["0.157894736842105","rgba(102,201,96,1)"],["0.185359231411863","rgba(89,197,103,1)"],["0.195246179966044","rgba(84,195,106,1)"],["0.201198059461277","rgba(80,194,108,1)"],["0.263157894736842","rgba(58,182,120,1)"],["0.284492620778353","rgba(52,178,124,1)"],["0.324441240086518","rgba(38,170,131,1)"],["0.335575246432511","rgba(34,168,132,1)"],["0.413533834586466","rgba(34,151,138,1)"],["0.445142707515056","rgba(33,144,140,1)"],["0.487876995860437","rgba(38,135,141,1)"],["0.507705367637456","rgba(40,130,141,1)"],["0.668337510442772","rgba(53,96,141,1)"],["0.720788925927664","rgba(60,83,138,1)"],["0.778732545649839","rgba(65,68,135,1)"],["0.821479374110953","rgba(69,56,128,1)"],["1","rgba(68,1,84,1)"]],"showscale":false,"color":[1.67342007434944,1.71060718711276,1.71423519811406,1.71632828138404,1.71864764392645,1.71919752319183,1.73213656818627,1.75242273880371,1.75955198994096,1.76108468825599,1.76759523004876,1.77185654931117,1.77185654931117,1.78498141263941,1.7894762882244,1.81893486342331,1.83195460770886,1.8487307488051,1.84988982764447,1.86940620918316,1.87423048327138,1.89443782001824,1.9058395291202,1.91248008497079,1.91449110503911,1.92173402086581,1.92443308550186,1.9261928962875,1.93241433727781,1.93984387390768,2.00810408921933,2.02463169489192,2.0251839538907,2.04529120198265,2.08372980411782,2.08604420227122,2.0861256648251,2.09997813251695,2.10043071401102,2.10150427941558,2.19935209771641,2.20040871654789,2.23122676579926,2.24787771181268,2.2554792306449,2.29390167495092,2.29497610196495,2.31704317986846,2.32119558700084,2.34171882608644,2.52341122322535,2.53548496113552,2.55267468968559,2.62756309919781,2.64224222265701,2.6638115469236,2.66701324349442,2.67747211895911,2.75888174419773,2.76344599433853,2.94521933085502],"opacity":0.5,"size":10,"line":{"colorbar":{"title":"","ticklen":2},"cmin":1.67342007434944,"cmax":2.94521933085502,"colorscale":[["0","rgba(187,223,39,1)"],["0.0329153089101742","rgba(169,219,55,1)"],["0.0359942409214528","rgba(168,219,56,1)"],["0.0649216372792624","rgba(151,215,67,1)"],["0.0740487582592846","rgba(146,214,70,1)"],["0.0825593395252838","rgba(140,213,73,1)"],["0.11441647597254","rgba(121,208,82,1)"],["0.138300296195033","rgba(111,205,90,1)"],["0.157894736842105","rgba(102,201,96,1)"],["0.185359231411863","rgba(89,197,103,1)"],["0.195246179966044","rgba(84,195,106,1)"],["0.201198059461277","rgba(80,194,108,1)"],["0.263157894736842","rgba(58,182,120,1)"],["0.284492620778353","rgba(52,178,124,1)"],["0.324441240086518","rgba(38,170,131,1)"],["0.335575246432511","rgba(34,168,132,1)"],["0.413533834586466","rgba(34,151,138,1)"],["0.445142707515056","rgba(33,144,140,1)"],["0.487876995860437","rgba(38,135,141,1)"],["0.507705367637456","rgba(40,130,141,1)"],["0.668337510442772","rgba(53,96,141,1)"],["0.720788925927664","rgba(60,83,138,1)"],["0.778732545649839","rgba(65,68,135,1)"],["0.821479374110953","rgba(69,56,128,1)"],["1","rgba(68,1,84,1)"]],"showscale":false,"color":[1.67342007434944,1.71060718711276,1.71423519811406,1.71632828138404,1.71864764392645,1.71919752319183,1.73213656818627,1.75242273880371,1.75955198994096,1.76108468825599,1.76759523004876,1.77185654931117,1.77185654931117,1.78498141263941,1.7894762882244,1.81893486342331,1.83195460770886,1.8487307488051,1.84988982764447,1.86940620918316,1.87423048327138,1.89443782001824,1.9058395291202,1.91248008497079,1.91449110503911,1.92173402086581,1.92443308550186,1.9261928962875,1.93241433727781,1.93984387390768,2.00810408921933,2.02463169489192,2.0251839538907,2.04529120198265,2.08372980411782,2.08604420227122,2.0861256648251,2.09997813251695,2.10043071401102,2.10150427941558,2.19935209771641,2.20040871654789,2.23122676579926,2.24787771181268,2.2554792306449,2.29390167495092,2.29497610196495,2.31704317986846,2.32119558700084,2.34171882608644,2.52341122322535,2.53548496113552,2.55267468968559,2.62756309919781,2.64224222265701,2.6638115469236,2.66701324349442,2.67747211895911,2.75888174419773,2.76344599433853,2.94521933085502]}},"type":"scatter","xaxis":"x","yaxis":"y","frame":null},{"x":[0.00101936238107466,0.100436509578204],"y":[0.50002572083734,0.88001870859284],"type":"scatter","mode":"markers","opacity":0,"hoverinfo":"none","showlegend":false,"marker":{"colorbar":{"title":"","ticklen":2,"len":0.5,"lenmode":"fraction","y":1,"yanchor":"top"},"cmin":1.67342007434944,"cmax":2.94521933085502,"colorscale":[["0","rgba(187,223,39,1)"],["0.0329153089101742","rgba(169,219,55,1)"],["0.0359942409214528","rgba(168,219,56,1)"],["0.0649216372792624","rgba(151,215,67,1)"],["0.0740487582592846","rgba(146,214,70,1)"],["0.0825593395252838","rgba(140,213,73,1)"],["0.11441647597254","rgba(121,208,82,1)"],["0.138300296195033","rgba(111,205,90,1)"],["0.157894736842105","rgba(102,201,96,1)"],["0.185359231411863","rgba(89,197,103,1)"],["0.195246179966044","rgba(84,195,106,1)"],["0.201198059461277","rgba(80,194,108,1)"],["0.263157894736842","rgba(58,182,120,1)"],["0.284492620778353","rgba(52,178,124,1)"],["0.324441240086518","rgba(38,170,131,1)"],["0.335575246432511","rgba(34,168,132,1)"],["0.413533834586466","rgba(34,151,138,1)"],["0.445142707515056","rgba(33,144,140,1)"],["0.487876995860437","rgba(38,135,141,1)"],["0.507705367637456","rgba(40,130,141,1)"],["0.668337510442772","rgba(53,96,141,1)"],["0.720788925927664","rgba(60,83,138,1)"],["0.778732545649839","rgba(65,68,135,1)"],["0.821479374110953","rgba(69,56,128,1)"],["1","rgba(68,1,84,1)"]],"showscale":true,"color":[1.67342007434944,2.94521933085502],"line":{"color":"rgba(255,127,14,1)"}},"xaxis":"x","yaxis":"y","frame":null}],"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.2,"selected":{"opacity":1},"debounce":0},"base_url":"https://plot.ly"},"evals":["config.modeBarButtonsToAdd.0.click"],"jsHooks":[]}</script>
<p class="caption">
Figure 5.3: Association Rules in Taliban group
</p>
</div>
<p>From the plot above, we can identify many interesting patterns with confidence above 0.55 with high support such as attacks on NGO and government officials however most patterns indicate an attack on police only. Let us have a detailed look at all the patterns with network graph.</p>
</div>
<div id="network-graph-taliban" class="section level3">
<h3><span class="header-section-number">5.4.3</span> Network graph (Taliban)</h3>
<div class="figure" style="text-align: center"><span id="fig:unnamed-chunk-46"></span>
<div id="htmlwidget-525df285bad1b05daeaa" style="width:100%;height:672px;" class="visNetwork html-widget"></div>
<script type="application/json" data-for="htmlwidget-525df285bad1b05daeaa">{"x":{"nodes":{"id":["9","12","16","17","21","23","25","30","31","32","33","38","39","40","41","44","45","46","47","48","49","50","51","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20","assoc21","assoc22","assoc23","assoc24","assoc25","assoc26","assoc27","assoc28","assoc29","assoc30","assoc31","assoc32","assoc33","assoc34","assoc35","assoc36","assoc37","assoc38","assoc39","assoc40","assoc41","assoc42","assoc43","assoc44","assoc45","assoc46","assoc47","assoc48","assoc49","assoc50","assoc51","assoc52","assoc53","assoc54","assoc55","assoc56","assoc57","assoc58","assoc59","assoc60","assoc61"],"value":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0.00177718538265023,0.00344329667888482,0.100410974119738,0.00122181495057203,0.00105520382094857,0.00166611129623459,0.00149950016661113,0.00133288903698767,0.00272131511718316,0.00127735199377985,0.00277685216039098,0.00249916694435188,0.00333222259246918,0.00505387093191158,0.00599800066644452,0.00844163056758858,0.00349883372209264,0.00794179717871821,0.0143840941908253,0.0507608574919471,0.0553148950349883,0.0604243030101077,0.08991447295346,0.00127735199377985,0.00133288903698767,0.00122181495057203,0.00211040764189715,0.00216594468510496,0.00249916694435188,0.00127735199377985,0.00288792624680662,0.00155503720981895,0.00327668554926136,0.00355437076530046,0.00249916694435188,0.00505387093191158,0.00138842608019549,0.003387759635677,0.00527601910474286,0.0056647784071976,0.00660890814173053,0.0022770187715206,0.00322114850605354,0.00677551927135399,0.00938576030212152,0.00994113073419971,0.010163278907031,0.0121626124625125,0.0487059868932578,0.0309341330667555,0.0543707653004554,0.00199933355548151,0.00133288903698767,0.00172164833944241,0.00249916694435188,0.00238809285793624,0.00499833388870377,0.00266577807397534,0.00677551927135399,0.0167166500055537,0.00199933355548151],"title":["group_name=Taliban","target_type=Business","target_type=Government (Diplomatic)","target_type=Government (General)","target_type=NGO","target_type=Police","target_type=Telecommunication","weapon_type=Chemical","weapon_type=Explosives","weapon_type=Firearms","weapon_type=Incendiary","attack_type=Armed Assault","attack_type=Assassination","attack_type=Bombing/Explosion","attack_type=Facility/Infra.","attack_type=Hostage Taking (Kidnapping)","attack_type=Unarmed Assault","suicide_attack=0","suicide_attack=1","nkill=0","nkill=1 to 5","nkill=11 to 50","nkill=6 to 10","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20","assoc21","assoc22","assoc23","assoc24","assoc25","assoc26","assoc27","assoc28","assoc29","assoc30","assoc31","assoc32","assoc33","assoc34","assoc35","assoc36","assoc37","assoc38","assoc39","assoc40","assoc41","assoc42","assoc43","assoc44","assoc45","assoc46","assoc47","assoc48","assoc49","assoc50","assoc51","assoc52","assoc53","assoc54","assoc55","assoc56","assoc57","assoc58","assoc59","assoc60","assoc61"],"name":["9","12","16","17","21","23","25","30","31","32","33","38","39","40","41","44","45","46","47","48","49","50","51","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20","assoc21","assoc22","assoc23","assoc24","assoc25","assoc26","assoc27","assoc28","assoc29","assoc30","assoc31","assoc32","assoc33","assoc34","assoc35","assoc36","assoc37","assoc38","assoc39","assoc40","assoc41","assoc42","assoc43","assoc44","assoc45","assoc46","assoc47","assoc48","assoc49","assoc50","assoc51","assoc52","assoc53","assoc54","assoc55","assoc56","assoc57","assoc58","assoc59","assoc60","assoc61"],"label":["group_name=Taliban","target_type=Business","target_type=Government (Diplomatic)","target_type=Government (General)","target_type=NGO","target_type=Police","target_type=Telecommunication","weapon_type=Chemical","weapon_type=Explosives","weapon_type=Firearms","weapon_type=Incendiary","attack_type=Armed Assault","attack_type=Assassination","attack_type=Bombing/Explosion","attack_type=Facility/Infra.","attack_type=Hostage Taking (Kidnapping)","attack_type=Unarmed Assault","suicide_attack=0","suicide_attack=1","nkill=0","nkill=1 to 5","nkill=11 to 50","nkill=6 to 10","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"support":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0.00177718538265023,0.00344329667888482,0.100410974119738,0.00122181495057203,0.00105520382094857,0.00166611129623459,0.00149950016661113,0.00133288903698767,0.00272131511718316,0.00127735199377985,0.00277685216039098,0.00249916694435188,0.00333222259246918,0.00505387093191158,0.00599800066644452,0.00844163056758858,0.00349883372209264,0.00794179717871821,0.0143840941908253,0.0507608574919471,0.0553148950349883,0.0604243030101077,0.08991447295346,0.00127735199377985,0.00133288903698767,0.00122181495057203,0.00211040764189715,0.00216594468510496,0.00249916694435188,0.00127735199377985,0.00288792624680662,0.00155503720981895,0.00327668554926136,0.00355437076530046,0.00249916694435188,0.00505387093191158,0.00138842608019549,0.003387759635677,0.00527601910474286,0.0056647784071976,0.00660890814173053,0.0022770187715206,0.00322114850605354,0.00677551927135399,0.00938576030212152,0.00994113073419971,0.010163278907031,0.0121626124625125,0.0487059868932578,0.0309341330667555,0.0543707653004554,0.00199933355548151,0.00133288903698767,0.00172164833944241,0.00249916694435188,0.00238809285793624,0.00499833388870377,0.00266577807397534,0.00677551927135399,0.0167166500055537,0.00199933355548151],"confidence":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0.533333333333333,0.558558558558559,0.526193247962747,0.88,0.513513513513513,0.566037735849057,0.627906976744186,0.666666666666667,0.604938271604938,0.575,0.757575757575758,0.692307692307692,0.512820512820513,0.623287671232877,0.529411764705882,0.552727272727273,0.51219512195122,0.525735294117647,0.622596153846154,0.577384712571068,0.605103280680437,0.572029442691903,0.534676354029062,0.657142857142857,0.685714285714286,0.611111111111111,0.5,0.795918367346939,0.789473684210526,0.511111111111111,0.547368421052632,0.56,0.517543859649123,0.627450980392157,0.671641791044776,0.627586206896552,0.543478260869565,0.685393258426966,0.753968253968254,0.796875,0.657458563535912,0.569444444444444,0.552380952380952,0.523605150214592,0.513677811550152,0.785087719298246,0.824324324324324,0.699680511182109,0.623312011371713,0.579604578563996,0.574193548387097,0.8,0.6,0.673913043478261,0.76271186440678,0.693548387096774,0.825688073394495,0.571428571428571,0.528138528138528,0.575525812619503,0.529411764705882],"lift":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1.78498141263941,1.86940620918316,1.76108468825599,2.94521933085502,1.71864764392645,1.89443782001824,2.10150427941558,2.23122676579926,2.02463169489192,1.92443308550186,2.53548496113552,2.31704317986846,1.71632828138404,2.08604420227122,1.77185654931117,1.84988982764447,1.71423519811406,1.75955198994096,2.08372980411782,1.93241433727781,2.0251839538907,1.91449110503911,1.7894762882244,2.19935209771641,2.29497610196495,2.04529120198265,1.67342007434944,2.6638115469236,2.64224222265701,1.71060718711276,1.83195460770886,1.87423048327138,1.73213656818627,2.09997813251695,2.24787771181268,2.10043071401102,1.81893486342331,2.29390167495092,2.52341122322535,2.66701324349442,2.20040871654789,1.9058395291202,1.8487307488051,1.75242273880371,1.71919752319183,2.62756309919781,2.75888174419773,2.34171882608644,2.0861256648251,1.93984387390768,1.92173402086581,2.67747211895911,2.00810408921933,2.2554792306449,2.55267468968559,2.32119558700084,2.76344599433853,1.91248008497079,1.76759523004876,1.9261928962875,1.77185654931117],"count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32,62,1808,22,19,30,27,24,49,23,50,45,60,91,108,152,63,143,259,914,996,1088,1619,23,24,22,38,39,45,23,52,28,59,64,45,91,25,61,95,102,119,41,58,122,169,179,183,219,877,557,979,36,24,31,45,43,90,48,122,301,36],"order":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,6]},"edges":{"from":["45","21","23","30","45","30","48","25","48","21","44","21","38","21","32","16","47","23","33","23","41","17","44","23","44","23","39","23","50","17","51","17","47","23","51","23","38","23","32","23","49","23","46","21","44","48","21","32","38","16","40","47","16","31","40","23","33","41","23","33","48","12","32","44","17","32","44","17","44","49","17","44","46","23","32","44","23","44","49","23","44","46","17","39","47","23","31","39","23","38","50","23","32","50","23","46","50","17","47","51","17","47","49","17","40","49","17","31","49","23","38","51","23","32","51","23","46","51","23","32","38","23","38","49","23","46","49","23","33","41","48","17","32","44","49","23","32","44","49","23","31","39","49","23","31","39","46","23","32","38","50","17","40","47","49","17","31","40","49","23","40","46","49","17","31","39","46","49","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20","assoc21","assoc22","assoc23","assoc24","assoc25","assoc26","assoc27","assoc28","assoc29","assoc30","assoc31","assoc32","assoc33","assoc34","assoc35","assoc36","assoc37","assoc38","assoc39","assoc40","assoc41","assoc42","assoc43","assoc44","assoc45","assoc46","assoc47","assoc48","assoc49","assoc50","assoc51","assoc52","assoc53","assoc54","assoc55","assoc56","assoc57","assoc58","assoc59","assoc60","assoc61"],"to":["assoc1","assoc2","assoc3","assoc4","assoc4","assoc5","assoc5","assoc6","assoc6","assoc7","assoc7","assoc8","assoc8","assoc9","assoc9","assoc10","assoc10","assoc11","assoc11","assoc12","assoc12","assoc13","assoc13","assoc14","assoc14","assoc15","assoc15","assoc16","assoc16","assoc17","assoc17","assoc18","assoc18","assoc19","assoc19","assoc20","assoc20","assoc21","assoc21","assoc22","assoc22","assoc23","assoc23","assoc24","assoc24","assoc24","assoc25","assoc25","assoc25","assoc26","assoc26","assoc26","assoc27","assoc27","assoc27","assoc28","assoc28","assoc28","assoc29","assoc29","assoc29","assoc30","assoc30","assoc30","assoc31","assoc31","assoc31","assoc32","assoc32","assoc32","assoc33","assoc33","assoc33","assoc34","assoc34","assoc34","assoc35","assoc35","assoc35","assoc36","assoc36","assoc36","assoc37","assoc37","assoc37","assoc38","assoc38","assoc38","assoc39","assoc39","assoc39","assoc40","assoc40","assoc40","assoc41","assoc41","assoc41","assoc42","assoc42","assoc42","assoc43","assoc43","assoc43","assoc44","assoc44","assoc44","assoc45","assoc45","assoc45","assoc46","assoc46","assoc46","assoc47","assoc47","assoc47","assoc48","assoc48","assoc48","assoc49","assoc49","assoc49","assoc50","assoc50","assoc50","assoc51","assoc51","assoc51","assoc52","assoc52","assoc52","assoc52","assoc53","assoc53","assoc53","assoc53","assoc54","assoc54","assoc54","assoc54","assoc55","assoc55","assoc55","assoc55","assoc56","assoc56","assoc56","assoc56","assoc57","assoc57","assoc57","assoc57","assoc58","assoc58","assoc58","assoc58","assoc59","assoc59","assoc59","assoc59","assoc60","assoc60","assoc60","assoc60","assoc61","assoc61","assoc61","assoc61","assoc61","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9","9"]},"nodesToDataframe":true,"edgesToDataframe":true,"options":{"width":"100%","height":"100%","nodes":{"shape":"dot","size":5,"color":"#9cb7f4"},"manipulation":{"enabled":false},"edges":{"color":"#ffd596","smooth":true,"arrows":"from"},"physics":{"solver":"barnesHut","maxVelocity":35,"forceAtlas2Based":{"gravitationalConstant":-6000}}},"groups":null,"width":null,"height":null,"idselection":{"enabled":true,"style":"width: 150px; height: 26px","useLabels":true,"main":"Select by id"},"byselection":{"enabled":false,"style":"width: 150px; height: 26px","multiple":false,"hideColor":"rgba(200,200,200,0.5)"},"main":null,"submain":null,"footer":null,"background":"rgba(0, 0, 0, 0)","events":[],"legend":{"width":0.2,"useGroups":true,"position":"left","ncol":1,"stepX":100,"stepY":100,"zoom":true},"highlight":{"enabled":true,"hoverNearest":false,"degree":1,"algorithm":"all","hideColor":"rgba(200,200,200,0.5)","labelOnly":true},"collapse":{"enabled":false,"fit":false,"resetHighlight":true,"clusterOptions":null}},"evals":[],"jsHooks":[]}</script>
<p class="caption">
Figure 5.4: Network graph of discovered patterns- Taliban group
</p>
</div>
</div>
</div>
<div id="boko-haram" class="section level2">
<h2><span class="header-section-number">5.5</span> Boko Haram</h2>
<div id="apriori-model-summary-2" class="section level3">
<h3><span class="header-section-number">5.5.1</span> Apriori model summary</h3>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">params <-<span class="st"> </span><span class="kw">list</span>(<span class="dt">support =</span> <span class="fl">0.001</span>, <span class="dt">confidence =</span> <span class="fl">0.5</span>, <span class="dt">minlen =</span> <span class="dv">2</span>)
group_Boko_Haram <-<span class="st"> </span><span class="kw">list</span>(<span class="dt">rhs=</span><span class="st">'group_name=Boko Haram'</span>, <span class="dt">default=</span><span class="st">"lhs"</span>)
rules <-<span class="st"> </span><span class="kw">apriori</span>(<span class="dt">data =</span> tmp, <span class="dt">parameter=</span> params, <span class="dt">appearance =</span> group_Boko_Haram)</code></pre></div>
<pre><code>Apriori
Parameter specification:
confidence minval smax arem aval originalSupport maxtime support minlen
0.5 0.1 1 none FALSE TRUE 5 0.001 2
maxlen target ext
10 rules FALSE
Algorithmic control:
filter tree heap memopt load sort verbose
0.1 TRUE TRUE FALSE TRUE 2 TRUE
Absolute minimum support count: 18
set item appearances ...[1 item(s)] done [0.00s].
set transactions ...[52 item(s), 18006 transaction(s)] done [0.01s].
sorting and recoding items ... [48 item(s)] done [0.00s].
creating transaction tree ... done [0.00s].
checking subsets of size 1 2 3 4 5 6 done [0.02s].
writing ... [63 rule(s)] done [0.00s].
creating S4 object ... done [0.00s].</code></pre>
</div>
<div id="top-5-patterns-boko-haram" class="section level3">
<h3><span class="header-section-number">5.5.2</span> Top 5 patterns (Boko Haram)</h3>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">rules <-<span class="st"> </span>rules[<span class="op">!</span><span class="kw">is.redundant</span>(rules)] <span class="co"># Remove redundant rules if any </span>
<span class="co"># Extract top 5 patterns based on confidence</span>
subrules <-<span class="st"> </span><span class="kw">head</span>(<span class="kw">sort</span>(rules, <span class="dt">by=</span><span class="st">"confidence"</span>), <span class="dv">5</span>)</code></pre></div>
<pre><code> lhs rhs support confidence lift count
[1] {target_type=Civilians,
weapon_type=Explosives,
suicide_attack=0,
nkill=more than 50} : {group_name=Boko Haram} 0.001111 0.8000 7.728 20
[2] {target_type=Civilians,
weapon_type=Explosives,
attack_type=Armed Assault,
nkill=11 to 50} : {group_name=Boko Haram} 0.001111 0.7692 7.431 20
[3] {target_type=Civilians,
attack_type=Armed Assault,
nkill=more than 50} : {group_name=Boko Haram} 0.001555 0.7568 7.310 28
[4] {target_type=Civilians,
weapon_type=Explosives,
attack_type=Armed Assault,
nkill=6 to 10} : {group_name=Boko Haram} 0.001388 0.7353 7.103 25
[5] {target_type=Civilians,
weapon_type=Incendiary,
attack_type=Armed Assault} : {group_name=Boko Haram} 0.001055 0.6786 6.555 19</code></pre>
<table>
<caption>
<span id="tab:unnamed-chunk-49">Table 5.3: </span>Five most important patterns (Boko Haram)
</caption>
<tbody>
<tr>
</tr>
</tbody>
</table>
<p>In the case of Boko Haram, we can see quite different patterns in comparison to ISIL and Taliban group. All of the top five patterns, as shown above, indicates attacks on civilians. Specifically, incidents involving armed assault and use of explosives with resulting fatalities more than 50 are significant patterns. This also illustrates the differences in ideology between groups.</p>
<div class="figure" style="text-align: center"><span id="fig:unnamed-chunk-50"></span>
<div id="htmlwidget-ce6ea794f6ca6cf36b56" style="width:100%;height:384px;" class="plotly html-widget"></div>
<script type="application/json" data-for="htmlwidget-ce6ea794f6ca6cf36b56">{"x":{"visdat":{"1b183c4b1922":["function () ","plotlyVisDat"]},"cur_data":"1b183c4b1922","attrs":{"1b183c4b1922":{"x":[0.00167324896046047,0.00114762452507449,0.00224199613075586,0.00136135400498029,0.0016810476986537,0.00622204626919376,0.00308305545158474,0.00110288058046912,0.00240369709651855,0.00398058760510453,0.00127742765453291,0.00102613906684526,0.00217962013982954,0.00597522621299266,0.00134343638079779,0.00670186227752804,0.00113405652888739,0.00162077646206357,0.00204435514139442,0.00647915066315755,0.00124755263523312,0.00182037625283378,0.00100418285599406,0.00136523028435025,0.00157952712082664,0.00115392149520863,0.00115857589782506],"y":[0.501119600789249,0.499673577006906,0.50713482776388,0.510708942451051,0.51678916756582,0.546773395098614,0.566724084569567,0.576077296223825,0.579998679846424,0.584244478579083,0.589017926659239,0.593233671493456,0.600983748437092,0.607694406138587,0.610151037954953,0.613403927920656,0.617586243778664,0.629892888918616,0.631686089545273,0.634047775091467,0.637873850561947,0.647675655276109,0.67878365693425,0.735632373915448,0.756155131567758,0.769719111252734,0.801192335030623],"hoverinfo":"text","text":["[8]<BR> <B>{weapon_type=Incendiary,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00167 <BR>confidence: 0.5 <BR>lift: 4.83","[16]<BR> <B>{target_type=Religious Figures,<BR> suicide_attack=1,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00111 <BR>confidence: 0.5 <BR>lift: 4.83","[3]<BR> <B>{target_type=Civilians,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00222 <BR>confidence: 0.506 <BR>lift: 4.89","[12]<BR> <B>{target_type=Civilians,<BR> weapon_type=Explosives,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00133 <BR>confidence: 0.511 <BR>lift: 4.93","[14]<BR> <B>{weapon_type=Explosives,<BR> suicide_attack=0,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00167 <BR>confidence: 0.517 <BR>lift: 5","[21]<BR> <B>{target_type=Civilians,<BR> weapon_type=Firearms,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00628 <BR>confidence: 0.546 <BR>lift: 5.27","[7]<BR> <B>{target_type=Religious Figures,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00311 <BR>confidence: 0.566 <BR>lift: 5.46","[5]<BR> <B>{target_type=Transportation,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.576 <BR>lift: 5.56","[9]<BR> <B>{weapon_type=Incendiary,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00239 <BR>confidence: 0.581 <BR>lift: 5.61","[24]<BR> <B>{target_type=Civilians,<BR> weapon_type=Explosives,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.004 <BR>confidence: 0.585 <BR>lift: 5.65","[1]<BR> <B>{target_type=Telecommunication,<BR> weapon_type=Incendiary}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00128 <BR>confidence: 0.59 <BR>lift: 5.7","[15]<BR> <B>{target_type=Transportation,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.594 <BR>lift: 5.74","[4]<BR> <B>{attack_type=Armed Assault,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00217 <BR>confidence: 0.6 <BR>lift: 5.8","[23]<BR> <B>{target_type=Civilians,<BR> weapon_type=Firearms,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.006 <BR>confidence: 0.607 <BR>lift: 5.86","[2]<BR> <B>{target_type=Telecommunication,<BR> attack_type=Facility/Infra.}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00139 <BR>confidence: 0.61 <BR>lift: 5.89","[20]<BR> <B>{target_type=Civilians,<BR> attack_type=Armed Assault,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00672 <BR>confidence: 0.614 <BR>lift: 5.93","[19]<BR> <B>{target_type=Civilians,<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00117 <BR>confidence: 0.618 <BR>lift: 5.97","[6]<BR> <B>{target_type=Religious Figures,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00161 <BR>confidence: 0.63 <BR>lift: 6.09","[13]<BR> <B>{target_type=Civilians,<BR> suicide_attack=0,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.002 <BR>confidence: 0.632 <BR>lift: 6.1","[22]<BR> <B>{target_type=Civilians,<BR> attack_type=Armed Assault,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00644 <BR>confidence: 0.634 <BR>lift: 6.12","[10]<BR> <B>{target_type=Telecommunication,<BR> weapon_type=Incendiary,<BR> attack_type=Facility/Infra.}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00128 <BR>confidence: 0.639 <BR>lift: 6.17","[17]<BR> <B>{weapon_type=Incendiary,<BR> attack_type=Facility/Infra.,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00183 <BR>confidence: 0.647 <BR>lift: 6.25","[18]<BR> <B>{target_type=Civilians,<BR> weapon_type=Incendiary,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.679 <BR>lift: 6.55","[27]<BR> <B>{target_type=Civilians,<BR> weapon_type=Explosives,<BR> attack_type=Armed Assault,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00139 <BR>confidence: 0.735 <BR>lift: 7.1","[11]<BR> <B>{target_type=Civilians,<BR> attack_type=Armed Assault,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00156 <BR>confidence: 0.757 <BR>lift: 7.31","[26]<BR> <B>{target_type=Civilians,<BR> weapon_type=Explosives,<BR> attack_type=Armed Assault,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00111 <BR>confidence: 0.769 <BR>lift: 7.43","[25]<BR> <B>{target_type=Civilians,<BR> weapon_type=Explosives,<BR> suicide_attack=0,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00111 <BR>confidence: 0.8 <BR>lift: 7.73"],"mode":"markers","marker":{"colorbar":{"title":"lift"},"opacity":0.5,"size":10},"color":[4.8299356223176,4.8299356223176,4.89107404791655,4.93270021002648,4.99648512653545,5.27326304658829,5.46416959292496,5.56174404994147,5.61316842593667,5.65455877734743,5.69684714427204,5.73554855150215,5.79592274678112,5.86104547427304,5.89016539307024,5.93322040914141,5.96639106286291,6.08991882813958,6.10097131240117,6.12319707310209,6.17158440629471,6.25050492299924,6.55491263028817,7.10284650340823,7.31017283377798,7.43067018818092,7.72789699570816],"colors":["#BBDF27FF","#7AD151FF","#43BF71FF","#22A884FF","#21908CFF","#2A788EFF","#35608DFF","#414487FF","#482576FF","#440154FF"],"alpha_stroke":1,"sizes":[10,100],"spans":[1,20],"type":"scatter"}},"layout":{"margin":{"b":40,"l":60,"t":25,"r":10},"hovermode":"closest","xaxis":{"domain":[0,1],"automargin":true,"title":"support"},"yaxis":{"domain":[0,1],"automargin":true,"title":"confidence"},"title":"Association Rules in Boko Haram group","showlegend":false,"legend":{"yanchor":"top","y":0.5}},"source":"A","config":{"modeBarButtonsToAdd":[{"name":"Collaborate","icon":{"width":1000,"ascent":500,"descent":-50,"path":"M487 375c7-10 9-23 5-36l-79-259c-3-12-11-23-22-31-11-8-22-12-35-12l-263 0c-15 0-29 5-43 15-13 10-23 23-28 37-5 13-5 25-1 37 0 0 0 3 1 7 1 5 1 8 1 11 0 2 0 4-1 6 0 3-1 5-1 6 1 2 2 4 3 6 1 2 2 4 4 6 2 3 4 5 5 7 5 7 9 16 13 26 4 10 7 19 9 26 0 2 0 5 0 9-1 4-1 6 0 8 0 2 2 5 4 8 3 3 5 5 5 7 4 6 8 15 12 26 4 11 7 19 7 26 1 1 0 4 0 9-1 4-1 7 0 8 1 2 3 5 6 8 4 4 6 6 6 7 4 5 8 13 13 24 4 11 7 20 7 28 1 1 0 4 0 7-1 3-1 6-1 7 0 2 1 4 3 6 1 1 3 4 5 6 2 3 3 5 5 6 1 2 3 5 4 9 2 3 3 7 5 10 1 3 2 6 4 10 2 4 4 7 6 9 2 3 4 5 7 7 3 2 7 3 11 3 3 0 8 0 13-1l0-1c7 2 12 2 14 2l218 0c14 0 25-5 32-16 8-10 10-23 6-37l-79-259c-7-22-13-37-20-43-7-7-19-10-37-10l-248 0c-5 0-9-2-11-5-2-3-2-7 0-12 4-13 18-20 41-20l264 0c5 0 10 2 16 5 5 3 8 6 10 11l85 282c2 5 2 10 2 17 7-3 13-7 17-13z m-304 0c-1-3-1-5 0-7 1-1 3-2 6-2l174 0c2 0 4 1 7 2 2 2 4 4 5 7l6 18c0 3 0 5-1 7-1 1-3 2-6 2l-173 0c-3 0-5-1-8-2-2-2-4-4-4-7z m-24-73c-1-3-1-5 0-7 2-2 3-2 6-2l174 0c2 0 5 0 7 2 3 2 4 4 5 7l6 18c1 2 0 5-1 6-1 2-3 3-5 3l-174 0c-3 0-5-1-7-3-3-1-4-4-5-6z"},"click":"function(gd) { \n // is this being viewed in RStudio?\n if (location.search == '?viewer_pane=1') {\n alert('To learn about plotly for collaboration, visit:\\n https://cpsievert.github.io/plotly_book/plot-ly-for-collaboration.html');\n } else {\n window.open('https://cpsievert.github.io/plotly_book/plot-ly-for-collaboration.html', '_blank');\n }\n }"}],"cloud":false},"data":[{"x":[0.00167324896046047,0.00114762452507449,0.00224199613075586,0.00136135400498029,0.0016810476986537,0.00622204626919376,0.00308305545158474,0.00110288058046912,0.00240369709651855,0.00398058760510453,0.00127742765453291,0.00102613906684526,0.00217962013982954,0.00597522621299266,0.00134343638079779,0.00670186227752804,0.00113405652888739,0.00162077646206357,0.00204435514139442,0.00647915066315755,0.00124755263523312,0.00182037625283378,0.00100418285599406,0.00136523028435025,0.00157952712082664,0.00115392149520863,0.00115857589782506],"y":[0.501119600789249,0.499673577006906,0.50713482776388,0.510708942451051,0.51678916756582,0.546773395098614,0.566724084569567,0.576077296223825,0.579998679846424,0.584244478579083,0.589017926659239,0.593233671493456,0.600983748437092,0.607694406138587,0.610151037954953,0.613403927920656,0.617586243778664,0.629892888918616,0.631686089545273,0.634047775091467,0.637873850561947,0.647675655276109,0.67878365693425,0.735632373915448,0.756155131567758,0.769719111252734,0.801192335030623],"hoverinfo":["text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text","text"],"text":["[8]<BR> <B>{weapon_type=Incendiary,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00167 <BR>confidence: 0.5 <BR>lift: 4.83","[16]<BR> <B>{target_type=Religious Figures,<BR> suicide_attack=1,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00111 <BR>confidence: 0.5 <BR>lift: 4.83","[3]<BR> <B>{target_type=Civilians,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00222 <BR>confidence: 0.506 <BR>lift: 4.89","[12]<BR> <B>{target_type=Civilians,<BR> weapon_type=Explosives,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00133 <BR>confidence: 0.511 <BR>lift: 4.93","[14]<BR> <B>{weapon_type=Explosives,<BR> suicide_attack=0,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00167 <BR>confidence: 0.517 <BR>lift: 5","[21]<BR> <B>{target_type=Civilians,<BR> weapon_type=Firearms,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00628 <BR>confidence: 0.546 <BR>lift: 5.27","[7]<BR> <B>{target_type=Religious Figures,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00311 <BR>confidence: 0.566 <BR>lift: 5.46","[5]<BR> <B>{target_type=Transportation,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.576 <BR>lift: 5.56","[9]<BR> <B>{weapon_type=Incendiary,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00239 <BR>confidence: 0.581 <BR>lift: 5.61","[24]<BR> <B>{target_type=Civilians,<BR> weapon_type=Explosives,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.004 <BR>confidence: 0.585 <BR>lift: 5.65","[1]<BR> <B>{target_type=Telecommunication,<BR> weapon_type=Incendiary}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00128 <BR>confidence: 0.59 <BR>lift: 5.7","[15]<BR> <B>{target_type=Transportation,<BR> attack_type=Bombing/Explosion,<BR> suicide_attack=1}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.594 <BR>lift: 5.74","[4]<BR> <B>{attack_type=Armed Assault,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00217 <BR>confidence: 0.6 <BR>lift: 5.8","[23]<BR> <B>{target_type=Civilians,<BR> weapon_type=Firearms,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.006 <BR>confidence: 0.607 <BR>lift: 5.86","[2]<BR> <B>{target_type=Telecommunication,<BR> attack_type=Facility/Infra.}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00139 <BR>confidence: 0.61 <BR>lift: 5.89","[20]<BR> <B>{target_type=Civilians,<BR> attack_type=Armed Assault,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00672 <BR>confidence: 0.614 <BR>lift: 5.93","[19]<BR> <B>{target_type=Civilians,<BR> attack_type=Hostage Taking (Kidnapping),<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00117 <BR>confidence: 0.618 <BR>lift: 5.97","[6]<BR> <B>{target_type=Religious Figures,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00161 <BR>confidence: 0.63 <BR>lift: 6.09","[13]<BR> <B>{target_type=Civilians,<BR> suicide_attack=0,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.002 <BR>confidence: 0.632 <BR>lift: 6.1","[22]<BR> <B>{target_type=Civilians,<BR> attack_type=Armed Assault,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00644 <BR>confidence: 0.634 <BR>lift: 6.12","[10]<BR> <B>{target_type=Telecommunication,<BR> weapon_type=Incendiary,<BR> attack_type=Facility/Infra.}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00128 <BR>confidence: 0.639 <BR>lift: 6.17","[17]<BR> <B>{weapon_type=Incendiary,<BR> attack_type=Facility/Infra.,<BR> nkill=1 to 5}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00183 <BR>confidence: 0.647 <BR>lift: 6.25","[18]<BR> <B>{target_type=Civilians,<BR> weapon_type=Incendiary,<BR> attack_type=Armed Assault}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00106 <BR>confidence: 0.679 <BR>lift: 6.55","[27]<BR> <B>{target_type=Civilians,<BR> weapon_type=Explosives,<BR> attack_type=Armed Assault,<BR> nkill=6 to 10}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00139 <BR>confidence: 0.735 <BR>lift: 7.1","[11]<BR> <B>{target_type=Civilians,<BR> attack_type=Armed Assault,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00156 <BR>confidence: 0.757 <BR>lift: 7.31","[26]<BR> <B>{target_type=Civilians,<BR> weapon_type=Explosives,<BR> attack_type=Armed Assault,<BR> nkill=11 to 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00111 <BR>confidence: 0.769 <BR>lift: 7.43","[25]<BR> <B>{target_type=Civilians,<BR> weapon_type=Explosives,<BR> suicide_attack=0,<BR> nkill=more than 50}<\/B><BR> => <B>{group_name=Boko Haram}<\/B> <BR><BR>support: 0.00111 <BR>confidence: 0.8 <BR>lift: 7.73"],"mode":"markers","marker":{"colorbar":{"title":"lift","ticklen":2},"cmin":4.8299356223176,"cmax":7.72789699570816,"colorscale":[["0","rgba(187,223,39,1)"],["0.00175808720112501","rgba(186,223,40,1)"],["0.0234910374958853","rgba(174,220,51,1)"],["0.0409635607728054","rgba(165,218,58,1)"],["0.0893071982527255","rgba(136,212,75,1)"],["0.180427463036159","rgba(91,198,102,1)"],["0.235690235690235","rgba(64,188,115,1)"],["0.262876512876513","rgba(58,182,120,1)"],["0.27979198710906","rgba(53,179,123,1)"],["0.295497185741088","rgba(48,176,126,1)"],["0.310274216524216","rgba(43,173,128,1)"],["0.331597222222222","rgba(35,168,132,1)"],["0.355805243445693","rgba(35,163,134,1)"],["0.36709174198341","rgba(35,161,135,1)"],["0.382618360372914","rgba(35,157,136,1)"],["0.402813299232736","rgba(35,153,137,1)"],["0.436053902873125","rgba(33,146,139,1)"],["0.441792094078547","rgba(33,145,140,1)"],["0.45461445051609","rgba(34,142,140,1)"],["0.478848946986202","rgba(37,137,141,1)"],["0.560224089635854","rgba(43,119,142,1)"],["0.737044817927171","rgba(62,78,137,1)"],["0.843932167461579","rgba(70,50,125,1)"],["0.893970893970894","rgba(72,36,116,1)"],["1","rgba(68,1,84,1)"]],"showscale":false,"color":[4.8299356223176,4.8299356223176,4.89107404791655,4.93270021002648,4.99648512653545,5.27326304658829,5.46416959292496,5.56174404994147,5.61316842593667,5.65455877734743,5.69684714427204,5.73554855150215,5.79592274678112,5.86104547427304,5.89016539307024,5.93322040914141,5.96639106286291,6.08991882813958,6.10097131240117,6.12319707310209,6.17158440629471,6.25050492299924,6.55491263028817,7.10284650340823,7.31017283377798,7.43067018818092,7.72789699570816],"opacity":0.5,"size":10,"line":{"colorbar":{"title":"","ticklen":2},"cmin":4.8299356223176,"cmax":7.72789699570816,"colorscale":[["0","rgba(187,223,39,1)"],["0.00175808720112501","rgba(186,223,40,1)"],["0.0234910374958853","rgba(174,220,51,1)"],["0.0409635607728054","rgba(165,218,58,1)"],["0.0893071982527255","rgba(136,212,75,1)"],["0.180427463036159","rgba(91,198,102,1)"],["0.235690235690235","rgba(64,188,115,1)"],["0.262876512876513","rgba(58,182,120,1)"],["0.27979198710906","rgba(53,179,123,1)"],["0.295497185741088","rgba(48,176,126,1)"],["0.310274216524216","rgba(43,173,128,1)"],["0.331597222222222","rgba(35,168,132,1)"],["0.355805243445693","rgba(35,163,134,1)"],["0.36709174198341","rgba(35,161,135,1)"],["0.382618360372914","rgba(35,157,136,1)"],["0.402813299232736","rgba(35,153,137,1)"],["0.436053902873125","rgba(33,146,139,1)"],["0.441792094078547","rgba(33,145,140,1)"],["0.45461445051609","rgba(34,142,140,1)"],["0.478848946986202","rgba(37,137,141,1)"],["0.560224089635854","rgba(43,119,142,1)"],["0.737044817927171","rgba(62,78,137,1)"],["0.843932167461579","rgba(70,50,125,1)"],["0.893970893970894","rgba(72,36,116,1)"],["1","rgba(68,1,84,1)"]],"showscale":false,"color":[4.8299356223176,4.8299356223176,4.89107404791655,4.93270021002648,4.99648512653545,5.27326304658829,5.46416959292496,5.56174404994147,5.61316842593667,5.65455877734743,5.69684714427204,5.73554855150215,5.79592274678112,5.86104547427304,5.89016539307024,5.93322040914141,5.96639106286291,6.08991882813958,6.10097131240117,6.12319707310209,6.17158440629471,6.25050492299924,6.55491263028817,7.10284650340823,7.31017283377798,7.43067018818092,7.72789699570816]}},"type":"scatter","xaxis":"x","yaxis":"y","frame":null},{"x":[0.00100418285599406,0.00670186227752804],"y":[0.499673577006906,0.801192335030623],"type":"scatter","mode":"markers","opacity":0,"hoverinfo":"none","showlegend":false,"marker":{"colorbar":{"title":"","ticklen":2,"len":0.5,"lenmode":"fraction","y":1,"yanchor":"top"},"cmin":4.8299356223176,"cmax":7.72789699570816,"colorscale":[["0","rgba(187,223,39,1)"],["0.00175808720112501","rgba(186,223,40,1)"],["0.0234910374958853","rgba(174,220,51,1)"],["0.0409635607728054","rgba(165,218,58,1)"],["0.0893071982527255","rgba(136,212,75,1)"],["0.180427463036159","rgba(91,198,102,1)"],["0.235690235690235","rgba(64,188,115,1)"],["0.262876512876513","rgba(58,182,120,1)"],["0.27979198710906","rgba(53,179,123,1)"],["0.295497185741088","rgba(48,176,126,1)"],["0.310274216524216","rgba(43,173,128,1)"],["0.331597222222222","rgba(35,168,132,1)"],["0.355805243445693","rgba(35,163,134,1)"],["0.36709174198341","rgba(35,161,135,1)"],["0.382618360372914","rgba(35,157,136,1)"],["0.402813299232736","rgba(35,153,137,1)"],["0.436053902873125","rgba(33,146,139,1)"],["0.441792094078547","rgba(33,145,140,1)"],["0.45461445051609","rgba(34,142,140,1)"],["0.478848946986202","rgba(37,137,141,1)"],["0.560224089635854","rgba(43,119,142,1)"],["0.737044817927171","rgba(62,78,137,1)"],["0.843932167461579","rgba(70,50,125,1)"],["0.893970893970894","rgba(72,36,116,1)"],["1","rgba(68,1,84,1)"]],"showscale":true,"color":[4.8299356223176,7.72789699570816],"line":{"color":"rgba(255,127,14,1)"}},"xaxis":"x","yaxis":"y","frame":null}],"highlight":{"on":"plotly_click","persistent":false,"dynamic":false,"selectize":false,"opacityDim":0.2,"selected":{"opacity":1},"debounce":0},"base_url":"https://plot.ly"},"evals":["config.modeBarButtonsToAdd.0.click"],"jsHooks":[]}</script>
<p class="caption">
Figure 5.5: Association Rules in Boko Haram group
</p>
</div>
<p>From the plot above, we can see many patterns with high support and lift value with confidence between 0.55 and 0.65. Four patterns with high support value (on the right-hand side of the plot) corresponds to attack on civilians using firearms as a weapon type, armed assault as an attack type resulting fatalities between 6 to 10 and 11 to 50. Religious figures and Telecommunication as a target is also visible within confidence value of 0.55 to 0.65 and lift value ~ 6.</p>
<p>In total, 27 rules are identified after removing redundant rules. Let’s have a closer look at all the 27 rules with network graph to visualize the characteristics and habits of the Boko Haram group.</p>
</div>
<div id="network-graph-boko-haram" class="section level3">
<h3><span class="header-section-number">5.5.3</span> Network graph (Boko Haram)</h3>
<div class="figure" style="text-align: center"><span id="fig:unnamed-chunk-52"></span>
<div id="htmlwidget-9a0c2601d278e06ec89e" style="width:100%;height:672px;" class="visNetwork html-widget"></div>
<script type="application/json" data-for="htmlwidget-9a0c2601d278e06ec89e">{"x":{"nodes":{"id":["4","13","24","25","27","31","32","33","38","40","41","44","46","47","49","50","51","52","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20","assoc21","assoc22","assoc23","assoc24","assoc25","assoc26","assoc27"],"value":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0.00127735199377985,0.00138842608019549,0.00222148172831278,0.00216594468510496,0.00105520382094857,0.00161057425302677,0.0031100744196379,0.00166611129623459,0.00238809285793624,0.00127735199377985,0.00155503720981895,0.00133288903698767,0.00199933355548151,0.00166611129623459,0.00105520382094857,0.00111074086415639,0.00183272242585805,0.00105520382094857,0.00116627790736421,0.00671998222814617,0.00627568588248362,0.00644229701210708,0.00599800066644452,0.00399866711096301,0.00111074086415639,0.00111074086415639,0.00138842608019549],"title":["group_name=Boko Haram","target_type=Civilians","target_type=Religious Figures","target_type=Telecommunication","target_type=Transportation","weapon_type=Explosives","weapon_type=Firearms","weapon_type=Incendiary","attack_type=Armed Assault","attack_type=Bombing/Explosion","attack_type=Facility/Infra.","attack_type=Hostage Taking (Kidnapping)","suicide_attack=0","suicide_attack=1","nkill=1 to 5","nkill=11 to 50","nkill=6 to 10","nkill=more than 50","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20","assoc21","assoc22","assoc23","assoc24","assoc25","assoc26","assoc27"],"name":["4","13","24","25","27","31","32","33","38","40","41","44","46","47","49","50","51","52","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20","assoc21","assoc22","assoc23","assoc24","assoc25","assoc26","assoc27"],"label":["group_name=Boko Haram","target_type=Civilians","target_type=Religious Figures","target_type=Telecommunication","target_type=Transportation","weapon_type=Explosives","weapon_type=Firearms","weapon_type=Incendiary","attack_type=Armed Assault","attack_type=Bombing/Explosion","attack_type=Facility/Infra.","attack_type=Hostage Taking (Kidnapping)","suicide_attack=0","suicide_attack=1","nkill=1 to 5","nkill=11 to 50","nkill=6 to 10","nkill=more than 50","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"support":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0.00127735199377985,0.00138842608019549,0.00222148172831278,0.00216594468510496,0.00105520382094857,0.00161057425302677,0.0031100744196379,0.00166611129623459,0.00238809285793624,0.00127735199377985,0.00155503720981895,0.00133288903698767,0.00199933355548151,0.00166611129623459,0.00105520382094857,0.00111074086415639,0.00183272242585805,0.00105520382094857,0.00116627790736421,0.00671998222814617,0.00627568588248362,0.00644229701210708,0.00599800066644452,0.00399866711096301,0.00111074086415639,0.00111074086415639,0.00138842608019549],"confidence":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0.58974358974359,0.609756097560976,0.506329113924051,0.6,0.575757575757576,0.630434782608696,0.565656565656566,0.5,0.581081081081081,0.638888888888889,0.756756756756757,0.51063829787234,0.631578947368421,0.517241379310345,0.59375,0.5,0.647058823529412,0.678571428571429,0.617647058823529,0.614213197969543,0.545893719806763,0.633879781420765,0.606741573033708,0.585365853658537,0.8,0.769230769230769,0.735294117647059],"lift":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,5.69684714427204,5.89016539307024,4.89107404791655,5.79592274678112,5.56174404994147,6.08991882813958,5.46416959292496,4.8299356223176,5.61316842593667,6.17158440629471,7.31017283377798,4.93270021002648,6.10097131240117,4.99648512653545,5.73554855150215,4.8299356223176,6.25050492299924,6.55491263028817,5.96639106286291,5.93322040914141,5.27326304658829,6.12319707310209,5.86104547427304,5.65455877734743,7.72789699570816,7.43067018818092,7.10284650340823],"count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,23,25,40,39,19,29,56,30,43,23,28,24,36,30,19,20,33,19,21,121,113,116,108,72,20,20,25],"order":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5]},"edges":{"from":["25","33","25","41","13","52","38","52","27","47","24","51","24","38","33","38","33","49","25","33","41","13","38","52","13","31","52","13","46","52","31","46","52","27","40","47","24","47","49","33","41","49","13","33","38","13","44","51","13","38","50","13","32","50","13","38","51","13","32","51","13","31","38","13","31","46","52","13","31","38","50","13","31","38","51","assoc1","assoc2","assoc3","assoc4","assoc5","assoc6","assoc7","assoc8","assoc9","assoc10","assoc11","assoc12","assoc13","assoc14","assoc15","assoc16","assoc17","assoc18","assoc19","assoc20","assoc21","assoc22","assoc23","assoc24","assoc25","assoc26","assoc27"],"to":["assoc1","assoc1","assoc2","assoc2","assoc3","assoc3","assoc4","assoc4","assoc5","assoc5","assoc6","assoc6","assoc7","assoc7","assoc8","assoc8","assoc9","assoc9","assoc10","assoc10","assoc10","assoc11","assoc11","assoc11","assoc12","assoc12","assoc12","assoc13","assoc13","assoc13","assoc14","assoc14","assoc14","assoc15","assoc15","assoc15","assoc16","assoc16","assoc16","assoc17","assoc17","assoc17","assoc18","assoc18","assoc18","assoc19","assoc19","assoc19","assoc20","assoc20","assoc20","assoc21","assoc21","assoc21","assoc22","assoc22","assoc22","assoc23","assoc23","assoc23","assoc24","assoc24","assoc24","assoc25","assoc25","assoc25","assoc25","assoc26","assoc26","assoc26","assoc26","assoc27","assoc27","assoc27","assoc27","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4","4"]},"nodesToDataframe":true,"edgesToDataframe":true,"options":{"width":"100%","height":"100%","nodes":{"shape":"dot","size":5,"color":"#9cb7f4"},"manipulation":{"enabled":false},"edges":{"color":"#ffd596","smooth":true,"arrows":"from"},"physics":{"solver":"barnesHut","maxVelocity":35,"forceAtlas2Based":{"gravitationalConstant":-6000}}},"groups":null,"width":null,"height":null,"idselection":{"enabled":true,"style":"width: 150px; height: 26px","useLabels":true,"main":"Select by id"},"byselection":{"enabled":false,"style":"width: 150px; height: 26px","multiple":false,"hideColor":"rgba(200,200,200,0.5)"},"main":null,"submain":null,"footer":null,"background":"rgba(0, 0, 0, 0)","events":[],"legend":{"width":0.2,"useGroups":true,"position":"left","ncol":1,"stepX":100,"stepY":100,"zoom":true},"highlight":{"enabled":true,"hoverNearest":false,"degree":1,"algorithm":"all","hideColor":"rgba(200,200,200,0.5)","labelOnly":true},"collapse":{"enabled":false,"fit":false,"resetHighlight":true,"clusterOptions":null}},"evals":[],"jsHooks":[]}</script>
<p class="caption">
Figure 5.6: Network graph of discovered patterns- Boko Haram group
</p>
</div>
<p>To summarize this chapter, we identified the most frequent patterns for ISIL, Taliban and Boko Haram group which indicates distinct nature/ habits among this groups. While use of chemical weapon in both ISIL and Taliban group turns out to be most frequent pattern, we also discovered other interesting and significant patterns such as ISIL being more likely to attack other terrorists (non-state militia) with bombing/explosion while having resulting fatalities between 6 to 10, Boko Haram having tendency to target civilians with explosives, without suicide attack and resulting fatalities more than 50, and Taliban having frequent target on police with explosives concentrating on resulting fatalities between 11 to 50.</p>
</div>
</div>
</div>
<div class="footnotes">
<hr />
<ol start="11">
<li id="fn11"><p><a href="https://en.wikipedia.org/wiki/Apriori_algorithm" class="uri">https://en.wikipedia.org/wiki/Apriori_algorithm</a><a href="5-pattern-discovery.html#fnref11">↩</a></p></li>
</ol>
</div>
</section>
</div>
</div>
</div>
<a href="4-hypothesis-testing.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
<a href="6-time-series.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
</div>
</div>
<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
<script src="libs/gitbook-2.6.7/js/lunr.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
<script>
gitbook.require(["gitbook"], function(gitbook) {
gitbook.start({
"sharing": {
"github": false,
"facebook": true,
"twitter": true,
"google": false,
"linkedin": false,
"weibo": false,
"instapper": false,
"vk": false,
"all": ["facebook", "google", "twitter", "linkedin", "weibo", "instapaper"]
},
"fontsettings": {
"theme": "white",
"family": "sans",
"size": 2
},
"edit": {
"link": null,
"text": null
},
"download": [["thesis.pdf", "PDF"], ["thesis.epub", "EPUB"], ["thesis.docx", "Word"]],
"toc": {
"collapse": "section"
}
});
});
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
var src = "";
if (src === "" || src === "true") src = "https://cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML";
if (location.protocol !== "file:" && /^https?:/.test(src))
src = src.replace(/^https?:/, '');
script.src = src;
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>