Description of the data and basic data statistics

Dataset consists of news articles from several media outlets representing mobilisation press, loyalist press, and diverse print media. The dataset consists of a set of articles/news labeled by 0 (fake) or 1 (credible). The dataset consists of 1000 articles labeled as true or fake and that is ideal for training machine learning models to predict the credibility of news articles

We will use the ’text’ column to analyse text.

1. Load the required libraries

library("tidytext")
library("topicmodels")
library("quanteda")
## Warning in .recacheSubclasses(def@className, def, env): undefined subclass
## "packedMatrix" of class "mMatrix"; definition not updated
## Warning in .recacheSubclasses(def@className, def, env): undefined subclass
## "packedMatrix" of class "replValueSp"; definition not updated
## Package version: 3.2.3
## Unicode version: 13.0
## ICU version: 69.1
## Parallel computing: 8 of 8 threads used.
## See https://quanteda.io for tutorials and examples.
library("seededlda")
## Loading required package: proxyC
## 
## Attaching package: 'proxyC'
## The following object is masked from 'package:stats':
## 
##     dist
## 
## Attaching package: 'seededlda'
## The following objects are masked from 'package:topicmodels':
## 
##     terms, topics
## The following object is masked from 'package:stats':
## 
##     terms
library("topicdoc")
library("ldatuning")
library("LDAvis")
library("broom")
library("dplyr")
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library("ggplot2")
library("tidyverse")
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✔ tibble  3.1.6     ✔ purrr   0.3.4
## ✔ tidyr   1.1.4     ✔ stringr 1.4.0
## ✔ readr   2.1.2     ✔ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library("readtext")
library("textrank")
library("stm")
## stm v1.3.6 successfully loaded. See ?stm for help. 
##  Papers, resources, and other materials at structuraltopicmodel.com
library("keyATM")
## keyATM 0.4.1 successfully loaded.
##  Papers, examples, resources, and other materials are at
##  https://keyatm.github.io/keyATM/
library("servr") 
library("kableExtra")
## 
## Attaching package: 'kableExtra'
## The following object is masked from 'package:dplyr':
## 
##     group_rows

2. Create dataframe from csv file

fake_real_df <- readtext("Assignment2.csv", text_field = "article_content")
head(fake_real_df,5) %>%
  kbl() %>%
  kable_styling(bootstrap_options = "striped", full_width = F, position = "left")
doc_id text unit_id article_title source date location labels
Assignment2.csv.1 Wed 05 Apr 2017 Syria attack symptoms consistent with nerve agent use WHO. Victims of a suspected chemical attack in Syria appeared to show symptoms consistent with reaction to a nerve agent the World Health Organization said on Wednesday. ““Some cases appear to show additional signs consistent with exposure to organophosphorus chemicals a category of chemicals that includes nerve agents”” WHO said in a statement putting the death toll at at least 70. The United States has said the deaths were caused by sarin nerve gas dropped by Syrian aircraft. Russia has said it believes poison gas had leaked from a rebel chemical weapons depot struck by Syrian bombs. Sarin is an organophosporus compound and a nerve agent. Chlorine and mustard gas which are also believed to have been used in the past in Syria are not. A Russian Defence Ministry spokesman did not say what agent was used in the attack but said the rebels had used the same chemical weapons in Aleppo last year. The WHO said it was likely that some kind of chemical was used in the attack because sufferers had no apparent external injuries and died from a rapid onset of similar symptoms including acute respiratory distress. It said its experts in Turkey were giving guidance to overwhelmed health workers in Idlib on the diagnosis and treatment of patients and medicines such as Atropine an antidote for some types of chemical exposure and steroids for symptomatic treatment had been sent. A U.N. Commission of Inquiry into human rights in Syria has previously said forces loyal to Syrian President Bashar al-Assad have used lethal chlorine gas on multiple occasions. Hundreds of civilians died in a sarin gas attack in Ghouta on the outskirts of Damascus in August 2013. Assads government has always denied responsibility for that attack. Syria agreed to destroy its chemical weapons in 2013 under a deal brokered by Moscow and Washington. But Russia a Syrian ally and China have repeatedly vetoed any United Nations move to sanction Assad or refer the situation in Syria to the International Criminal Court. ““These types of weapons are banned by international law because they represent an intolerable barbarism”” Peter Salama Executive Director of the WHO Health Emergencies Programme said in the WHO statement. - REUTERS 1914947530 Syria attack symptoms consistent with nerve agent use WHO nna 4/5/17 idlib 0
Assignment2.csv.2 Fri 07 Apr 2017 at 0914 Homs governor says U.S. attack caused deaths but doesnt see big human losses. A U.S. missile strike on an airbase near the Syrian city of Homs on Friday caused deaths but is not believed to have resulted in ““big human casualties”” Homs Governor Talal Barazi said. Barazi said the attack served the interests of ““armed terrorist groups”” including Islamic State adding that the targeted airbase had been providing air support for army operations against Islamic State east of Palmyra. Barazi was speaking in a series of phone interviews with media on Friday. He confirmed deaths at the airbase in a phone interview with Lebanese TV station al-Mayadeen. ““I believe - God willing - that the human casualties are not big but there is material damage. We hope there are not many victims and martyrs”” he told Reuters by telephone. Speaking at dawn he said rescue and fire-fighting operations had been going on for two hours at the base. He said the attack was a form of ““support for the armed terrorist groups and it is an attempt to weaken the capabilities of the Syrian Arab Army to combat terrorism”“. Speaking to Syrian state TV Barazi said”“The Syrian leadership and Syrian policy will not change.”“This targeting was not the first and I dont believe it will be the last”” he added. In separate comments to al-Mayadeen he said ““The war against terrorism will continue.”” U.S. President Donald Trump said he ordered missile strikes against an airfield from which a deadly chemical weapons attack was launched this week declaring he acted in Americas ““national security interest”” against Syrian President Bashar al-Assad. U.S. officials said the military fired dozens of cruise missiles against the base in response to the suspected gas attack in a rebel-held area that Washington has blamed on Assads forces. The Syrian government has strongly denied responsibility. The U.S. strikes ““targeted military positions in Syria and in Homs specifically”” in order to publicly ““serve the goals of terrorism in Syria and the goals of Israel in the long run”” Barazi added in his interview with state TV.-REUTERS 1914947532 Homs governor says U.S. attack caused deaths but doesnt see big human losses nna 4/7/17 homs 0
Assignment2.csv.3 Sun 16 Apr 2017 Death toll from Aleppo bomb attack at least 112. The death toll from a bomb blast on a crowded Syrian bus convoy outside Aleppo reached at least 112 people the Syrian Observatory for Human Rights monitoring group said on Sunday. Syrian rescue workers the Civil Defence said that they had carted away at least 100 bodies from the site of Saturdays blast which hit buses carrying Shiite residents as they waited to cross from rebel into government territory in an evacuation deal between warring sides. The British-based Observatory said the number was expected to rise. Those killed were mostly residents of the villages of al-Foua and Kefraya in Idlib province but included rebel fighters guarding the convoy the Observatory said. There was no immediate claim of responsibility for the attack which pro-Damascus media said was carried out by a suicide car bomber. The convoy was carrying at least 5000 people including civilians and several hundred pro-government fighters who were granted safe passage out of the two Shiite villages which are besieged by rebels. Under the evacuation deal more than 2000 people including rebel fighters were granted safe passage out of Madaya a town near Damascus besieged by government forces and their allies. That convoy was waiting at a bus garage in a government-held area on Aleppos outskirts a few miles from where the attack took place. Madaya evacuees said they heard the blast. –Reuters 1914947533 Death toll from Aleppo bomb attack at least 112 nna 4/16/17 aleppo 0
Assignment2.csv.4 Wed 19 Apr 2017 Aleppo bomb blast kills six Syrian state TV. A bomb blast killed six people and injured 32 in the Salah al-Din district of Aleppo Syrian state television reported on Wednesday without giving further details. Salah al-Din is located west of Aleppos Old City in a district that was part of the last rebel enclave there until it was taken over by the Syrian army in an advance in December. –Reuters 1914947534 Aleppo bomb blast kills six Syrian state TV nna 4/19/17 aleppo 0
Assignment2.csv.5 Sun 10 Jul 2016 29 Syria Rebels Dead in Fighting for Key Aleppo Road. At least 29 Syrian rebels were killed in clashes with regime troops overnight during a failed bid to reopen the oppositions key supply route into Aleppo city a monitor said Sunday. The fighters from the Faylaq al-Sham Islamist faction and Al-Qaeda affiliate Al-Nusra Front were killed trying to reopen the Castello Road which regime forces effectively severed on Thursday the Syrian Observatory for Human Rights monitor said.–AFP 1914947535 29 Syria Rebels Dead in Fighting for Key Aleppo Road nna 7/10/16 aleppo 0

