Skip to main content

Influ

pipeline status Finding influencers in social network

An application created as part of the project

Kto na kogo wpływa w sieci społecznej - aplikacja do wyszukiwania kluczowych węzłów

Who influences whom in social network - an application for finding key nodes

Author: Grzegorz Chilczuk

Supervisor: dr inż. Radosław Michalski

Installation

Only Python 3.6 or higher are supported.

If you have satisfied dependencies the installation should be as simple as

pip install influ

Dependencies

All dependencies will be installed automatically. However one of most important dependencies is cool python library called igraph which core is written in C. Sometimes it may cause some problem, igraph documentation should help.

Another problematic dependency is pycairo, here you can find precise documentation.

Debian / Ubuntu and derivatives

Installing those dependencies should help with both igraph and pycairo:

 sudo apt install build-essential python-dev libxml2 libxml2-dev zlib1g-dev 
 sudo apt install libcairo2-dev pkg-config
Windows

If you are using Windows you have to download unofficial installer of igraph here and install it by executing:

pip install <python_igraph-[igraph-version]-[python-version]-[windows version]>.whl

Despite that's unofficial it's recommended by maintainers of igraph library.

The pycairo library on Windows need Microsoft Visual C++ 14.0 to be installed.

MacOS

There were no attempts to install influ on MacOS. Any information about it will be appreciated.

Konect Reader

In order to test your concepts quickly there is a KonectReader which simplifies downloading and extracting datasets and loading them into Graph object.

from influ import reader

kr = reader.KonectReader()
print(kr.list) # list available datasets
graph = kr.load('manufacturing_emails')  # load dataset

Currently there is only few datasets available but you can provide your own config file with other datasets specified. Currently only datasets from Konect are supported.

Your own config file

# Content of my_custom_config.yaml
example_dataset:  # name that will be used to access dataset
  name: Example Dataset 1
  url: http://konect.uni-koblenz.de/networks/dataset_examle  # url where dataset is described [optional]
  download: http://konect.uni-koblenz.de/downloads/tsv/dataset_examle.tar.bz2  # url where dataset can be downloaded directly
  file: out.dataset_example_example  # name of file with 
  directed: False  # does graph should be considered as directed?
  edge_attributes:  # list of names attributes
    - distance      # if this list will be empty or there will be more attributes
    - another_attr  # it will be named `attrX` where X is index counted from 0
  vertex_attributes:                # list of vertex attributes with files where they are stored
    - name: alias                   # name of attribute
      file: ent.vertex_alias_name   # file with attribute

Loading your custom config extends (does not override) those previously loaded.

from influ import reader

kr = reader.KonectReader('./my_custom_config.yaml')  # loading at creation time
kr.add_config('./my_custom_config.yaml')      # adding config after creation

Working example

from influ import reader, finder

kr = reader.KonectReader()
graph = kr.load('manufacturing_emails')

sfinder = finder.SeedFinder(graph)
sfinder.configure(number=5, unit='number')
result = sfinder.greedy(model=finder.Model.IndependentCascade, depth=1)
sfinder.plot_influence(result, model=finder.Model.IndependentCascade, depth=1)

——————

Change log

[0.3.0]

Added

  • User documentation

Changed

  • Changed License to GNU GPLv2

[0.2.0] - 2018-12-14

Added

  • Model enum
  • plot_influence function
  • Windows installation documentation

Changed

  • Fix influence models evaluation with seed of random function
  • Few minor fixes

[0.1.0] - 2018-12-01

Added

Release files for influ 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for influ 0.3.0
File Size Uploaded
influ-0.3.0.tar.gz 19.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for influ 0.3.0
File Interpreter ABI Platform
influ-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 39.4 kB

Release files / influ-0.3.0.tar.gz

Download URL influ-0.3.0.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b1af8620dca9a842cbc9215ab9020dc619fb1c74b05e8500ccbc5b6d17d49463
BLAKE2b-256 checksum
How to use checksums
f3fe8916c86a8c95f6ceabbef8c17be95ea734ef55bedf2a27e17c0d9ba53023
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.0

Release files / influ-0.3.0-py3-none-any.whl

Download URL influ-0.3.0-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc0c09a4d9d6db39ba1b91544f1519ec7d8318b2ca559f2f7e1e4e403f0ff167
BLAKE2b-256 checksum
How to use checksums
194ce5ca7eb1e8d4c3a288aa8d4137dbbb34ce19552f407e098cf6f9ff26ebf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.0

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page