Package: complex-network-link-prediction
Complex Network Link PredictionComplex Network Link Predictionis a python library that implements some of the main techniques and algorithms to perform link predictions.This library, implemented in python, allows you to use some of the main algorithms and methods to perform link predictions. It was designed to carry out these tasks inComplex Networksand, specifically, inSocial Networks. Each method has its own specific documentation available on theofficial documentation page, where it is possible to see the required parameters and the output of the method itself.The methods are distinguished by belonging to categories and subcategories, below is an example image with all the categories.The speed of computation differs both from the type of method and from the input graph. However, for convention and efficiency, we have chosen to use thecsr_matrixsparse matrix structure from thescipylibrary in each algorithm.Installpip install complex-network-link-predictionHow to useimportnetworkxasnximportmatplotlib.pyplotaspltfromcnlp.similarity_methods.local_similarityimportcommon_neighborsfromcnlp.utilsimportnodes_to_indexes,get_top_predicted_linkG=nx.karate_club_graph()name_index_map=list(nodes_to_indexes(G).items())predicted_adj_matrix_common_neighbors=common_neighbors(G)new_links=get_top_predicted_link(predicted_adj_matrix_common_neighbors,G.number_of_nodes(),pct_new_link=5,name_index_map=name_index_map,verbose=True)You can also checkthis projectto see a real case study for Social Network Analysis and link prediction, with the use of our Python Library.Contribute 💥As there are still many methods to implement and, at the same time, maintaining a library takes up a lot of time, we are always happy to accept new willing and able people to contribute and support our project.If you want to contribute or you've found a bug, you can open aPull Request.Check thistutorialif you want to use our preferredWorkflow🦍 for developing.Otherwise you can open a normal Pull Request usinggitand help us to make this project even better!Help ❓If you encounter any bug or you have some problem with this package you can open anissueto report it, we will resolve that asap.Building From SourceDownload the repository and run:pip install -e .DependenciesIf your system does not have some or all of this requirements they will be installed during the istallation of the librarynetworkxscipynumpyReferencesAjay Kumar, Shashank Sheshar Singh, Kuldeep Singh, Bhaskar Biswas. 2020.Link prediction techniques, applications, and performance: A surveyPhysica A: Statistical Mechanics and its Applications,
ISSN 0378-4371,https://doi.org/10.1016/j.physa.2020.124289.David Liben-Nowell and Jon Kleinberg. 2003.The link prediction problem for social networksIn Proceedings of the twelfth international conference on Information and knowledge management (CIKM '03). Association for Computing Machinery, New York, NY, USA, 556–559,https://doi.org/10.1145/956863.956972.Víctor Martínez, Fernando Berzal, and Juan-Carlos Cubero. 2016.A Survey of Link Prediction in Complex NetworksACM Comput. Surv. 49, 4, Article 69 (December 2017), 33 pages.https://doi.org/10.1145/3012704AuthorsCristian Cosci🐔Nicolò Vescera🦧Fabrizio Fagiolo🐛Tommaso Romani🦍Nicolò Posta🐒