Q3.1. Create corpus from csv file

fake_real_corp <- corpus(fake_real_df)
head(fake_real_corp, n = 5) %>%
  kbl() %>%
  kable_styling(bootstrap_options = "striped", full_width = F, position = "left")
x
Assignment2.csv.1 Wed 05 Apr 2017 Syria attack symptoms consistent with nerve agent use WHO. Victims of a suspected chemical attack in Syria appeared to show symptoms consistent with reaction to a nerve agent the World Health Organization said on Wednesday. ““Some cases appear to show additional signs consistent with exposure to organophosphorus chemicals a category of chemicals that includes nerve agents”” WHO said in a statement putting the death toll at at least 70. The United States has said the deaths were caused by sarin nerve gas dropped by Syrian aircraft. Russia has said it believes poison gas had leaked from a rebel chemical weapons depot struck by Syrian bombs. Sarin is an organophosporus compound and a nerve agent. Chlorine and mustard gas which are also believed to have been used in the past in Syria are not. A Russian Defence Ministry spokesman did not say what agent was used in the attack but said the rebels had used the same chemical weapons in Aleppo last year. The WHO said it was likely that some kind of chemical was used in the attack because sufferers had no apparent external injuries and died from a rapid onset of similar symptoms including acute respiratory distress. It said its experts in Turkey were giving guidance to overwhelmed health workers in Idlib on the diagnosis and treatment of patients and medicines such as Atropine an antidote for some types of chemical exposure and steroids for symptomatic treatment had been sent. A U.N. Commission of Inquiry into human rights in Syria has previously said forces loyal to Syrian President Bashar al-Assad have used lethal chlorine gas on multiple occasions. Hundreds of civilians died in a sarin gas attack in Ghouta on the outskirts of Damascus in August 2013. Assads government has always denied responsibility for that attack. Syria agreed to destroy its chemical weapons in 2013 under a deal brokered by Moscow and Washington. But Russia a Syrian ally and China have repeatedly vetoed any United Nations move to sanction Assad or refer the situation in Syria to the International Criminal Court. ““These types of weapons are banned by international law because they represent an intolerable barbarism”” Peter Salama Executive Director of the WHO Health Emergencies Programme said in the WHO statement. - REUTERS
Assignment2.csv.2 Fri 07 Apr 2017 at 0914 Homs governor says U.S. attack caused deaths but doesnt see big human losses. A U.S. missile strike on an airbase near the Syrian city of Homs on Friday caused deaths but is not believed to have resulted in ““big human casualties”” Homs Governor Talal Barazi said. Barazi said the attack served the interests of ““armed terrorist groups”” including Islamic State adding that the targeted airbase had been providing air support for army operations against Islamic State east of Palmyra. Barazi was speaking in a series of phone interviews with media on Friday. He confirmed deaths at the airbase in a phone interview with Lebanese TV station al-Mayadeen. ““I believe - God willing - that the human casualties are not big but there is material damage. We hope there are not many victims and martyrs”” he told Reuters by telephone. Speaking at dawn he said rescue and fire-fighting operations had been going on for two hours at the base. He said the attack was a form of ““support for the armed terrorist groups and it is an attempt to weaken the capabilities of the Syrian Arab Army to combat terrorism”“. Speaking to Syrian state TV Barazi said”“The Syrian leadership and Syrian policy will not change.”“This targeting was not the first and I dont believe it will be the last”” he added. In separate comments to al-Mayadeen he said ““The war against terrorism will continue.”” U.S. President Donald Trump said he ordered missile strikes against an airfield from which a deadly chemical weapons attack was launched this week declaring he acted in Americas ““national security interest”” against Syrian President Bashar al-Assad. U.S. officials said the military fired dozens of cruise missiles against the base in response to the suspected gas attack in a rebel-held area that Washington has blamed on Assads forces. The Syrian government has strongly denied responsibility. The U.S. strikes ““targeted military positions in Syria and in Homs specifically”” in order to publicly ““serve the goals of terrorism in Syria and the goals of Israel in the long run”” Barazi added in his interview with state TV.-REUTERS
Assignment2.csv.3 Sun 16 Apr 2017 Death toll from Aleppo bomb attack at least 112. The death toll from a bomb blast on a crowded Syrian bus convoy outside Aleppo reached at least 112 people the Syrian Observatory for Human Rights monitoring group said on Sunday. Syrian rescue workers the Civil Defence said that they had carted away at least 100 bodies from the site of Saturdays blast which hit buses carrying Shiite residents as they waited to cross from rebel into government territory in an evacuation deal between warring sides. The British-based Observatory said the number was expected to rise. Those killed were mostly residents of the villages of al-Foua and Kefraya in Idlib province but included rebel fighters guarding the convoy the Observatory said. There was no immediate claim of responsibility for the attack which pro-Damascus media said was carried out by a suicide car bomber. The convoy was carrying at least 5000 people including civilians and several hundred pro-government fighters who were granted safe passage out of the two Shiite villages which are besieged by rebels. Under the evacuation deal more than 2000 people including rebel fighters were granted safe passage out of Madaya a town near Damascus besieged by government forces and their allies. That convoy was waiting at a bus garage in a government-held area on Aleppos outskirts a few miles from where the attack took place. Madaya evacuees said they heard the blast. –Reuters
Assignment2.csv.4 Wed 19 Apr 2017 Aleppo bomb blast kills six Syrian state TV. A bomb blast killed six people and injured 32 in the Salah al-Din district of Aleppo Syrian state television reported on Wednesday without giving further details. Salah al-Din is located west of Aleppos Old City in a district that was part of the last rebel enclave there until it was taken over by the Syrian army in an advance in December. –Reuters
Assignment2.csv.5 Sun 10 Jul 2016 29 Syria Rebels Dead in Fighting for Key Aleppo Road. At least 29 Syrian rebels were killed in clashes with regime troops overnight during a failed bid to reopen the oppositions key supply route into Aleppo city a monitor said Sunday. The fighters from the Faylaq al-Sham Islamist faction and Al-Qaeda affiliate Al-Nusra Front were killed trying to reopen the Castello Road which regime forces effectively severed on Thursday the Syrian Observatory for Human Rights monitor said.–AFP

