Infrometric methods seminar
description
Transcript of Infrometric methods seminar
![Page 1: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/1.jpg)
INFROMETRIC METHODS SEMINARTutorial 3: Pajek basicsQi YU
![Page 2: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/2.jpg)
CONTENTS Getting started
Data format in Pajek
Window tools in Pajek
Resources
![Page 3: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/3.jpg)
CONTENTS Getting started
Data format in Pajek
Window tools in Pajek
Resources
![Page 4: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/4.jpg)
INTORDUCTION Pajek is a program, for Windows, for analysis and visualization of large
networks having some thousands or even millions of vertices. In Slovenian language the word pajek means spider.
![Page 5: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/5.jpg)
APPLICATION Pajek should provide tools for analysis and visualization of such networks:
collaboration networks, organic molecule in chemistry, protein-receptor interaction networks, genealogies, Internet networks, citation networks, diffusion (AIDS, news, innovations) networks, data-mining (2-mode networks), etc.
See also collection of large networks at: http://vlado.fmf.uni-lj.si/pub/networks/data/
![Page 6: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/6.jpg)
Approaches to deal with large networks
![Page 7: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/7.jpg)
MAIN GOALS to support abstraction by (recursive) decomposition of a large network into
several smaller networks that can be treated further using more sophisticated methods;
to provide the user with some powerful visualization tools;
to implement a selection of efficient (subquadratic) algorithms for analysis of large networks.
![Page 8: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/8.jpg)
CONTENTS Getting started
Data format in Pajek
Window tools in Pajek
Resources
![Page 9: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/9.jpg)
SIX DATA STRUCTURES IN PAJEK 1. network – main object (vertices and lines - arcs, edges):
- graph, valued network, multirelational, 2-mode or temporal network
2. partition - they tell for each vertex to which class vertex belong. Default extension: .clu
3. vector - they tell for each vertex some numerical property (real number). Default extension: .vec
4. permutation – reordering of vertices - reordering of vertices. Default extension: .per
5. cluster - subset of vertices (e.g. one class from partition). Default extension: .cls.
6. hierarchy - hierarchically vertices. Default extension: .hie
![Page 10: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/10.jpg)
NETWORK – .NET Network can be defined in different ways on input file. Look at three of them:
1. List of neighbours (Arcslist / Edgeslist)(see test 1.net)*Vertices 51 ”a”2 ”b”3 ”c”4 ”d”5 ”e”*Arcslist1 2 42 33 1 44 5*Edgeslist1 5
![Page 11: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/11.jpg)
EXPLANATION Data must be prepared in an input (ASCII) file. Program NotePad can be used for
editing. Much better is a shareware editor, TextPad.
Words, starting with *, must always be written in first column of the line. They indicate the start of a definition of vertices or lines.
Using *Vertices 5 we define a network with 5 vertices. This must always be the first statement in definition of a network.
Definition of vertices follows after that – to each vertex we give a label, which is displayed between “ and ”.
Using *Arcslist, a list of directed lines from selected vertices are declared (1 2 4 means, that there exist two lines from vertex 1, one to vertex 2 and another to vertex 4).
Similarly *Edgeslist, declares list of undirected lines from selected vertex.
In the file no empty lines are allowed – empty line means end of network.
![Page 12: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/12.jpg)
NETWORK – .NET 2. Pairs of lines (Arcs / Edges) (see test 2.net)
*Vertices 51 ”a”2 ”b”3 ”c”4 ”d”5 ”e”*Arcs1 2 11 4 12 3 23 1 13 4 24 5 1*Edges1 5 1
![Page 13: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/13.jpg)
EXPLANATION Directed lines are defined using *Arcs, undirected lines are defined using
*Edges. The third number in rows defining arcs/edges gives the value of the arc/edge.
In the previous format (Arcslist / Edgeslist) values of lines cannot be defined – the format is suitable only if all values of lines are 1.
If values of lines are not important the third number can be omitted (all lines get value 1).
In the file no empty lines are allowed – empty line means end of network.
![Page 14: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/14.jpg)
NETWORK – .NET 3.Matrix (see test 3.net)
*Vertices 51 ”a”2 ”b”3 ”c”4 ”d”5 ”e”*Matrix0 1 0 1 10 0 2 0 01 0 0 2 00 0 0 0 11 0 0 0 0
![Page 15: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/15.jpg)
EXPLANATION In this format directed lines (arcs) are given in the matrix form (*Matrix). If
we want to transform bidirected arcs to edges we can use “Net>Transform>Arcs to Edges>Bidirected only”
![Page 16: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/16.jpg)
ADDITIONAL DEFINITION OF NETWORK Only those elements necessary to define structure of network were
described so far. Additionally, Pajek enables precise definition of elements used for drawing networks (coordinates of vertices, shapes and colors of vertices and lines, ...).
Example: (see test 4.net)*Vertices 51 “a” box2 “b” ellipse3 “c” diamond4 “d” triangle5 “e” empty...
![Page 17: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/17.jpg)
INTERACTIVE DEFINITION OF NETWORKS Simple networks can be defined inside program Pajek as well without
definition in an input file: Select: “Net>Random Network>Total No. of Arcs”
![Page 18: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/18.jpg)
PARTITION – .CLU Partitions are used to describe nominal properties of vertices.
e.g., 1-men, 2-women
Definition in input file (see test.clu)
*Vertices 5
1
2
2
2
1
![Page 19: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/19.jpg)
INTERACTIVE DEFINITION OF PARTITIONS We can build a partition using Pajek too:
Use "Partition>Create Null Partition”, or Select “Draw>Draw-SelectAll”
Using that command three operations are executed: a new partition of equal dimension as the number of vertices is generated; all vertices are put to cluster 0, and the network is drawn using the obtained null partition (all vertices are cyan).
![Page 20: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/20.jpg)
VECTOR – .VET Vectors are used to describe numerical properties of vertices (e.g.,
centralities).
Definition in input file (see test.net)
*Vertices 5
0.58
0.25
0.25
0.08
0.25
![Page 21: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/21.jpg)
PAJEK PROJECT FILES Often it is the case that not only network but also several properties of the
vertices are known in advance. This properties are usually stored as partitions or vectors. It is time consuming to load objects one by one. Therefore it is convenient to store all data in one file, called Pajek project file (.paj). (see test.paj)
Project files can be produced manually by using “File>Pajek Project File>Save”
To load objects stored in Pajek project file select “File>Pajek Project File>Read”
![Page 22: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/22.jpg)
CONTENTS Getting started
Data format in Pajek
Window tools in Pajek
Resources
![Page 23: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/23.jpg)
MENU STRUCTURE The Main screen menus have a clear
logic. Manipulations that involve one type of
data object are listed under a menu with the object’s name; For example, the Net menu contains all
commands that operate on one network and the Nets menu lists operations on two networks.
Manipulations that need different kinds of objects are listed in the Operations menu. For example, if we want to extract a sub-
network that consists of men from the original network file, two kinds of files are needed, that is the original network file and the partition file in which each vertex is assigned to the class “men” or “women”. Then we should select the option “operations>extract from network>partition”
![Page 24: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/24.jpg)
MOST USED MENU FILE
NET
OPERATIONS
PARTITION
VECTOR
DRAW
INFO
![Page 25: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/25.jpg)
SOME COMMANDS IN DRAW WINDOW Options>Mark vertices using
selects the way vertices are marked inthe picture
Options>Lines visibility or nonvisibiliy of arcs and edges, selects the way lines are marked in the
picture
Options>Size selects the size of vertices, size of font, size of arrows and width of lines
Options>Colors selects background color, color of vertices, lines, font. . .
![Page 26: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/26.jpg)
CONTENTS Getting started
Data format in Pajek
Window tools in Pajek
Resources
![Page 27: Infrometric methods seminar](https://reader036.fdocuments.net/reader036/viewer/2022062309/56815792550346895dc525b8/html5/thumbnails/27.jpg)
RESOURCES Download
The latest version of Pajek is freely available, for non-commercial use, at its home page: http://vlado.fmf.uni-lj.si/pub/networks/pajek/
Text file into Pajek http://vlado.fmf.uni-lj.si/pub/networks/pajek/howto/text2pajek.htm
WoS to Pajek http://vlado.fmf.uni-lj.si/pub/networks/pajek/WoS2Pajek/default.htm
Tutorial Exploratory Social Network Analysis with Pajek
visit Pajek wiki for more information http://pajek.imfm.si/doku.php