{'fraction_non_alphanumeric': 0.029185267857142858, 'fraction_numerical': 0.012220982142857143, 'mean_word_length': 4.8128446318520925, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Opinion classification on a social network by a novel feature selection technique

Received Feb 10, 2020 Revised Apr 8, 2020 Accepted Apr 21, 2020 Most of the opinion comments on social networks are short and ambiguous. In general, opinion classification on the comments is difficult because of lacking dominant features. A feature extraction technique is therefore necessary for improving accuracy of the classification and computational time. This paper proposes an effective feature selection method for opinion classification on a social network. The proposed method selects features based on the concept of a filter model, together with association rules. Support and confidence are used to calculate the weights of features. The features with high weight are selected for classification. Unlike supports in association rules, supports in our method are normalized to 0-1 to remove outlier supports. Moreover, a tuning parameter is used to emphasize the degree of support or confidence. The experimental results show that the proposed method provides high classification efficiency. The proposed method outperforms Information Gain, Chi-Square, and Gini Index in both computational time and accuracy


INTRODUCTION
Social networking websites have nowadays become important communication tools. They allow users to share opinions and discuss various issues through message formats (such as posts and comments). Opinion messages on social networks are important information and analyzed for useful in many applications. For example, opinion messages are used to track consumers' attitudes toward products or services. Moreover, they are used to identify the satisfactions of demographics features with particular products [1,2]. In politics, opinion messages are used for electoral predictions or to make a survey of people's opinions about political parties [3]. In education, they are exploited to analyze student sentiments to improve the efficiency of studying [4].
In opinion classification, features are extracted from messages (texts) and then learning algorithms will determine the orientation of opinions from the features. Since most of the messages on social networking websites are short and vague, features are resulted in a large feature space that contains irrelevant and redundant features for classification. The irrelevant and redundant features lead to misclassification in opinion classification task. Therefore, feature selection becomes an important phase in the task. It selects relevant features to increases the performance of the classification [5]. Various feature selection methods have been proposed for opinion classification [6][7][8][9]. The filter model is one popular feature selection model. The idea of filter model is to calculate the weight of features and then features are decided to keep or remove from determination the weight of features. The filter model is simple and effective [10].
In this paper, a feature selection method is proposed to improve the performance of opinion classification on social network. It processes based on filter model. Unlike the previous feature selection In the proposed method, the confidence value indicates a percentage of class c i among feature f j. The support value indicates frequency of feature f j in class c i . The support is normalized to 0-1 to remove outlier support. Moreover, the balance of support and confidence values are adjusted by the parameter p. In addition, the vertical data format is used to easily calculate the support and confidence values. Then the time for computing weights of features can be improved.
In conclusion, the contributions of this paper are the following. a) Support and confidence values are applied to calculate weights of features that are used to select most relevant features. The selected features improve accuracy when comparing to Information Gain, Chi-Square, and Gini Index. b) The support is normalized to 0-1 to remover outlier support. Then relevant features will be found and lead to improve classification. c) A tuning parameter p is proposed to adjusted balance between support and confidence. d) The weight of feature is easily calculated by using vertical data format that can improve the computation time The rest of the paper is organized as follows. Related works are mentioned in Section 2. Section 3 describes the proposed method. The experimental evaluations are discussed in Section 4. Finally, Section 5 provides conclusions and future work.