Q3.2. Generate tokens

fake_real_toks_orig <- tokens(
  fake_real_corp,
  remove_punct = TRUE,
  remove_numbers = TRUE,
  remove_symbols = TRUE,
  remove_url = TRUE,
  split_hyphens = FALSE)
fake_real_toks_orig
## Tokens consisting of 1,000 documents and 6 docvars.
## Assignment2.csv.1 :
##  [1] "Wed"        "Apr"        "Syria"      "attack"     "symptoms"  
##  [6] "consistent" "with"       "nerve"      "agent"      "use"       
## [11] "WHO"        "Victims"   
## [ ... and 360 more ]
## 
## Assignment2.csv.2 :
##  [1] "Fri"      "Apr"      "at"       "Homs"     "governor" "says"    
##  [7] "U.S"      "attack"   "caused"   "deaths"   "but"      "doesnt"  
## [ ... and 338 more ]
## 
## Assignment2.csv.3 :
##  [1] "Sun"    "Apr"    "Death"  "toll"   "from"   "Aleppo" "bomb"   "attack"
##  [9] "at"     "least"  "The"    "death" 
## [ ... and 219 more ]
## 
## Assignment2.csv.4 :
##  [1] "Wed"    "Apr"    "Aleppo" "bomb"   "blast"  "kills"  "six"    "Syrian"
##  [9] "state"  "TV"     "A"      "bomb"  
## [ ... and 59 more ]
## 
## Assignment2.csv.5 :
##  [1] "Sun"      "Jul"      "Syria"    "Rebels"   "Dead"     "in"      
##  [7] "Fighting" "for"      "Key"      "Aleppo"   "Road"     "At"      
## [ ... and 66 more ]
## 
## Assignment2.csv.6 :
##  [1] "Tue"       "Jul"       "Suicide"   "bombing"   "kills"     "at"       
##  [7] "least"     "in"        "northeast" "Syria"     "A"         "suicide"  
## [ ... and 138 more ]
## 
## [ reached max_ndoc ... 994 more documents ]

Remove unnecessary words and regenerate tokens

myStopWords = c("A","at", "Sun", "Wed", "Apr", "but",
                "Fri", "Jul", "in", "for",
                "Tue", "but", "doesnt", "from", "The",
                "have", "been", "has", "than","with",
                "use","who","of","to","show","and",
                "on","said","were","by","that","is",
                "as","was","an","it","which","its",
                "had","are","they","he","be","us")

fake_real_toks <- tokens_remove(fake_real_toks_orig, pattern = c(stopwords("en"), myStopWords))
fake_real_toks 
## Tokens consisting of 1,000 documents and 6 docvars.
## Assignment2.csv.1 :
##  [1] "Syria"      "attack"     "symptoms"   "consistent" "nerve"     
##  [6] "agent"      "Victims"    "suspected"  "chemical"   "attack"    
## [11] "Syria"      "appeared"  
## [ ... and 194 more ]
## 
## Assignment2.csv.2 :
##  [1] "Homs"     "governor" "says"     "U.S"      "attack"   "caused"  
##  [7] "deaths"   "see"      "big"      "human"    "losses"   "U.S"     
## [ ... and 187 more ]
## 
## Assignment2.csv.3 :
##  [1] "Death"   "toll"    "Aleppo"  "bomb"    "attack"  "least"   "death"  
##  [8] "toll"    "bomb"    "blast"   "crowded" "Syrian" 
## [ ... and 121 more ]
## 
## Assignment2.csv.4 :
##  [1] "Aleppo" "bomb"   "blast"  "kills"  "six"    "Syrian" "state"  "TV"    
##  [9] "bomb"   "blast"  "killed" "six"   
## [ ... and 32 more ]
## 
## Assignment2.csv.5 :
##  [1] "Syria"    "Rebels"   "Dead"     "Fighting" "Key"      "Aleppo"  
##  [7] "Road"     "least"    "Syrian"   "rebels"   "killed"   "clashes" 
## [ ... and 39 more ]
## 
## Assignment2.csv.6 :
##  [1] "Suicide"   "bombing"   "kills"     "least"     "northeast" "Syria"    
##  [7] "suicide"   "bomb"      "blast"     "killed"    "least"     "people"   
## [ ... and 76 more ]
## 
## [ reached max_ndoc ... 994 more documents ]

