# Using Social Media & Sentiment Analysis to Make Investment Decisions
## 2 Literature Review
### Sentiment Analysis
#### 2.3.2 Investigating SNLP Algorithms  
The Logistic Regression Algorithm (LRA) stems from the field of statistics and is a popular choice of algorithm for solving binary classification problems, utilizing its sigmoid function to classify data into a value between 0 and 1. One of the most effective traits of the LRA is its simplicity in being implemented and trained [21]. It also provides a probabilistic output that can be useful in understanding how classified a value is. For example, it can  
Figure 3: The Price of Bitcoin, March–May 2021 [17].  
determine the positivity or negativity of sentiment data. The work of [PERSON] in [PERSON] (2018), which evaluated a range of algorithms in determining the sentiment of tweets, found that the LRA performed well across all the datasets it was tested against. However, some disadvantages are its tendency to overfit data, it does not guarantee 100% convergence, and it cannot effectively handle outliers in provided data sets [PERSON] (2018).  
SVM is another popular algorithm used for regression problems and more notably classification problems. It works by plotting data in n-dimensional space, where n is the number of features or categories, and the value of each category has a corresponding coordinate in that space. Using the example of sentiment again, the included categories could be positive or negative. The data is then trained and classified by finding the optimized hyper-plane that differentiates the two classes, and its effectiveness in doing so makes it a common choice for classification problems. This can be seen in the work of [PERSON] et al. [PERSON] et al. (2018), as cited by [PERSON] et al. [PERSON] (2018), which looked at making stock market predictions using financial sentiment and found that that the SVM achieved the best results. However, the algorithm tends to be weaker in large datasets, and its lack of a probabilistic output for the classified data (in its simplest form), makes it less desirable than other algorithms such as the LRA.  
Decision trees are another common classification algorithm used for SA. A decision tree gets its name for its tree like structure, in which nodes are connected by edges in a hierarchical structure. Using a dataset, an entropy formula, and an information gain formula, a decision tree can be built and trained to classify data effectively. One of the popular existing algorithms is known as ID3 [PERSON] et al. (2015)). The work in [PERSON] (2018), which compared a range of SNLP algorithms found that the ID3 based algorithm performed well, achieving an F-Score of around 70% in testing. However, it did not perform as well as the SVM algorithm and the Logistic Regression algorithm which achieved higher F-Scores of around 80% in some of the tests.  
A NN is another type of popular Machine Learning algorithm used for classifying data [PERSON] et al. (2015). It's composed of layers containing multiple interconnected nodes. Each node has an associated weight and threshold, and if the output of that node is greater than the threshold, then it fires a signal to the next connected node in the network. With this structure, and the use of a training method (such as back propagation), this algorithm can be trained to classify data very accurately. One of the more popular NN algorithms used for SA is known as a Convolutional Neural Network (CNN). This is well presented in [PERSON] et al. (2015), which investigated a variety of NN's--such as doc2 vec--to analyze the sentiment of experienced individual investors (from financial SM platform StockTwits) to predict stock market performance. It found that CNN outperformed the other networks with accuracy results of up to 86%. The paper explains how CNN's deep learning qualities overcome the shallow learning process of data mining approaches, which do not consider the order of words in a sentence, and as a result, lose insight when classifying the sentiment. However, NN's are sometimes inefficient and take a long time to train. Additionally, NN's are not always guaranteed to converge unlike the SVM.