
Finally, it comes to the end of the semester and this is also my last post. Before this, I have published three posts in this semester with each of them commented by several classmates. At the same time, I also have left my comments below the posts of several classmates. After that, I conducted sentiment analysis and social network analysis of these comments in two python programming assignments respectively. In this post, I intend to use the results of these two assignments to evaluate my course participation and make a conclusion.
First of all, I want to briefly explain the principles of sentiment analysis and social network analysis as well as the meaning of some of the parameters inside these analyses.
Sentiment Analysis
So, what is sentiment analysis? To put it simply, sentiment analysis is the practice of quantifying people’s opinions through natural language processing (NLP) and text analysis based on text information published on the Internet. And these text information usually come from major social media platforms like Facebook, Twitter and Instagram. Many companies generally use sentiment analysis to investigate people’s attitudes about their products.
In the first assignment, we were required to perform dictionary-based sentiment analysis on all the comments we receive from our classmates. Firstly, I used two files that containing positive and negative words respectively to train a classifier, this classifier can classify the words that have appeared in the two files into class “pos” and class “neg” represent positive words and negative words respectively. And then, I stored all the received comments in a text file and then split the file into some individual words in a word list using tokenization function of the NLTK library. In other words, I use the words (unigrams) as linguistics features to represent the original file. After using the word list represented the received comments to fit the classifier I can get my “pos” and “neg” value of the received comments, which represented the number of positive words and negative words in the received comments respectively. Finally, my score can be calculated through formula① (where N represents the number of features in the word list) and from formula② I can learn classmates’ general opinion on my posts (positive or negative).

Social Network Analysis
A social network consists of nodes (individual actors, people, or things within the network) and the links (relationships or interactions between the nodes) that connect them. The goal of social network analysis (SNA) is to investigate social structures through social networks using network theories.[1]
In the second assignment, our task is to preform social network analysis on the given sociomatrix which is created based on the IDs of classmates and the interaction between them and the detailed rules of creating the matrix are shown in the figure below.

Only three SNA indexes were involved in this assignment, that was: Degree Centrality, Betweenness Centrality, Closeness Centrality. I will introduce the meaning of these indexes below:
1.Degree Centrality: a node’s degree centrality is the total number of a node’s connection. And for directed networks (such as the social network in this assignment), degree is consist of two measures: In-degree and Out-degree. In-degree of a node is the number of connections that point towards the node and Out-degree of a node is the number of connections start from the node and point outward to other nodes.[2] And in this assignment, my In-degree value represents the number of classmates that have left comments below my posts and Out-degree value represents the number of classmates whose posts were commented on by me.

2.Betweenness Centrality: Betweenness centrality measures how important a node is to the shortest paths through the network.[3] The specific calculation formula of a node’s betweenness centrality is shown in Formula③.
3. Closeness Centrality: Closeness centrality of a node is a measure of centrality in a network, it shows how close this node is to all other nodes and is calculated as the reciprocal of the sum of the length of the shortest paths between the node and all other nodes in the graph.[4] The specific calculation formula of a node’s closeness centrality is shown in Formula④ (for a connected network).

Conclusion
Based on the concepts I explained above, I can now evaluate my class participation by the values of these parameters at the end of the post.
Firstly, the overall sentiment score of the comments I received is 0.035061 (>0) which means that Classmates are generally positive about my posts. I am really happy to hear that news
Secondly, my in-degree value and out-degree value are 7 and 6 respectively. Actually, I don’t think these two numbers are good enough because first of all these two values are not equal which means I did not leave a comment for a classmate who commented on my post. And secondly, I have only interacted with a small group of classmates (7 out of 74), which is not good in this class that promotes interaction with more classmates.
Thirdly, the value of closeness centrality of my node is 0.3915 which is lower than average. As I mentioned above, closeness centrality represents a node’s centrality in the network, thus, the higher closeness centrality of a node is, the closer it is to all other nodes. Obviously, the node that represents me is not at the center of our class social network because I have only interacted with a small proportion of classmates in the class.
Fourthly, the value of betweenness centrality of the node representing me is approximately 0.0079, which I think is a very small value. This still means that I should have interacted with more classmates to get a more central position in the class social network for my node.
To draw a conclusion, my participation in class social media is not high because I have only interacted with 7 out of 74 classmates in the class. But on the other hand, I did learn a lot of useful knowledge in this course. It’s so amazing that social analysis tools enable me to express the feedback I got in the social network and the relationship with other users (nodes, classmates) of the social network in numerical form. Although the teaching is not smooth for various reasons, I am still very happy to choose this class and learn a lot of interesting knowledge.
References
[1]https://en.wikipedia.org/wiki/Social_network_analysis
[2]https://www.sciencedirect.com/topics/computer-science/degree-centrality
[3]https://www.sciencedirect.com/topics/computer-science/betweenness-centrality