Q3.3. Create document-feature matrix

fake_real_dfmat <- dfm(fake_real_toks, tolower = TRUE) %>%
  dfm_trim(min_termfreq = 5, min_docfreq = 10)
head(fake_real_dfmat, 5) %>%
  kbl() %>%
  kable_styling(bootstrap_options = "striped", full_width = F, position = "left")
## Warning: 'as.data.frame.dfm' is deprecated.
## Use 'convert(x, to = "data.frame")' instead.
## See help("Deprecated")
doc_id syria attack symptoms nerve victims suspected chemical appeared world health organization wednesday cases additional signs exposure chemicals category includes statement putting death toll least united states deaths caused sarin gas dropped syrian aircraft russia poison rebel weapons depot struck bombs chlorine mustard also believed used past russian defence ministry spokesman say rebels aleppo last year likely kind injuries died similar including experts turkey giving workers idlib treatment patients types sent u.n commission inquiry human rights previously forces loyal president bashar al-assad multiple hundreds civilians ghouta outskirts damascus august assads government denied responsibility agreed destroy deal brokered moscow washington ally china repeatedly nations move assad situation international criminal banned law director reuters homs governor says u.s see losses missile strike airbase near city friday resulted casualties talal armed terrorist groups islamic state adding targeted providing air support army operations east palmyra speaking series phone media confirmed interview lebanese tv station god material damage hope many martyrs told telephone dawn rescue going two hours base attempt arab combat terrorism policy change targeting first dont added separate war continue donald trump strikes deadly launched week national security officials military fired dozens missiles response rebel-held area blamed strongly positions order long run bomb blast crowded bus convoy outside reached people observatory monitoring group sunday civil away bodies site hit buses carrying shiite residents cross territory evacuation warring sides british-based number expected rise killed mostly villages kefraya province included fighters immediate claim carried suicide car bomber several hundred pro-government safe passage besieged madaya town allies waiting government-held aleppos miles took place evacuees heard kills six injured salah district television reported without details located west old part enclave taken advance december dead fighting key road clashes regime troops overnight failed bid oppositions supply route monitor faylaq al-sham islamist faction al-qaeda affiliate al-nusra front trying castello effectively severed thursday afp bombing northeast hasaka northeastern tuesday attacker detonated explosives bakery wounded serious areas another qamishli attacks recent months kurdish ypg militia controls captured large involved offensive jihadists turkish border heavy raids stronghold child among de facto capital saturday rest raqa u.s.-led coalition september significant executed deny daesh throughout iraq colonel one largest deliberate conducted date daeshs engaged targets destroying transit routes severely freedom movement leading extremist caliphate control emerged now around half countrys though much land holds desert since conflict began march feb driving ambulance four unprecedented hospital syrias time came earlier northern village children man packed vehicle unclear whether rami abdel rahman specify nature explosion heart western soldiers come rocket fire latakia seen rounds containing father brother years pro-democracy revolt seeking unleashed brutal crackdown kill meanwhile killings entered aimed cutting lines families resistance house opened along family encircle north recaptured include claimed lives commander according thousands ground warplanes parts country women eight barrel building opposition-held commercial shelling regime-held force latest across un council resolution end sieges indiscriminate populated documented killing men bombings siege result food medical shortages despite fact inside ten reports al region others sat aug due evening correspondent explosive led person injury addition causing huge damages within february eastern continues assault day allied stepped governorate douma airstrikes days teams volunteers search survivors rubble amid mass destruction neighbourhoods activist mainly campaign residential buildings destroyed citys office retaliation administration leader islam opposition declared zone shot escalation break controlled activists worlds attention tragedy using pictures videos posted receiving makeshift hospitals well pulled high civilian body sites coalitions uprising called community put pressure stop massacres immediately alliance locations towns kafr refugee camp free nusra pushed deir surrounding iranian-backed set backed iranian major daraa fierce members al-qaedas operation seize point three quneitra golan heights ambush abdulrahman news agency independently official sana quoted source saying able restore tal al-hawa southwestern countryside local coordination committee forced range member fsa southern command lebanon just battle made iraqi militias light battles brigade announced tags monday south northwest affiliated houses belonging former stated son deputy chief staff recently abu hassan violations committed issued special release nearly ago stormed headquarters ain return prevent attacked lost popular become target operating overthrow organisation governments early november started factions particularly seized provincial july online new video showing released militants raqqa allegedly extremists june facebook page shows young footage hussein gunmen head close follows purportedly central scores fell showed trucks notorious britain-based may capture raised concern might try middle edge ancient elsewhere blood faces apparently black back heads qaeda offshoot blew neighborhood divided based violence remaining hands bombardment zahra brought main hub abdul responded aerial insurgents social images towards fallen insurgent foiled truck neighbourhood repelled late followed daily intense wounding devastated fled ibrahim via living difficult humanitarian conditions capturing research center retake far committees regain observatorys abdurrahman wearing coordinated ahrar calls seeks liberate iran regional crisis northwestern kidnapped christian known line agreement bank development worth saudi arabia countries tehran leaders talks envoy senior general so-called sunni independent however powers current million population leave homes second less mistura hezbollah zabadani double takes levant powerful rival wide tuesdays published post moderate claiming jaysh al-fateh conquest report various al-qaeda-linked reportedly police liberated mountain protests mosque met amount gains round parties directly reach political solution grip launching state-run al-manar ran scenes explosions white smoke sources regimes secure airstrike hasakeh holy helicopters yesterday short today strategic revolution attempts territories highway held shortly supporters twitter obama al-bab crude lies intensified efforts fronts nearby airport strategically important iss embattled heavily bombarded shelled provinces shia consecutive kafraya shells morning largely muslims bastion raged multi-front anti-government coastal vital al-assads sohr runs uk-based ongoing militant attackers terrorists month battling push present fight us-led pro-regime militiamen dozen dealt great units advanced times yet initially districts bombers israeli side ceasefire five plane spokeswoman comment incident drone entrance islamists surrounded minority expressed square kilometres neighbouring crashed leaving warplane slammed hama suffered loss name market clear centre later photo seven reduced street identified nine different casualty figures damaged left displaced syrians refugees qalamoun jaish al-islam prominent truce whose pledged hand go failure training mission hardline like considered erupted millions april massacre beirut toxic khan sheikhoun injuring pointed described accusations jets continued following aggression treated mouth asharq al-awsat never affairs crime turning suburbs crimes investigators looking alleged hold meeting discuss matter prohibition opcw seriously process gathering information available condemned unacceptable heinous actions french representative european union foreign happened horrific sure responsibilities suffering case wake weekend points ambulances rushed arrived convoys spoke behind split home allowed find contact everything given evacuated deals amounts displacement opponents urban centers little feared join moved widespread shops single third live nothing broke want know referring plan get good unknown authorities night sound rockets take next severe medicine widely al-rashideen lot cities london established publication in-depth coverage entire english rocked complex kilometers rashidin suburb device went provide occurred fighter managed drive remain resumed regime-controlled toward remained stood parked vehicles repeated massive string tactics fate linked agreements aid worst six-year aftermath future claims previous american supports team inspectors investigation underway either woman still condition anonymity soon almost concerns concentrated planes gases struggling foaming dr received account breathing associated defense press scene streets witness watch accused opposition-controlled final joint watchdog determined involving isis responsible doctors borders thirteen facilities pm helicopter service emergency care department provided although remains services affected facility longer defeat battlefield victory advances stressed tanks personnel regions website agree coming officially jordan carry work youtube confirm determine type monitors citizens john position russias biggest acknowledged life experienced progress achieved tunnels possible jabhat unit tunnel mohammed message manbij necessary measures avoid beginning risen mosques schools intensive school fleeing posts armys ahmad alongside qaedas warned strong circulated separately fall internationally network verified evidence suffocation peoples protection renewed tensions fought oil-rich internet pkk party democratic pyd kurds clearly meant pretext stressing stand checkpoints running public looked even face probe seizing atrocities executions calling establish completely wing western-backed cut moving enter estimated numerous regularly neighborhoods channel together joined october working withdrew lived omar field mustafa investigating urgent citing describing increase persons violent triggering sustained often rare intensity terror wounds checkpoint power plant tens flee predominantly dam recapture staged fateh jabal association artillery turkeys alawite sect battleground muslim alawites follow tel bringing aim boy quarter missing blaming rebel-controlled cooperation full crossing peaceful array autonomous named attacking violation cease-fire ensure daraya urum inspect reporting events gathered ramadan sham motorcycle ahead eid festival critical relies us-backed locked sdf medics vicious cracked spring uprisings unexpected ferocity war-battered ngo five-year raid anadolu daesh-held alone grave covered dust partly lying continuing help kurdish-led advancing cover neighboring girl assistance attempting supplies access bab inflicting cluster fuel worker already taking peace hostilities estimates protect reporter reporters war-torn dangerous journalists picture trt agencies fresh internal credible open urged bombardments amnesty investigate rises rejected halt trapped principles trtworld exploded blasts deadliest initial tank prayers vast rising shattered raging turkish-syrian vicinity sought refuge shelter comes upon context walk closed way can nationwide mark step prices anti-regime bring ali six-year-old ever making cessation negotiations need related iraqs vote global gag rule slovenian elections afghan migrants better blunders mbs reclaim sovereignty sudanese bashir dissolves appoints summit thousand words instagram miss wont spam respect privacy subscribe copyright schedule connect ios android satellite partner hotels corporate careers releases documentary legal terms cookie ammunition flying breached gunfire crew flight backing critically begin photographer whole thought january vomiting water risk dire resident unicef criticism pounded condemnation minister humanity diplomatic briefing british secretary involvement tayyip erdogan vladimir putin top importance demands demanded geneva saw harasta devastating jobar reconciliation afternoon must breaches threat eliminated turn visit lack keep tabqa southeast mosul begun filled witnesses allegations percent helmets debris southwest bombed action headed retook zones pause backer qatar stuck evacuate best pentagon effective kurdish-arab increased pushing read total firing currently reinforcements supporting helped forcing defend act belt deployed counter-offensive mid-2012 ended preparing basic drop ahmed battered goal faced planted repression atareb collapsed attempted childrens al-zahraa escalating operate economic intended contains powerhouse ravaged sheikh shields weeks direct outrage centres determines location patterns munitions allow 48-hour warning rescuers mortars majority delivered needed desperate khaled effort asked linking shared roads escalated locals demand eleven journalist devices roughly incendiary mortar mohammad clinic equipment sheikhun unable usually turned pointing substances repel cause prompting demonstrations cost belongs accuses swathes launch oust striking euphrates shield ankara considers violated strongholds baath demanding wave rebellion investigations floor numbers housing officers relief prompted gave ap private blame highly visited weapon barrage government-controlled holding heaviest education students fourth changed breaking ties gmt arm elderly infrastructure hitting evolved france britain accounts right active intervened resulting intervention kerry every sergei lavrov azaz purported bustan al-qasr relative escape call fatah uns presence dubbed christians getting hall thick pass torn updated mention arab-kurdish moment red crescent supported program directorate effect make start onslaught commit minutes sniper positioned barack small noting rural fully threatened branch tried noted intelligence cars machine gun igor konashenkov worked shock blow precise means mogambo delivering farms pre-war landed partners ez-zor links river isil counterattack hill higher lay blocks intensifying jihadist de-escalation tahrir mounted ezzor manal guns rafts maaret al-numan bin guards surface-to-surface driven offensives regained especially trumps shell term shots martyred organizations religious ranks corpses pits focused valley bastions found binnish formerly waging el-zour inflicted transporting appeal fear print tweet palestinian regular bases infiltrated resolutions karam formed university chaos stretch rose give machineguns burned southeastern figure arms oct oil twin mondays complete sep hideouts infiltrate clashed beheaded nov al-zor mercenaries mayadeen kamal egypt three-year jun militant-held protest maqsoud virtually trust km al-qaeda-affiliated beyond kremlin fires inaction schoolchildren radical got tightening mar female hazem successful mother crossings bani trained money outlawed actors commanders abortion policies 37th istanbul film egon schiele cy twombly episode showcase last-ditch bloodbath send al-sheikh foreign-backed limited armored equipped um liberation al-jarrah opposing al-balad launchers breach al-midan bulletin aerospace properties manar sabbagh sanas al- al-hamadaniyeh al-fouaa takfiri ghossoun al-furqan surroundings undermine roundabout sweida editing standards:the thomson lattakia machinegun-equipped al-ramouseh idleb al-faraj al-baath moreover meantime sputnik al-neel gatherings wide-scale ambushed mid-march direction thu mon fna ssh isils movements standardsdiscussion facebookcomment url unrest orchestrating ezour dens
Assignment2.csv.1 6 6 3 5 1 1 6 1 1 3 1 1 1 1 1 2 2 1 1 2 1 1 1 1 2 1 1 1 3 5 1 4 1 2 1 1 4 1 1 1 2 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Top features of DFM

