This shows you the differences between two versions of the page.
pajek:faq:format [2017/05/20 21:26] vlado [Matrix] |
pajek:faq:format [2020/09/21 00:24] (current) vlado [Two mode networks] |
||
---|---|---|---|
Line 196: | Line 196: | ||
==== Two mode networks ==== | ==== Two mode networks ==== | ||
+ | |||
+ | In a **two-mode** network **N**=((**U**,**V**),**L**,**P**,**W**) the set of nodes consists of two disjoint (sub)sets of nodes **U** and **V**, and all the links from **L** have one endnode in **U** and the other endnode in **V**. Often also a weight w : **L** → ℝ ∈ **W** is given; if not, we assume w(u,v)=1 for all (u,v) ∈ **L**. | ||
+ | |||
+ | A two-mode network can also be described by a rectangular matrix **A** = [a<sub>uv</sub>]<sub>**U**☓**V**</sub>. | ||
+ | |||
+ | |||
+ | Examples:\\ | ||
+ | ((persons, societies), years of membership),\\ | ||
+ | ((buyers/consumers, goods), quantity),\\ | ||
+ | ((parlamentarians, problems), positive vote),\\ | ||
+ | ((persons, journals), reading). | ||
+ | |||
+ | A two-mode network is announced by\\ | ||
+ | ''*vertices'' n n<sub>U</sub> | ||
+ | |||
+ | [[http://vlado.fmf.uni-lj.si/pub/networks/data/2mode/sandi/sandi.htm|Authors and works]].\\ | ||
+ | The southern women event participation data (Davis) | ||
+ | [[http://vlado.fmf.uni-lj.si/pub/networks/data/GBM/davis.htm|page]]. | ||
==== Multirelational networks ==== | ==== Multirelational networks ==== | ||
+ | |||
+ | |||
+ | A **multi-relational network** is denoted by **N** =(**V**, (**L**<sub>1</sub>,**L**<sub>2</sub>,...,**L**<sub>k</sub>),**P**,**W**) | ||
+ | and contains different relations **L**<sub>i</sub> (sets of links) over the same set of nodes. Also the | ||
+ | weights from **W** are defined on different relations or their union. | ||
+ | |||
+ | Examples of such networks are: | ||
+ | Transportation system in a city (stations, lines); | ||
+ | [[http://vlado.fmf.uni-lj.si/pub/networks/data/dic/Wordnet/Wordnet.zip|WordNet]] | ||
+ | (words, semantic relations: synonymy, antonymy, hyponymy, meronymy,...), | ||
+ | [[http://vlado.fmf.uni-lj.si/pub/networks/data/KEDS/|KEDS]] | ||
+ | networks (states, relations between states: Visit, Ask information, Warn, Expel person, ...), ... | ||
+ | |||
+ | The relation can be assigned to a link in two ways: | ||
+ | |||
+ | * add to a keyword for description of links (''*arcs'', ''*edges'', ''*arcslist'', ''*edgeslist'', ''*matrix'') the number of relation followed by its name:\\ ''*arcslist :3 "sent a letter to"''\\ All links controlled by this keyword belong to the specified relation ([[http://vlado.fmf.uni-lj.si/pub/networks/pajek/data/Sampson.net|Sampson]], [[http://vlado.fmf.uni-lj.si/pub/networks/pajek/data/SampsonL.net|SampsonL]]). | ||
+ | * Any link controlled by ''*arcs'' or ''*edges'' can be assigned to selected relation by starting its description by the number of this relation\\ ''3: 47 14 5''\\ Link with endnodes ''47'' and ''14'' and weight ''5'' belongs to relation ''3''. | ||
+ | |||
+ | |||
+ | **Multi-relational temporal network -- KEDS/WEIS** | ||
+ | |||
+ | <code> | ||
+ | % Recoded by WEISmonths, Sun Nov 28 21:57:00 2004 | ||
+ | % from http://www.ku.edu/~keds/data.dir/balk.html | ||
+ | *vertices 325 | ||
+ | 1 "AFG" [1-*] | ||
+ | 2 "AFR" [1-*] | ||
+ | 3 "ALB" [1-*] | ||
+ | 4 "ALBMED" [1-*] | ||
+ | 5 "ALG" [1-*] | ||
+ | ... | ||
+ | 318 "YUGGOV" [1-*] | ||
+ | 319 "YUGMAC" [1-*] | ||
+ | 320 "YUGMED" [1-*] | ||
+ | 321 "YUGMTN" [1-*] | ||
+ | 322 "YUGSER" [1-*] | ||
+ | 323 "ZAI" [1-*] | ||
+ | 324 "ZAM" [1-*] | ||
+ | 325 "ZIM" [1-*] | ||
+ | *arcs :0 "*** ABANDONED" | ||
+ | *arcs :10 "YIELD" | ||
+ | *arcs :11 "SURRENDER" | ||
+ | *arcs :12 "RETREAT" | ||
+ | ... | ||
+ | *arcs :223 "MIL ENGAGEMENT" | ||
+ | *arcs :224 "RIOT" | ||
+ | *arcs :225 "ASSASSINATE TORTURE" | ||
+ | *arcs | ||
+ | 224: 314 153 1 [4] 890402 YUG KSV 224 (RIOT) RIOT-TORN | ||
+ | 212: 314 83 1 [4] 890404 YUG ETHALB 212 (ARREST PERSON) ALB ETHNIC JAILED IN YUG | ||
+ | 224: 3 83 1 [4] 890407 ALB ETHALB 224 (RIOT) RIOTS | ||
+ | 123: 83 153 1 [4] 890408 ETHALB KSV 123 (INVESTIGATE) PROBING | ||
+ | ... | ||
+ | 42: 105 63 1 [175] 030731 GER CYP 042 (ENDORSE) GAVE SUPPORT | ||
+ | 212: 295 35 1 [175] 030731 UNWCT BOSSER 212 (ARREST PERSON) SENTENCED TO PRISON | ||
+ | 43: 306 87 1 [175] 030731 VAT EUR 043 (RALLY) RALLIED | ||
+ | 13: 295 35 1 [175] 030731 UNWCT BOSSER 013 (RETRACT) CLEARED | ||
+ | 121: 295 22 1 [175] 030731 UNWCT BAL 121 (CRITICIZE) CHARGES | ||
+ | 122: 246 295 1 [175] 030731 SER UNWCT 122 (DENIGRATE) TESTIFIED | ||
+ | 121: 35 295 1 [175] 030731 BOSSER UNWCT 121 (CRITICIZE) ACCUSED | ||
+ | </code> | ||
+ | |||
+ | [[http://www.ukans.edu/~keds/|KEDS - Kansas Event Data System]] | ||
==== Temporal networks ==== | ==== Temporal networks ==== | ||
+ | |||
+ | A **temporal network** **N**<sub>T</sub> =(**V**,**L**,**P**,**W**, T) is obtained if the //time// T is attached to an ordinary network. | ||
+ | T is a set of //time points// t ∈ T. | ||
+ | |||
+ | In temporal network nodes v ∈ **V** | ||
+ | and links l ∈ **L** are not | ||
+ | necessarily present or active in all time points. | ||
+ | If a link l(u,v) is active in time point t then | ||
+ | also its endnodes u and v should be active | ||
+ | in time t. | ||
+ | |||
+ | |||
+ | We will denote the network consisting of links and | ||
+ | nodes active in time t ∈ T by **N**(t) | ||
+ | and call it a //time slice// in time point t. | ||
+ | To get time slices in Pajek use | ||
+ | |||
+ | ''Network/Temporal Network/Generate in time'' | ||
+ | |||
+ | |||
+ | **Temporal networks - presence** | ||
+ | |||
+ | <code> | ||
+ | *Vertices 3 | ||
+ | 1 "a" [5-10,12-14] | ||
+ | 2 "b" [1-3,7] | ||
+ | 3 "e" [4-*] | ||
+ | *Edges | ||
+ | 1 2 1 [7] | ||
+ | 1 3 1 [6-8] | ||
+ | </code> | ||
+ | |||
+ | Node a is present in time points 5, 6, 7, 8, 9, 10 and 12, 13, 14. | ||
+ | |||
+ | Edge (1:3) is present in time points 6, 7, 8. | ||
+ | |||
+ | ''*'' means 'infinity'. | ||
+ | |||
+ | A link is present, if both its endnodes are present. | ||
+ | |||
+ | |||
+ | [[http://vlado.fmf.uni-lj.si/vlado/podstat/AO/net/Time.net|Time.net]]; | ||
+ | [[https://github.com/bavla/netsJSON|netsJSON]] | ||
+ | |||
+ | |||
+ | **Temporal networks - events** | ||
+ | |||
+ | ^ Event ^ Explanation ^ | ||
+ | | ''TI'' t | initial events -- following events happen when | | ||
+ | | | time point t starts | | ||
+ | | ''TE'' t | end events -- following events happen when | | ||
+ | | | time point t is finished | | ||
+ | | ''AV'' v n s | add vertex v with label n and properties s | | ||
+ | | ''HV'' v | hide node v | | ||
+ | | ''SV'' v | show node v | | ||
+ | | ''DV'' v | delete node v | | ||
+ | | ''AA'' u v s | add arc (u,v) with properties s | | ||
+ | | ''HA'' u v | hide arc (u,v) | | ||
+ | | ''SA'' u v | show arc (u,v) | | ||
+ | | ''DA'' u v | delete arc (u,v) | | ||
+ | | ''AE'' u v s | add edge (u:v) with properties s | | ||
+ | | ''HE'' u v | hide edge (u:v) | | ||
+ | | ''SE'' u v | show edge (u:v) | | ||
+ | | ''DE'' u v | delete edge (u:v) | | ||
+ | | ''CV'' v s | change property of node v to s | | ||
+ | | ''CA'' u v s | change property of arc (u,v) to s | | ||
+ | | ''CE'' u v s | change property of edge (u:v) to s | | ||
+ | | ''CT'' u v | change (un)directedness of link (u,v) | | ||
+ | | ''CD'' u v | change direction of arc (u,v) | | ||
+ | | ''PE'' u v s | replace pair of arcs (u,v) and (v,u) by single edge (u:v) | | ||
+ | | | with properties s | | ||
+ | | ''AP'' u v s | add pair of arcs (u,v) and (v,u) | | ||
+ | | | with properties s | | ||
+ | | ''DP'' u v | delete pair of arcs (u,v) and (v,u) | | ||
+ | | ''EP'' u v s | replace edge (u:v) by pair of arcs (u,v) and (v,u) | | ||
+ | | | with properties s | | ||
+ | |||
+ | |||
+ | |||
+ | s can be empty. | ||
+ | |||
+ | In case of parallel links :k denotes the k-th link - ''HE:3 14 37'' hides the third edge linking nodes ''14'' and ''37''. | ||
+ | |||
+ | <code> | ||
+ | *Vertices 3 | ||
+ | *Events | ||
+ | TI 1 | ||
+ | AV 2 "b" | ||
+ | TE 3 | ||
+ | HV 2 | ||
+ | TI 4 | ||
+ | AV 3 "e" | ||
+ | TI 5 | ||
+ | AV 1 "a" | ||
+ | TI 6 | ||
+ | AE 1 3 1 | ||
+ | TI 7 | ||
+ | SV 2 | ||
+ | AE 1 2 1 | ||
+ | TE 7 | ||
+ | DE 1 2 | ||
+ | DV 2 | ||
+ | TE 8 | ||
+ | DE 1 3 | ||
+ | TE 10 | ||
+ | HV 1 | ||
+ | TI 12 | ||
+ | SV 1 | ||
+ | TE 14 | ||
+ | DV 1 | ||
+ | </code> | ||
+ | |||
+ | [[http://vlado.fmf.uni-lj.si/vlado/podstat/AO/net/Time.tim|Time.tim]]; | ||
+ | [[http://vlado.fmf.uni-lj.si/vlado/podstat/AO/net/Friends.tim|Friends.tim]]. | ||
+ | |||
+ | ''File/Network/Read Time Events'' | ||
+ | |||
+ | Pictures in SVG: | ||
+ | [[http://vlado.fmf.uni-lj.si/pub/networks/doc/Terror/deg50/deg50001.htm|Terror news - 66 days]]. | ||
+ | |||
+ | <html> | ||
+ | <!-- | ||
+ | |||
+ | % Podatke o obdobjih prisotnosti/dejavnosti posamezne to"cke/povezave | ||
+ | % na koncu pripadajo"ce vrstice v oglatih oklepajih | ||
+ | % \texttt{[} in \texttt{]}. Obdobja so o"stevil"cena od 1 naprej. | ||
+ | % Pri na"stevanju jih lo"cimo z vejico \texttt{,}. Zaporedna obdobja | ||
+ | % od za"cetka $z$ do konca $k$ lahko kraj"se zapi"semo | ||
+ | % $z$\texttt{-}$k$. | ||
+ | |||
+ | |||
+ | |||
+ | %****************************************************************************** | ||
+ | \begin{frame}[fragile] | ||
+ | \frametitle{Temporal networks / September 11} | ||
+ | |||
+ | \small | ||
+ | |||
+ | \parbox{52mm}{\includegraphics[width=52mm]{d50t05z.png}} \quad | ||
+ | \parbox{43mm}{ | ||
+ | Steve Corman with collaborators from Arizona State University | ||
+ | transformed, using his | ||
+ | Centering Resonance Analysis | ||
+ | (\href{http://locks.asu.edu/terror/}{\textbf{\textit{CRA}}}), | ||
+ | daily Reuters news (66 days) about September 11th into a | ||
+ | temporal network of words coappearance. | ||
+ | } | ||
+ | |||
+ | |||
+ | % \href{http://vlado.fmf.uni-lj.si/pub/networks/doc/seminar/SolomonURLs.htm}% | ||
+ | % {\textbf{\textit{Spletni naslovi}}}. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | %****************************************************************************** | ||
+ | \begin{frame}[fragile] | ||
+ | \frametitle{Computer-assisted text analysis} | ||
+ | |||
+ | \small | ||
+ | |||
+ | An often used way to obtain networks is the \keyw{computer-assisted text analysis} | ||
+ | (CaTA).\medskip | ||
+ | |||
+ | \keyw{Terms} considered in TA are collected in a \keyw{dictionary} (it can be | ||
+ | fixed in advance, or built dynamically). The main two problems with terms are | ||
+ | \keyw{equivalence} (different words representing the same term) and | ||
+ | \keyw{ambiguity} (same word representing different terms). Because of | ||
+ | these the \keyw{coding} -- transformation of raw text data into formal | ||
+ | \keyw{description} -- is done often manually or semiautomaticly. | ||
+ | As \keyw{units} of TA we usually consider clauses, statements, paragraphs, | ||
+ | news, messages, \ldots | ||
+ | |||
+ | Till now the thematic and semantic TA mainly used statistical methods for | ||
+ | analysis of the coded data. | ||
+ | |||
+ | In thematic TA the units are coded as rectangular matrix\break | ||
+ | \textit{Text units} $\times$ \textit{Concepts} | ||
+ | which can be considered as a two-mode network. | ||
+ | |||
+ | Examples: M.M. Miller: \href{http://mmmiller.com/vbpro/vbpro.html}{VBPro}, | ||
+ | H. Klein: \href{http://www.textanalysis.info/}{Text Analysis}/ | ||
+ | \href{http://www.textquest.de/eindex.html}{TextQuest}. | ||
+ | \end{frame} | ||
+ | |||
+ | |||
+ | %****************************************************************************** | ||
+ | \begin{frame}[fragile] | ||
+ | \frametitle{\ldots approaches to CaTA} | ||
+ | |||
+ | \small | ||
+ | |||
+ | |||
+ | |||
+ | In semantic TA the units (often clauses) are encoded according | ||
+ | to the S-V-O (\textit{Subject}-\textit{Verb}-\textit{Object}) | ||
+ | model or its improvements.\medskip | ||
+ | |||
+ | \centerline{\includegraphics[width=55mm,bb=11 7 152 47,clip=]{./SVO.pdf}} | ||
+ | |||
+ | Examples: | ||
+ | \href{http://www.fp.rdg.ac.uk/sociology/people/academic/roberto/publications/socmeth89.pdf}{Roberto Franzosi}; | ||
+ | \href{http://web.ku.edu/keds/}{\textit{KEDS}}, | ||
+ | \href{http://web.ku.edu/keds/software.dir/tabari.html}{\textit{Tabari}}, | ||
+ | \href{http://vlado.fmf.uni-lj.si/pub/networks/pajek/data/KEDS/}% | ||
+ | {KEDS / Gulf}. | ||
+ | |||
+ | |||
+ | This coding can be directly considered as network with | ||
+ | \textit{Subjects} $\cup$ \textit{Objects} as nodes and links (arcs) | ||
+ | labeled with \textit{Verbs}.\medskip | ||
+ | |||
+ | See also \href{http://en.wikipedia.org/wiki/Resource_Description_Framework}{RDF} triples | ||
+ | in \href{http://www.w3.org/RDF/}{semantic web}, | ||
+ | \href{http://en.wikipedia.org/wiki/SPARQL}{SPARQL}. | ||
+ | |||
+ | \end{frame} | ||
+ | |||
+ | |||
+ | %****************************************************************************** | ||
+ | \begin{frame}[fragile] | ||
+ | |||
+ | |||
+ | \end{frame} | ||
+ | |||
+ | \section{Two-mode networks} | ||
+ | |||
+ | %****************************************************************************** | ||
+ | \begin{frame}[fragile] | ||
+ | \frametitle{Two-mode networks} | ||
+ | |||
+ | \pagecolor{LightYellow} | ||
+ | \small | ||
+ | |||
+ | In a \keyw{two-mode} network | ||
+ | $\network{N}=((\vertices{U},\vertices{V}),\edges{L},\functions{P},\functions{W})$ | ||
+ | the set of nodes consists of two disjoint sets of | ||
+ | nodes $\vertices{U}$ and $\vertices{V}$, and all | ||
+ | the links from $\edges{L}$ have one endnode | ||
+ | in $\vertices{U}$ and the other in $\vertices{V}$. | ||
+ | Often also a \keyw{weight} | ||
+ | $w:\edges{L}\to\RR \in \functions{W}$ is given; | ||
+ | if not, we assume $w(u,v)=1$ | ||
+ | for all $(u,v)\in \edges{L}$. | ||
+ | |||
+ | A two-mode network can also be described by a | ||
+ | rectangular matrix $\mathbf{A} = [a_{uv}]_{\vertices{U} \times \vertices{V}}$. | ||
+ | \[ | ||
+ | a_{uv} = | ||
+ | \begin{cases} | ||
+ | w_{uv} \quad & (u,v) \in \edges{L} \\ | ||
+ | 0 & \mbox{otherwise} | ||
+ | \end{cases} | ||
+ | \] | ||
+ | |||
+ | Examples: | ||
+ | (persons, societies, years of membership), | ||
+ | (buyers/consumers, goods, quantity), | ||
+ | (parlamentarians, problems, positive vote), | ||
+ | (persons, journals, reading). | ||
+ | |||
+ | A two-mode network is announced by | ||
+ | \texttt{*vertices} $n$ $n_\vertices{U}$ . | ||
+ | |||
+ | \href{http://vlado.fmf.uni-lj.si/pub/networks/data/2mode/sandi/sandi.htm}% | ||
+ | {Authors and works}. | ||
+ | |||
+ | \end{frame} | ||
+ | |||
+ | |||
+ | %****************************************************************************** | ||
+ | \begin{frame}[fragile] | ||
+ | \frametitle{Deep South} | ||
+ | |||
+ | |||
+ | |||
+ | \includegraphics[width=40mm]{Davis1.jpg} \quad | ||
+ | \parbox[b]{56mm}{\small Classical example of two-mode network | ||
+ | are the Southern women (Davis 1941).\\ | ||
+ | \href{http://vlado.fmf.uni-lj.si/vlado/podstat/AO/net/Davis.paj}{\texttt{Davis.paj}}. | ||
+ | Freeman's \href{http://books.nap.edu/books/0309089522/html/39.html}{overview}. | ||
+ | } | ||
+ | |||
+ | \centerline{\includegraphics[width=80mm]{Davis2.jpg}} | ||
+ | |||
+ | |||
+ | \end{frame} | ||
+ | --></html> | ||
===== Extended format ===== | ===== Extended format ===== | ||
+ | |||
+ | See [[http://mrvar.fdv.uni-lj.si/pajek/pajekman.pdf|Pajek manual]], page 89-95. |