![]() ![]() Well, the friend recommendation can be defined as a binary classification problem which takes a set of features from the users and maps them to ‘1’ if there exists a link between a pair and ‘0’ otherwise. The remaining 1862220 C 2–9437519 edges do not exist in the network. Out of these, we are provided with only 9437519. Therefore, the total number of possible edges/links/connections in this network could be 1862220 C 2. Note that we are provided with edges/links and not nodes. So, the total number of unique nodes in this network are 1862220 and the total number of edges in the network are 9437519. #saving the train data by removing the headers and indexes df.to_csv('data/train_woheader.csv',header= False,index= False) #storing the list of edges in a varible g=nx.read_edgelist('data/train_woheader.csv',delimiter=',',create_using=nx.DiGraph(),nodetype=int) #printing the information of graph print(nx.info(g)) Name: Type: DiGraph Number of nodes: 1862220 Number of edges: 9437519 Average in degree: 5.0679 Average out degree: 5.0679 So from the data, we can infer that it is a directed graph in which we are provided with two nodes a source and a destination node.I tried to visualize the given network using the NetworkX python library.NetworkX is a tool for creating, manipulating and perform study of structure of complex networks.Seems like there was no missing data or any duplicates. What does a social network look like? I wanted to play around with the data first just to get a rough feel of what I was working with, so I used an app called SocNetV to interact with the network.Ĭhecking the data for any missing rows/ duplicates, if any. ![]() 2.Some intriguing insights on social networks ![]() For example, a business page owners on instagram want to influence as many people as possible for their commercial advantages.However, the network is evolving in time, new users are joining, adding friends, new connections between old users,etc.Based on the current network we want to be able to predict the upcoming changes in the network and make recommendations accordingly.įacebook has provided a snapshot of its social network at time(say ‘t’) and based on it, we need to predict the future possible links.In this blog, I will be sharing my approach to solve this case study. People may or may not want to maximize their social influence. Social Networks mainly focus on building social relations among users who share common interests, background, real-life connections,etc.
0 Comments
Leave a Reply. |