topfeatures(fake_real_dfmat, 30)
##      syrian      killed      aleppo       syria      people        city 
##        3108        2709        1865        1771        1607        1532 
##   civilians      regime      forces      attack observatory  terrorists 
##        1418        1235        1220        1198        1185        1042 
##    province       least   terrorist       group        army         air 
##        1022        1011        1003         999         986         967 
##     strikes        town         two        also  government    damascus 
##         883         807         795         791         790         776 
##     injured   including     russian      syrias    children       since 
##         759         751         713         692         683         678

Q4. Keyword-incontexts analysis

3 relevant key words (Kill, Terror, Attack)

kw_kill <- kwic(fake_real_toks_orig, pattern = "kill*", window = 3)
head(kw_kill, 5) %>%
  kbl() %>%
  kable_styling(bootstrap_options = "striped", full_width = F, position = "left")
docname from to pre keyword post pattern
Assignment2.csv.3 96 96 to rise Those killed were mostly residents kill*
Assignment2.csv.4 6 6 Aleppo bomb blast kills six Syrian state kill*
Assignment2.csv.4 14 14 A bomb blast killed six people and kill*
Assignment2.csv.5 17 17 Syrian rebels were killed in clashes with kill*
Assignment2.csv.5 56 56 Al-Nusra Front were killed trying to reopen kill*
kw_terrorist <- kwic(fake_real_toks_orig, pattern = "terror*", window = 3)
head(kw_terrorist, 5) %>%
  kbl() %>%
  kable_styling(bootstrap_options = "striped", full_width = F, position = "left")