RELATED WORKS
Currently, social network websites have become data sources for researchers because the amount of data on social networking sites has grown enormously, especially opinion messages. Opinion classification is a text mining task that try to find orientation of opinions from opinion messages. It is widely applied in many research domains, such as restaurant reviews, product reviews, movie reviews etc. Due to unstructured data, opinion messages are transformed to feature space. Most of the opinion messages on social networks are short, ambiguous and have non-dominant features. Therefore, the feature space is very large. Feature selection becomes an important process to decrease the number of features for improving the accuracy and reducing the computational burden.
Feature selection methods have been studied in many researches. For example, Alhaj et al. [6] presented a two-tier feature selection method to select appropriate and significant features. The subset of features is ranked based on high information gain entropy in the first tier. Then features are extended with high ability in the second tier. The analysis results showed that the selected features gave high clustering accuracy. Parla and Ozel [7] proposed a new feature selection method, called Query Expansion Ranking. The method is based on query expansion term weighting methods. The results showed that Query Expansion Ranking could improve sentiment analysis performance in terms of classification accuracy and computational time.
Pratiwi and Adiwijaya [8] proposed feature selection and classification based on Information Gain for sentiment analysis. The method performed on a movie review dataset and showed that it could reduce more than 90% of unnecessary features with 96% accuracy. Yang et al. [9] proposed a new feature selection algorithm based on comprehensive measurements, both inter-category and intra-category, for text categorization. Three benchmark document collections, 20-Newsgroups, Reuters-21578 and WebKZ, were classified by Naïve Bayes and Support Vector Machines. The experimental results showed that the feature selection method is significantly superior to other methods. Adeleke et al. [5] proposed a two-step feature selection method. In the first step, Chi-square was adopted to reduce the dimensionality of a feature set. In the second step, a wrapper correlation-based technique was employed to further select most relevant features from the reduced feature set. The results shown that the feature selection method achieved accuracy of 93.60% in 4.17 seconds. Somantri and Apriliani [11] proposed a hybrid feature selection model to solve the non-optimal process of selecting features. Hybrid feature selection models combine Information Gain and a genetic algorithm. The results showed that the proposed method gave an accuracy of 93.00%.
Rafei et al. [12] compared the performance of two feature selection techniques for select the relevant features for classifying biomedical text abstracts. The two feature selection techniques, Pearson's Correlation and Information Gain, are investigated for reducing the high dimensionality of data. Stroke documents were classified by Support Vector Machine. The experimental results showed that Information Gain outperformed Pearson's Correlation by 3.3%. Purnamasari [13] classified tweets that contain bullying by using Support Vector Machine. Relevant features are selected by using Information Gain. In the first step, tweets are preprocessed by using tokenizing, filtering, stemming and term weighting. In the second step, Information Gain feature selects relevant features by calculating the entropy value of each features. After that, the classification process is performed by Support Vector Machine classifier. The results showed that the best threshold of information gain is 90% with accuracy 76.66%. From previous work, feature selection is an important process in text classification. Opinion classification is a kind of text classification that needs to reduce dimension of feature space and select relevant features. Most feature selection methods calculate the weights of features based on relationships within features and classes. Unlike the previous methods, the frequency of the relationship of features and classes is added to calculate the weight of features in our method. Furthermore, most feature selection on opinion classification retrieve relevant features from a horizontal vector, where a document is mapped to a row. The row consists of a huge number of all possible features. If a document has a small subset of the features, a large null value will be generated which has a negative impact on computational performance. In our proposed method, a vertical data format is employed to reduce computation cost.

THE PROPOSED METHOD
In this paper, a feature selection method is proposed to select most relevant features and improve performance of opinion classification on social network. Due to opinion classification processing on text dataset, text dataset has to be preprocessed to structured dataset. The proposed method represents the dataset as a vertical data format to easily calculate support and confidence values. The preprocessing is explained in subsection 3.1. From the vertical dataset, it will be processed to find most relevant features. The process in the proposed method consist of 4 phases; support and confidence calculation, support normalization, parameter tuning and weighing calculation, and feature ranking. All phases will be explained more details in the subsections 3.2 -3.5.

Preprocessing
The preprocessing is the following steps: (1) text fragments, such as #, emoticons, URLs and @, are removed from the text dataset because they do not significantly designate the polarity identification, (2) stop words are removed from the dataset using a dictionary-based technique, (3) the stemming process is performed before tokenization and in the tokenization process words preceded by "no/not" are tokenized using the bi-gram technique, otherwise, uni-gram. A token is considered as a feature. Next, the dataset is transformed to the vertical dataset as an example in Table 1 6 } is the set of features, and C = {c 1 , c 2 ,} is the complete set of distinctive class labels.

