Fantastic networks and where to find them

goo.gl/O6OEwz

(this presentation link)

Agenda

  • Special network types (some theory)
  • Querying DBPedia for graph data (some practice)
  • Advanced: processing networks with Python (some demo) *
  • Weekend

*If we have time & energy left

(and we probably won't)

Special network types

Some special network types:

  • Bipartite graph (bigraph)
  • Signed edges graph

Bipartite graph (bigraph)

Bipartite graph

  • If one colors all nodes in U white, and all nodes in V blue, each edge has endpoints of differing colors
  • If graph contains an odd cycle it can’t be bipartite

Bigraph examples

  • people - groups
  • candidates - jobs
  • authors - texts
  • directors - boards
  • advertisers - keywords
  • actors - movies
  • people - raitings

Bigraph examples

Real-size example

Bigraph partitioning

Incidence matrix after partitioning

Bipartite to ordinary graph

Find more examples at

Signed edges networks

Signed edges networks

  • Social networks: friendship - positive edge, animosity - negative edge
  • Local effect - global network properties
  • Complete graphs (cliques)
  • Dynamics of friendship, evolution of networks

Structural balance

Structural balance

  • Social balance theory, Heider 1946, Cartwright and Harary, 1956
  • Positivly connected nodes tend to match attitudes to third nodes
  • Signed triangle, balanced state — algebraic multiplication sign is positive
  • Complete graph is balances if every triange is balanced

Querying DBPedia for networks

Key concepts

  • Semantic Web
  • Linked open data (LOD)
  • Resource description framework (RDF)
  • SPARQL
  • Ontology
  • DBPedia

Semantic Web

The Semantic Web is about two things. It is about common formats for integration and combination of data drawn from diverse sources, where on the original Web mainly concentrated on the interchange of documents. It is also about language for recording how the data relates to real world objects. That allows a person, or a machine, to start off in one database, and then move through an unending set of databases which are connected not by wires but by being about the same thing.

Resource description framework (RDF)

  • RDF is a standard model for data interchange on the Web.

  • RDF extends the linking structure of the Web to use URIs to name the relationship between things as well as the two ends of the link (this is usually referred to as a “triple”). 

  • This linking structure forms a directed, labeled graph, where the edges represent the named link between two resources, represented by the graph nodes.

  • This graph view is the easiest possible mental model for RDF and is often used in easy-to-understand visual explanations.

RDF triples

  • subject -> predicate -> object
    • Даня -> worksAt -> Вышка 
  • But not just any Даня (URI's):
    • https://www.hse.ru/org/persons/11139310 ->
      http://www.w3.org/2006/vcard/ns#:org -> Вышка

SPARQL

  • SPARQL Protocol and RDF Query Language
  • Most forms of SPARQL query contain a set of triple patterns called a basic graph pattern.
  • Triple patterns are like RDF triples except that each of the subject, predicate and object may be a variable.
  • A basic graph pattern matches a subgraph of the RDF data when RDF terms from that subgraph may be substituted for the variables and the result is RDF graph equivalent to the subgraph.

Ontology

  • What's an ontology?

Онтология

  • В философии — наука, изучающая бытие
  • В информатике/инженерных науках —
    • формальное описание объектов
    • эксплицитная спецификация концептуализации (Грубер)
    • формальная теория, ограничивающая возможные концептуализации  мира
    • иерархически структурированное множество терминов, описывающих предметную область
    • ...и еще много длинных умных слов

Компоненты онтологии

  • классы
  • свойства (отношения, атрибуты)
    • ограничения (фасеты) свойств
  • функции и аксиомы
  • экземпляры (индивиды)

Классы

  • любая сущность, о которой может быть дана какая-либо информация.
  • абстрактные группы, коллекции или наборы объектов. Они могут включать в себя экземпляры, другие классы
  • обычно организованы в иерархическую классификацию понятий по отношению включения.
  • Классы Мужчина  и Женщина  являются подклассами класса Человек , который включен в класс   Млекопитающие .

Свойства

  • Простые унарные свойства
    • строка, число, булев тип
  • Бинарные (связывают два объекта)
    • трудоустройство (Даня, Вышка)
  • N-арные (связывают больше двух объектов)

Аксиомы

Работник, являющийся руководителем проекта, работает в проекте.

Вводятся переменные Е (работник) и P (руководитель проекта). Тогда аксиома записывается следующим образом:

Forall (E,P)  Employee(E) and  Head-Of-Project(E,P)
  => Works-At-Project(E,P)

Функции

Простая онтология

DBPedia

  • "...a crowd-sourced community effort to extract structured information from Wikipedia and make this information available on the Web" (dbpedia.org)
  • ...essentially, a structured part of Wikipedia

DBPedia

Putting it all togethert

Networks3

By danilsko

Networks3

  • 1,439