docname from to pre keyword post pattern
Assignment2.csv.2 59 59 interests of armed terrorist groups including Islamic terror*
Assignment2.csv.2 172 172 for the armed terrorist groups and it terror*
Assignment2.csv.2 190 190 Army to combat terrorism Speaking to Syrian terror*
Assignment2.csv.2 234 234 The war against terrorism will continue U.S terror*
Assignment2.csv.2 331 331 the goals of terrorism in Syria and terror*
kw_attack <- kwic(fake_real_toks_orig, pattern = "attack*", window = 3)
head(kw_attack, 5) %>%
  kbl() %>%
  kable_styling(bootstrap_options = "striped", full_width = F, position = "left")
docname from to pre keyword post pattern
Assignment2.csv.1 4 4 Wed Apr Syria attack symptoms consistent with attack*
Assignment2.csv.1 17 17 a suspected chemical attack in Syria appeared attack*
Assignment2.csv.1 149 149 used in the attack but said the attack*
Assignment2.csv.1 179 179 used in the attack because sufferers had attack*
Assignment2.csv.1 279 279 a sarin gas attack in Ghouta on attack*

Q5. Perform LDA Topic Modeling

5.1 Set the number of topics to 5 and visualize the top 5 keywords in each topic

fake_real_dtmat = quanteda::convert(fake_real_dfmat, to="topicmodels")
fake_real_lda5 <- LDA(fake_real_dtmat, k = 5, control = list(seed = 123))
fake_real_lda5_betas <- broom::tidy(fake_real_lda5)
top_terms_in_topics <- fake_real_lda5_betas %>%
  group_by(topic) %>%
  top_n(5, beta) %>%
  ungroup() %>%
  arrange(topic, -beta)
top_terms_in_topics %>%
  mutate(term = reorder(term, beta)) %>%
  ggplot(aes(term, beta, fill = factor(topic))) +
  geom_col(show.legend = FALSE) +
  facet_wrap(~ topic, scales = "free") +
  coord_flip()

5.2 Find the best number of topics based on perplexity

train_fake_real_dtmat <- corpus_subset(fake_real_corp)[1:500,] %>%
  tokens(remove_punct = TRUE, remove_numbers = TRUE,
         remove_symbols = TRUE, remove_url = TRUE) %>%
  dfm(tolower = TRUE) %>%
  dfm_remove(myStopWords) %>%
  dfm_trim(min_termfreq = 5, min_docfreq = 10) %>%
  quanteda::convert(to="topicmodels")

test_fake_real_dtmat <- corpus_subset(fake_real_corp)[501:1000,] %>%
  tokens(remove_punct = TRUE, remove_numbers = TRUE,
         remove_symbols = TRUE, remove_url = TRUE) %>%
  dfm(tolower = TRUE) %>%
  dfm_remove(myStopWords) %>%
  dfm_trim(min_termfreq = 5, min_docfreq = 10) %>%
  quanteda::convert(to="topicmodels")

train_fake_real_lda5 <- LDA(train_fake_real_dtmat, k = 5, control = list(seed = 123))
perplexity(train_fake_real_lda5, test_fake_real_dtmat)
## [1] 491.0305
n_topics_vec = 2:5 # try different num of topics: 2, 3, 4, 5
# this analysis will take a while
perplexity_vec = map_dbl(n_topics_vec, function(kk) {
  message(kk)
  train_fake_real_ldaK <- LDA(train_fake_real_dtmat, k = kk, control = list(seed = 123))
  perp = perplexity(train_fake_real_ldaK, test_fake_real_dtmat)
})
## 2
## 3
## 4
## 5
lda_perplexity_result = tibble(
  n_topics = n_topics_vec, perplexity = perplexity_vec
)

