Package: influ
InfluFinding influencers in social networkAn application created as part of the projectKto na kogo wpływa w sieci społecznej - aplikacja do wyszukiwania kluczowych węzłówWho influences whom in social network - an application for finding key nodesAuthor:Grzegorz ChilczukSupervisor:dr inż. Radosław MichalskiInstallationOnly Python 3.6 or higher are supported.If you have satisfied dependencies the installation should be as simple aspipinstallinfluDependenciesAll dependencies will be installed automatically.
However one of most important dependencies is cool python library calledigraphwhich core is written in C.
Sometimes it may cause some problem,igraph documentationshould help.Another problematic dependency ispycairo, here you can find precisedocumentation.Debian / Ubuntu and derivativesInstalling those dependencies should help with both igraph and pycairo:sudoaptinstallbuild-essentialpython-devlibxml2libxml2-devzlib1g-devsudoaptinstalllibcairo2-devpkg-configWindowsIf you are using Windows you have to download unofficial installer of igraphhereand install it by executing:pipinstall<python_igraph-[igraph-version]-[python-version]-[windowsversion]>.whlDespite that's unofficial it's recommended by maintainers of igraph library.Thepycairolibrary on Windows needMicrosoft Visual C++ 14.0to be installed.MacOSThere were no attempts to installinfluon MacOS. Any information about it will be appreciated.Konect ReaderIn order to test your concepts quickly there is aKonectReaderwhich simplifies downloading and extracting datasets and loading them into Graph object.frominfluimportreaderkr=reader.KonectReader()print(kr.list)# list available datasetsgraph=kr.load('manufacturing_emails')# load datasetCurrently there is only few datasets available but you can provide your own config file with other datasets specified. Currently only datasets fromKonectare supported.Your own config file# Content of my_custom_config.yamlexample_dataset:# name that will be used to access datasetname:Example Dataset 1url: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 directlyfile:out.dataset_example_example# name of file withdirected: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 0vertex_attributes:# list of vertex attributes with files where they are stored-name:alias# name of attributefile:ent.vertex_alias_name# file with attributeLoading your custom config extends (does not override) those previously loaded.frominfluimportreaderkr=reader.KonectReader('./my_custom_config.yaml')# loading at creation timekr.add_config('./my_custom_config.yaml')# adding config after creationWorking examplefrominfluimportreader,finderkr=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]AddedUser documentationChangedChanged License to GNU GPLv2[0.2.0] - 2018-12-14AddedModel enumplot_influence functionWindows installation documentationChangedFix influence models evaluation with seed of random functionFew minor fixes[0.1.0] - 2018-12-01AddedLoading graph from fileFinding key nodes in graph (SeedFinder)Loading example datasets fromhttp://konect.uni-koblenz.de