Support and confidence calculation
Supports and confidences values of all features are easily calculated for each class in the vertical dataset. To calculate a confidence value of feature t i in class c k , we need to find the support of feature t i and the support of feature t i in class c k . The support of feature t i is the number of documents containing t i that is easily obtained by counting the number of documents containing the feature t i in the vertical dataset. As a result, the confidence is easily calculated from the calculated support. The confidence is the ratio of the number of documents that contain feature t i in class c k and the number of documents contain feature t i . Therefore, the confidence is calculated from C(t i ,c k ) = |S(t i ,c k )| / |S(t i )|. The confidence of feature t 3 in class c 1 can be found from C(t 3

Support normalization
Since the support may be very small or very large, it needs to be normalized to remove outlier support. In the proposed method, the support is normalized to 0-1, the same as the unit value of confidence. In the normalization of the support process, all features in class c k are ranked by their supports in descending order. For example, in Table 2, class c 1 consists of features t 1 , t 2 , t 3 , t 4 , t 5 , and t 6 . The supports of all features in class c 1 are shown in the second row (S(t i , c 1 )). The supports of t 2 and t 4 are the highest, so t 2 and t 4 are ranked in the first order. The second highest supports are the supports of t 1 , t 3 , and t 6 , so t 1 , t 3 , and t 6 are ranked in the second order. The support of t 5 is the lowest support, so t 5 is ranked in the third order.
The ranking values are shown in the third row (R(t i , c 1 )). After ranking values found, the normalization of support can be calculated from NS(t i ,c k ) = R(t i , c k ) / N, where N is the number of all features. For example, NS(t 3 ,c 1 ) = R(t 3 , c 1 ) / N = 2/6 = 0.33.

Parameter tuning and weighting calculation
First, the weight of each feature in c k is calculated based on its normalized support and confidence. A tuning parameter (p) is introduced to balance the significance of the normalized support and confidence. p is a constant value (0 < p < 1). If support is more significant than confidence, p is more than 0.5, and less than 0.5 otherwise.
The weight of feature t i in class c k can be evaluated using

Feature ranking
All features in dataset are ranked by their final weights in descending order. The feature with the highest weight is the first rank and means that it is the most relevant features. The set of most relevant features can be selected from the ranked features.

EXPERIMENTAL EVALUATIONS 4.1. Experimental setup
The experimental datasets were collected from twitter, and comprised 10,000 instances from Standford twitter sentiment data (STS) [14], 4,000 instances from SemEval-2017 Task4A dataset (SemEval) [15], 2,600 instances from Sentiment strength twitter dataset (SS-Tweet) [16] and 1,000 instances from HCR Twitter dataset [17]. All datasets are preprocessed as in subsection 3.1. To perform feature section using Information Gain (IG), Chi-Squared (Chi2), and Gini Index (Gini), the datasets are transformed in vector space model. A document is transformed into a vector. For each vector, the value of features is 1, if the feature occurs in the document, otherwise, 0. All datasets have two classes, positive and negative. Finally, the characteristics of datasets are shown in Table 3. For evaluating the proposed method against IG, Chi2, and Gini, the performance of classification and computation time are investigated in our experiments. For investigating performance of classification, the number of selected features is varied from 10% to 90%. Then they are investigated to classify opinion orientation by using Naïve Bayes that is a simple classifier and effective in opinion classification [18][19][20][21][22][23][24][25]. 10-fold cross-validation is used to divide dataset the experiments. The average accuracy and average F-measure for each class are used to evaluate the proposed method against IG, Chi2, and Gini. The computation time is evaluated from weighting calculation and features ranking

Experimental results and discussion
First, the values of p are investigated to find the best values for giving highest accuracy. In Table 4, p = 0.8 gives the highest accuracy on SemEval and HCR and p = 0.9 gives the highest support on STS and SS-Tweet. Moreover, the result is shown that the accuracy is increased when the p value is increased. It means that the normalized support is more important than confidence in opinion classification. The performances of classification on four datasets are reported in Table 5 to Table 8. In Table 5, the proposed method gives the highest average accuracy and F-measure for negative class on the STS dataset. However, the average F-measure for a positive class of the proposed method is slightly lower than those Gini, Chi2 and IG. In Table 6, the proposed method gives the highest average accuracy and F-measure for both class on the SemEval dataset. In Table 7, the proposed method gives the highest average accuracy and F-measure for the negative class on SS-Twitter dataset. However, it gives lower average F-measure for the positive class than other methods. In Table 8, the proposed method gives highest average accuracy and F-measure for the negative class on the HCR dataset. However, the average F-measure for the positive class is slightly lower than other methods. From Table 5 to Table 8, they are shown that the proposed method provides higher accuracy than Gini, Chi2 and IG. Furthermore, the proposed method results in the highest F-measure for the negative class. Table 9 reports the computational time of the proposed method against Gini, Chi2 and IG. It is shown that the proposed method outperforms Gini, Chi2 and IG.
Therefore, we can conclude that the proposed method selects most relevant features for classification with lower computational time when compared to Gini, Chi2 and IG. Moreover, support value or frequency of feature is significant for selecting relevant feature.

CONCLUSION
Feature selection is an important process to reduce the features and improve the performance of opinion classification. A feature selection method is proposed based on the concept of filter models together with association rule techniques. Support and confidence values are applied to calculated weight of feature. Support values are normalized to remove outliers. Moreover, a tuning parameter p is presented to balance the significance of the normalized support and confidence. The experimental results show that the support or frequency of feature has significant for feature selection. The proposed algorithm gives a higher accuracy than Gini, Chi2 and IG because it can find most relevant features that lead to high performance of classification. Moreover, the computation time of the proposed method is the best when comparing Gini, Chi2 and IG because the weights of features are quickly and easily calculated on vertical data format.