plot(lda_perplexity_result, type="l")

Observation: As per the above perplexity 5 topics would be best number

5.3 Use ldatuning to find the best number of topics based on the CaoJuan2009,Arun2010, and Deveaud2014 measures

n_topics_vec = 2:5 # try different num of topics: 2, 3, 4, 5
lda_ldatuning_result <- FindTopicsNumber(
  fake_real_dtmat, topics = n_topics_vec,
  metrics = c("CaoJuan2009", "Arun2010", "Deveaud2014"),
  method = "VEM", control = list(seed = 123), mc.cores = 4L, verbose = TRUE
)
## fit models... done.
## calculate metrics:
##   CaoJuan2009... done.
##   Arun2010... done.
##   Deveaud2014... done.
FindTopicsNumber_plot(lda_ldatuning_result)
## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.

Observation: As per the measures, 5 would be best number of topics

5.4 Use the best number of topics (if the results are inconsistent, pick one that has fewer number of topics) and fit a LDA model

fake_real_lda5 <- LDA(fake_real_dtmat, k = 5, control = list(seed = 123))
topicmodels::terms(fake_real_lda5, 10)
##       Topic 1     Topic 2    Topic 3       Topic 4     Topic 5     
##  [1,] "terrorist" "world"    "killed"      "syrian"    "syrian"    
##  [2,] "injured"   "trt"      "syrian"      "syria"     "army"      
##  [3,] "aleppo"    "syrian"   "observatory" "attack"    "terrorists"
##  [4,] "rocket"    "syria"    "people"      "regime"    "killed"    
##  [5,] "city"      "regime"   "aleppo"      "chemical"  "isil"      
##  [6,] "shells"    "killed"   "city"        "people"    "daesh"     
##  [7,] "killed"    "agencies" "least"       "civilians" "syria"     
##  [8,] "others"    "youtube"  "syria"       "russian"   "forces"    
##  [9,] "source"    "follow"   "civilians"   "weapons"   "militants" 
## [10,] "civilians" "russian"  "group"       "aleppo"    "terrorist"

5.5 Show topic-specific diagnostics from the topicdoc package for the best model

topicdoc_result = topic_diagnostics(fake_real_lda5, fake_real_dtmat)
topicdoc_result
##   topic_num topic_size mean_token_length dist_from_corpus tf_df_dist
## 1         1   217.8263               6.5        0.6085218   31.03688
## 2         2   341.4541               5.9        0.4872859   31.46666
## 3         3   478.6614               6.3        0.3279689   37.99849
## 4         4   550.4067               6.6        0.3998285   35.64620
## 5         5   391.6514               6.4        0.4637765   34.55099
##   doc_prominence topic_coherence topic_exclusivity
## 1            175       -49.20327          9.642820
## 2             57       -62.47401          9.171866
## 3            549       -33.76488          7.926144
## 4            289       -59.40339          7.932566
## 5            351       -68.95198          8.999228

Q6. Fit a Structure Topic Model (STM)

6.1 Include the document-level variable(s) to fit a STM that has 5 topics

fake_real_v2_df = fake_real_df %>%
  select(doc_id, source, date, location, labels, text) #we are only considering selected columns for STM

fake_real_v2_corp = corpus(
  fake_real_v2_df,
  docid_field = "doc_id",
  text_field = "text")

vars <- docvars(fake_real_v2_corp)
head(vars)
##   source    date location labels
## 1    nna  4/5/17    idlib      0
## 2    nna  4/7/17     homs      0
## 3    nna 4/16/17   aleppo      0
## 4    nna 4/19/17   aleppo      0
## 5    nna 7/10/16   aleppo      0
## 6    nna  7/5/16  hasakeh      0
fake_real_v2_toks <- tokens(fake_real_v2_corp, remove_punct = T, remove_numbers = T,
                            remove_symbols = T, remove_url = T) %>%
  tokens_remove(pattern = myStopWords) %>%
  tokens_keep(min_nchar = 2)
fake_real_v2_dfmat <- dfm(fake_real_v2_toks, tolower = T) %>%
  dfm_trim(min_termfreq = 5, min_docfreq = 10)
stm_fake_real_v2_dfmat <- quanteda::convert(fake_real_v2_dfmat, to = "stm")
out <- prepDocuments(
  stm_fake_real_v2_dfmat$documents, stm_fake_real_v2_dfmat$vocab, stm_fake_real_v2_dfmat$meta)

6.2.1 Fit STM model

fake_real_v2_tmob_stm <- stm(
  out$documents, out$vocab, K=5,
  prevalence=~s(labels)+source+location+date, #for topical prevalence; s() = b-spline
  data=out$meta, #for topical content
  init.type="Spectral", seed=123)
## Warning in splines::bs(x, df, ...): 'df' was too small; have used 3
## Beginning Spectral Initialization 
##   Calculating the gram matrix...
##   Finding anchor words...
##      .....
##   Recovering initialization...
##      ....................
## Initialization complete.
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (4 seconds). 
## Completing Iteration 1 (approx. per word bound = -6.678) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (3 seconds). 
## Completing Iteration 2 (approx. per word bound = -6.480, relative change = 2.972e-02) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 3 (approx. per word bound = -6.427, relative change = 8.185e-03) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 4 (approx. per word bound = -6.409, relative change = 2.787e-03) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 5 (approx. per word bound = -6.401, relative change = 1.153e-03) 
## Topic 1: terrorist, aleppo, injured, rocket, city 
##  Topic 2: syrian, attack, chemical, syria, weapons 
##  Topic 3: syrian, army, terrorists, killed, syria 
##  Topic 4: killed, syrian, aleppo, civilians, regime 
##  Topic 5: people, killed, syrian, attack, bomb 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 6 (approx. per word bound = -6.398, relative change = 5.841e-04) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 7 (approx. per word bound = -6.395, relative change = 3.540e-04) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 8 (approx. per word bound = -6.394, relative change = 2.365e-04) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 9 (approx. per word bound = -6.393, relative change = 1.726e-04) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 10 (approx. per word bound = -6.392, relative change = 1.337e-04) 
## Topic 1: terrorist, injured, aleppo, rocket, city 
##  Topic 2: syrian, attack, syria, chemical, regime 
##  Topic 3: syrian, army, terrorists, killed, syria 
##  Topic 4: killed, aleppo, syrian, civilians, regime 
##  Topic 5: people, killed, syrian, attack, bomb 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 11 (approx. per word bound = -6.391, relative change = 1.015e-04) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 12 (approx. per word bound = -6.391, relative change = 7.710e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 13 (approx. per word bound = -6.390, relative change = 6.146e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 14 (approx. per word bound = -6.390, relative change = 5.019e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 15 (approx. per word bound = -6.390, relative change = 4.075e-05) 
## Topic 1: terrorist, injured, aleppo, rocket, city 
##  Topic 2: syrian, attack, syria, regime, chemical 
##  Topic 3: syrian, army, terrorists, killed, syria 
##  Topic 4: killed, aleppo, syrian, civilians, observatory 
##  Topic 5: people, killed, syrian, attack, bomb 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 16 (approx. per word bound = -6.390, relative change = 3.268e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 17 (approx. per word bound = -6.389, relative change = 2.680e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 18 (approx. per word bound = -6.389, relative change = 2.300e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 19 (approx. per word bound = -6.389, relative change = 2.065e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 20 (approx. per word bound = -6.389, relative change = 1.928e-05) 
## Topic 1: terrorist, injured, aleppo, rocket, city 
##  Topic 2: syrian, attack, syria, regime, chemical 
##  Topic 3: syrian, army, terrorists, killed, syria 
##  Topic 4: killed, aleppo, syrian, civilians, observatory 
##  Topic 5: people, killed, syrian, attack, bomb 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 21 (approx. per word bound = -6.389, relative change = 1.809e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 22 (approx. per word bound = -6.389, relative change = 1.603e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 23 (approx. per word bound = -6.389, relative change = 1.481e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 24 (approx. per word bound = -6.389, relative change = 1.357e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 25 (approx. per word bound = -6.389, relative change = 1.300e-05) 
## Topic 1: terrorist, injured, aleppo, rocket, city 
##  Topic 2: syrian, attack, syria, regime, chemical 
##  Topic 3: syrian, army, terrorists, killed, syria 
##  Topic 4: killed, aleppo, syrian, civilians, observatory 
##  Topic 5: people, killed, syrian, attack, observatory 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 26 (approx. per word bound = -6.388, relative change = 1.247e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 27 (approx. per word bound = -6.388, relative change = 1.189e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 28 (approx. per word bound = -6.388, relative change = 1.129e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 29 (approx. per word bound = -6.388, relative change = 1.069e-05) 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Completing Iteration 30 (approx. per word bound = -6.388, relative change = 1.033e-05) 
## Topic 1: terrorist, injured, aleppo, rocket, city 
##  Topic 2: syrian, syria, attack, regime, chemical 
##  Topic 3: syrian, army, terrorists, killed, syria 
##  Topic 4: killed, aleppo, syrian, observatory, civilians 
##  Topic 5: people, killed, syrian, attack, observatory 
## ....................................................................................................
## Completed E-Step (0 seconds). 
## Completed M-Step (2 seconds). 
## Model Converged

6.2.2 Show the summary plot for the model

plot(fake_real_v2_tmob_stm, type="summary", n=5)

6.3 Use stm::topicQuality() to visualize the quality of the topics

topicQuality(fake_real_v2_tmob_stm, out$documents)
## [1] -31.06687 -45.85757 -44.51806 -26.42318 -36.69838
## [1] 9.636742 8.133566 8.864130 7.804913 8.172941

6.4 Interpret what you see from these results

Semantic coherence measures the consistency of the words used within the topic. Larger values are better and mean the topic is more consistent.

Exclusivity measures how distinctive the top words are to that topic.For this,larger or smaller is not necessarily better or worse, but indicates whether the topic is unique (high value) or broad (low value).

Topic 4 has more semantic coherence which makes it more consistent and Topic 1 has high value of exclusivity which makes the topic more unique.

Q7. Fit a Keyword Assisted Topic Model

7.1 Come up with at least 4 sets of keywords, each associated with a topic

keyATM_docs <- keyATM_read(texts = fake_real_dfmat)
## Using quanteda dfm.
fake_real_key_list = list(
  Terrorist = c("terrorist", "injured", "material", "damage", "rocket", "shells","neighborhood","attacks","fired"),
  Army_people = c("army", "civilians", "syrian","people","isil","militants","countryside"),
  Strikes = c("aleppo", "observatory", "strikes","regime","air"),
  Weapons = c("chemical", "weapons", "russian", "assad","attack")
)
fake_real_key_viz <- visualize_keywords(docs = keyATM_docs, keywords = fake_real_key_list)
fake_real_key_viz

7.2 Fit a keyATM Base model with the keyword sets and allow 2 topics to be outside the scope of the provided keyword sets

fake_real_tmod_keyatm_base <- keyATM(
  docs = keyATM_docs, # text input
  no_keyword_topics = 2, # number of topics without keywords
  keywords = fake_real_key_list, # keywords
  model = "base", # select the model
  options = list(seed = 123))
## Initializing the model...
## Fitting the model. 1500 iterations...
## Creating an output object. It may take time...

7.3 Show top 5 keywords in each topic

top_words(fake_real_tmod_keyatm_base, 5)
##     1_Terrorist 2_Army_people       3_Strikes   4_Weapons    Other_1 Other_2
## 1 terrorist [✓]    syrian [✓]          killed  syrian [2]      state   world
## 2    aleppo [3]      army [✓]      aleppo [✓]  attack [✓] people [2]     trt
## 3   injured [✓]    terrorists      regime [✓] russian [✓]      group   daesh
## 4    rocket [✓] civilians [✓] observatory [✓]       syria      daesh    news
## 5          city        killed     strikes [✓]   assad [✓]       near  follow

Summary

As a part of this assignment, we used topic modeling for finding clusters of words that characterize a set of documents. From this we understood the context of data.