Abstract
Text genre classification is the process of identifying functional characteristics of text documents. The immense quantity of text documents available on the web can be properly filtered, organised and retrieved with the use of text genre classification, which may have potential use on several other tasks of natural language processing and information retrieval. Genre may refer to several aspects of text documents, such as function and purpose. The language function analysis (LFA) concentrates on single aspect of genres and it aims to classify text documents into three abstract classes, such as expressive, appellative and informative. Text genre classification is typically performed by supervised machine learning algorithms. The extraction of an efficient feature set to represent text documents is an essential task for building a robust classification scheme with high predictive performance. In addition, ensemble learning, which combines the outputs of individual classifiers to obtain a robust classification scheme, is a promising research field in machine learning research. In this regard, this article presents an extensive comparative analysis of different feature engineering schemes (such as features used in authorship attribution, linguistic features, character n-grams, part of speech n-grams and the frequency of the most discriminative words) and five different base learners (Naïve Bayes, support vector machines, logistic regression, k-nearest neighbour and Random Forest) in conjunction with ensemble learning methods (such as Boosting, Bagging and Random Subspace). Based on the empirical analysis, an ensemble classification scheme is presented, which integrates Random Subspace ensemble of Random Forest with four types of features (features used in authorship attribution, character n-grams, part of speech n-grams and the frequency of the most discriminative words). For LFA corpus, the highest average predictive performance obtained by the proposed scheme is 94.43%.
1. Introduction
Text classification (also known as text categorisation) is the process of assigning a text document into one or more predefined classes or categories. With the advances in information and communication technologies, the immense quantity of text documents is electronically available on the web. Several forms of text collections, such as news articles, technical papers, books, digital libraries, email messages, blogs and web pages are important sources of information [1]. Typical application fields of text mining, such as news filtering and organisation, document organisation and retrieval, opinion mining and spam filtering, can be modelled as a text classification problem [2,3]. Based on the type of category, text classification can be divided into several problems, such as topic classification, sentiment classification and genre classification [4].
Text genre classification is a classification task in computational stylistics, which concerns with the identification of functional characteristics or kinds of text documents [5]. The genre is a broad term with several aspects and definitions. The genre can be defined as a collection of several aspects, focusing on different textual characteristics, such as brow, narrative and genre [6]. The genre may also be viewed as a bundle of documents that share the same stylistic properties [7]. With the identification of the genre of a text document, the functions of the document and its communicative context become explicit. In addition, the predictions about the form, function and context of communication can be greatly enhanced by the text genre classification [8]. Language function analysis (LFA) concerns with the single aspect of genres and it aims to classify text documents into three abstract and general classes, such as expressive, appellative and informative, as intended by Wachsmuth and Bujna [9]. Due to the abundant amount of information available on the web, text genre classification and LFA are essential tasks in information retrieval, text mining and computational linguistics. For instance, information retrieval results can be presented in a more effective way depending on the preferences of users with the help of text genre classification [10]. Text genre classification would be beneficial in filtering unintended documents (spam detection) and finding relevant documents faster. In addition, language usages embedded in grammatical structures and word senses can be related to text genres. In this regard, the identification of text genres could be beneficial for several tasks in computational linguistics, such as parsing, part-of-speech tagging and word sense disambiguation [6,10]. In text mining, one useful application of text genre classification is the automated annotation of text documents, where text documents are annotated by assigning genres [11]. Text genre identification can also be useful for retrieval tasks on the web, such as improving information seeking and reducing the information overhead [12].
Typically performed by supervised machine learning algorithms, text genre classification involves the construction of a classification model based on a training set of documents with appropriate tags and a supervised learning algorithm, such as support vector machines (SVMs), Naïve Bayes (NB) and a decision tree algorithm. In the machine learning–based text genre classification, each document is generally represented by the vector space model. Based on the feature sets, a supervised learning algorithm builds a classification model. Many different feature sets are utilised to extract feature sets from text documents. The feature representation schemes utilised in text genre classification include function words, character n-grams (CNG), part of speech (POS), POS trigrams, bag of words and syntactic chunks [8]. The high-dimensional feature space and irrelevancy of the features are two typical problems encountered in text mining. In addition, a robust classification scheme with high predictive performance cannot be achieved without an appropriate set of features [13,14].
Text genre classification is an application field where a high predictive performance is highly desired. Ensemble learning aims to obtain a classification model with a better predictive performance by combining the outputs of multiple learning algorithms. The recent literature on text and web mining indicate that the predictive performance of supervised machine learning algorithms can be enhanced with the utilisation of the paradigm of ensemble learning [15–17].
Taking these issues into account, this article examines the predictive performance of different feature sets, supervised machine learning algorithms and ensemble methods in text genre classification. Based on the empirical analysis, an ensemble classification scheme based on LFA and feature engineering is presented. To the best of our knowledge, this is the first attempt which empirically examines the effectiveness of LFA-based text genre classification in conjunction with ensemble learning algorithms. For the empirical analysis, we built a manually annotated corpus with 3759 product reviews from two domains (books and cameras). The main idea beyond the representation of text documents based on LFA is adopted from the approach in Wachsmuth and Bujna [9], where text documents are tagged as personal, commercial or informational. In the experimental analysis, five popular supervised machine learning algorithms (NB algorithm, SVMs, logistic regression (LR), k-nearest neighbour (KNN) algorithm and Random Forest (RF) algorithm) are employed as the base learners. These base learning algorithms are combined by three ensemble learning methods, namely, Boosting, Bagging and Random Subspace. To obtain an appropriate feature set from text documents, text documents are represented by five different types of features, namely, features used in authorship attribution (AA), linguistic features (LF), CNG, part of speech n-grams (PNG) and the frequency of the most discriminative words (MDW). In the experimental analysis, each subset of features (LF and CNG, CNG and POS n-grams, the frequency of the MDW and CNG etc.) that can be obtained from the five different types of features are considered. In this way, 30 different configurations are obtained for each annotated data sets. In summary, the experimental analysis seeks to identify whether the ensemble learning can be used to improve the predictive performance of classification schemes in LFA-based text genre classification. In addition, it aims to identify an optimal feature set for text genre classification. Based on the empirical analysis, an ensemble classification scheme, which utilises four types of features (features used in AA, CNG, POS n-grams and the frequency of the MDW) to represent text documents, RF algorithm as the base learning algorithm and Random Subspace algorithm as the ensemble learning method, is presented.
The rest of this article is organised as follows. Section 2 briefly reviews the literature on text genre classification. Section 3 presents the LFA. Section 4 describes the classification algorithms and ensemble learning methods utilised in the empirical analysis. Section 5 describes the proposed classification scheme. In section 6, the experimental results and discussion is presented. Finally, section 7 presents the concluding remarks.
2. Literature review
This section briefly reviews the literature on text genre classification. The identification of an appropriate feature set is an essential task in machine learning–based text genre classification. In this regard, many different categories of genres have been proposed for genre classification. For instance, Karlgren and Cutting [12] presented a genre classification scheme based on simple set of features, such as word counts, POS frequencies and word and character-level statistics, where discriminant analysis is employed to identify genres. Similarly, Kessler et al. [6] identified four different types of features, namely, structural, lexical, character-level and derivative cues, to classify genres. In another study, Wolters and Kirsten [18] examined the performance of function word frequencies and POS tags for genre identification in conjunction with three supervised learning algorithms on a newspaper corpus. In text genre classification, Stamatatos et al. [19] utilised the frequencies of occurrence of the most frequent words in the English language as the feature set. In another study, Freund et al. [20] examined the performance of genre classification on software engineering domain. In this scheme, the bag of words was employed to represent text documents, and 16 genres were identified. In the identification of genres, SVMs were utilised as the learning algorithms. In another study, Roussinov et al. [21] examined the usefulness of genres on web page genre classification and presented five major genre groups. Dewdney et al. [22] examined the performance of bag of words representation, frequencies of verb tenses, frequencies of content words, punctuation frequencies on text genre classification in web search and spam filtering. In this scheme, seven genres were identified. The genres were classified using NB, SVMs and C4.5 decision tree algorithm. Similarly, Stamatatos et al. [5] presented a stylistic approach based on the analysis-level measures for text genre classification. The experimental analysis indicated that the presented scheme outperforms representation based on the distributional lexical measures, such as functions of vocabulary richness and frequencies of the occurrence of the most frequent words. HaCohen-Kerner et al. [23] also utilised stylistic feature sets and name-based feature sets for text classification. Lee and Myaeng [10] presented a genre classification methodology based on document frequency ratios across genres and across subject classes. The empirical analysis indicated that the utilisation of subject classes with a similarity-based approach enhances the predictive performance.
To obtain a robust representation scheme based on linguistic analysis and term frequency methods, Ferizis and Bailey [24] presented a method based on the approximation of crucial POS features. The experimental analysis indicated that the approximation of crucial features can lead to the reduction in computational time while retaining the predictive performance. In another study, Xu et al. [25] examined the performance of the likelihood ratio test-based feature selection in conjunction with SVMs to classify genres of Chinese text documents.
The LFA-based text genre classification has been examined by Wachsmuth and Bujna [9]. In the empirical analysis, six different feature sets, namely, simple genre features, text type, writing style, sentiment, core trigrams and core vocabularies, were taken into consideration. In this scheme, SVMs were utilised as the supervised learning algorithms. In a similar manner, Kröll and Strohmaier [26] employed intent analysis to classify text documents. Petrenz and Webber [27] examined the performance of five existing schemes on text genre classification. In another study, Vilares et al. [28] employed LF, such as POS, syntactic and semantic information, for topic identification of Spanish twitter messages.
More recently, Hajibayova and Jacob [29] explored the influence of genres on the level of abstraction of user-generated tags. In another study, Rosso [30] examined the use of genre as a document identifier to enhance the effectiveness of web searches. Similarly, Na and Thet [31] examined the effectiveness of web search results for text genre and sentiment classification.
Tseng et al. [32] presented an automatic method for patent documents based on text summarisation. Similarly, Codina-Filba et al. [33] employed genre-specific feature sets for patent document summarisation.
Ensemble learning is a promising research direction of machine learning research. The classification algorithms and ensemble learning methods have been frequently applied for many applications, ranging from medical data analytics to predicting energy demand [34,35]. For instance, Rodger [34] examined the predictive performance of several classification schemes, such as artificial neural networks and KNN algorithms and an ensemble classification scheme based on a fuzzy-rough nearest neighbour algorithm is presented. Similarly, Rodger [35] presented an ensemble scheme for medical data analytics based on KNN algorithm.
In the classification phase of text genre identification, ensemble learning methods can be employed to improve the predictive performance. For instance, Chen et al. [36] examined the performance of several feature sets, such as features related to genre-related information, text-based features and image-based features for genre identification on document pages and they classify the genres of documents by an ensemble learner. Similarly, Finn and Kushmerick [37] examined the performance of different feature sets and machine learning methods for automatic genre classification. In this scheme, bag of words, POS statistics and text statistics were considered as the feature sets. In the classification phase, an ensemble learner was presented, which combines the predictions of classifiers constructed by different feature sets. In another study, Gencosman et al. [38] presented an ensemble classification scheme which integrates character n-gram-based representation with neural network classifiers for topic identification.
As mentioned in advance, the identification of an appropriate feature set is a critical issue in automated text genre classification. In addition, the combination of supervised learning methods by ensemble learning can yield encouraging results. However, the predictive performance of ensemble learning has been underexplored in the literature. In this regard, we make the following contributions in this article:
To examine the predictive performance of machine learning methods on text genre classification;
To explore the performance of different feature sets for constructing text genre classifiers with high predictive accuracy;
To examine whether the ensemble learning can enhance the predictive performance on text genre classification;
To investigate the performance of combined feature (CF) sets on text genre classification and to present an efficient feature set for the problem;
To present an efficient ensemble classification scheme based on an effective feature subset and classifier ensemble.
3. LFA
Text types can be assigned into three distinct categories as expressive, appellative and informative texts, as intended by Reiss [39]. According to Reiss [39], informative texts aim to transfer news, knowledge, opinions and so on in order to inform. The expressive text documents aim ‘mainly to transmit contents organised in an artistic fashion, consciously organising the content according to aesthetic criteria’ [40,41]. In contrast, appellative texts aim to transmit contents of persuasive character to induce the text’s receiver [40]. Based on the language function model of Reiss [39], LFA aims to assign text documents into one of the abstract language functions based on the functions and intentions of the text documents. In LFA, personal and expressive text documents that personal attitudes towards an entity are assigned to the class of expressive. In contrast, text documents, which aim to induce behavioural responses, are classified as appellative and text documents, which aim to transmit information, are classified as informational. For text documents containing reviews, expressive texts are personal, appellative texts are commercial and informative texts are informational [9].
4. Classification algorithms and ensemble learning methods
This section briefly reviews the classification algorithms and ensemble learning methods utilised in the empirical analysis.
4.1. Classification algorithms
Machine learning algorithms have been widely employed in text and web mining. Machine learning classifiers may be broadly classified as rule-based classifiers (such as Ripper, Part and genetic algorithms), decision tree algorithms (such as C4.5 algorithm, ID3 algorithm and RF algorithm), perceptron-based methods (such as artificial neural networks and radial basis functions), statistical learning–based methods (such as NB classifier), instance-based methods (such as KNN algorithm) and SVMs [42]. NB, SVMs and decision trees are widely employed for text classification problems with encouraging results [43].
4.1.1. NB algorithm
NB algorithm is a statistical classification algorithm which is based on Bayes’ theorem [44]. NB algorithm is based on the class conditional independence assumption, which simplifies the required computational cost. The algorithm can yield comparable results with decision trees and neural network algorithms [1]. In addition, it can scale well and be easily utilised in a number of domains.
4.1.2. SVMs
SVMs are classification algorithms for classification of linear and non-linear data, which employ a non-linear mapping for transforming the original data into a higher dimension [45]. SVMs aim to identify an optimal decision boundary for partitioning the data into classes. SVMs have relatively high predictive performance and they are less vulnerable to the overfitting problem. Due to the characteristics of text mining, such as high-dimensional feature space, sparsity and few irrelevant features, SVMs are suitable classifiers for text mining domain [1].
4.1.3. LR
LR is a statistical classification algorithm, which predicts the probability of some event’s occurring as a linear function of a set of predictor variables. In linear regression, the membership values are not proper probability values, and the least-squares regression takes errors as both statistically independent and normally distributed with the same standard deviation. To overcome the aforementioned problems of the linear regression, LR constructs a linear model based on a transformed target variable [46].
4.1.4. KNN algorithm
KNN algorithm is an instance-based learning algorithm, which classifies instances based on their similarity to the k-closest instances of the training set [47]. In KNN, the output is a class membership, and an unseen instance is assigned to a particular class based on the majority vote of its neighbours. KNN algorithm has a relatively simple structure with a limited number of parameters. The algorithm can yield encouraging results on large training sets, but the determination of the KNNs may be costly.
4.1.5. RF algorithm
RF algorithm is a decision tree algorithm, which is an ensemble of classification and regression trees, induced from bootstrap samples of the training data [48]. In this model, the generalisation error of the classifier depends on the power of the individual trees and the association between trees. The random feature selection method is employed in the tree induction phase, which enables to obtain predictive performance comparable to AdaBoost algorithm.
4.2. Ensemble learning methods
Ensemble learning methods aim to combine the predictions of multiple learning algorithms, so that a classification model with a higher predictive performance can be obtained. Compared with the base learning algorithms, the generalisation ability of classifier ensembles is greatly enhanced. In addition, ensemble learning methods can boost the predictive performance of weak learning algorithms, which are slightly better than random guessing to strong learning algorithms, which make very promising predictions [49]. The main reasons for utilising classifier ensembles can be explained by statistical, representational and computational factors. Statistically, ensemble learning methods can yield promising results in the absence of sufficient data or in the existence of many different hypotheses with limited data. In terms of representation, there may be unknown functions in the hypotheses space. In terms of computation, the use of a classifier ensemble instead of a single learning algorithm can reduce the chance of getting stuck in local optima [50]. In order to design efficient classification schemes, the two critical issues are to keep classification algorithms as accurate as possible and providing a high diversity among the classifiers. Ensemble learning methods can be broadly divided into two categories, as dependent method and independent method, based on the approach followed in ensemble construction [51]. In dependent method, the outputs of subsequent classifiers are determined based on the outputs of former classifiers. In contrast, the outputs of classifiers are obtained separately, and their outputs are combined to obtain the final prediction of the ensemble in independent method. Boosting algorithms are typical examples of dependent methods, and Bagging, Dagging and Random Subspace algorithms are typical examples of independent methods. Boosting, Bagging and Random Subspace are well-known ensemble learning methods. The primary characteristics of the ensemble learning methods can be summarised as follows:
Boosting algorithms are able to construct strong learners from weak learning algorithms by adjusting iteratively the weight of instances in the training set and the weights of classification algorithms based on the distribution. AdaBoost algorithm is one of the most frequently employed Boosting algorithm, which enhances the predictive performance of the learning algorithms by weighting instances at each iteration according to the sample distribution [46].
Bagging (Bootstrap aggregating) algorithm achieves diversity among the base learners by bootstrap sampling from the original data set to obtain training set. In the Bagging algorithm, the learning algorithms trained on newly sampled data sets are combined by a majority voting scheme. Bagging algorithm can yield promising results for data sets with limited size. It can also be used to enhance the predictive performance of unstable classification algorithms.
Random Subspace algorithm employs feature set manipulation-based diversity. Instead of modifying the training sets, as in the case of Bagging, Random Subspace algorithm trains individual classification algorithms using different feature subsets. Since different feature subsets are used to train the classifiers, a high diversity can be expected [49]. Text classification is a domain with high-dimensional feature space. By randomly partitioning the feature space, classifiers with high diversity can be achieved, which is a desired goal in ensemble design. In this way, Random Subspace algorithm generally yield promising results [3,52]. The rest of this section briefly explains these methods.
4.2.1. AdaBoost algorithm
Boosting algorithm is an ensemble learning method to enhance the predictive performance of weak learning algorithms. In Boosting algorithm, weak learning algorithms are recursively trained on the different sampling distributions to obtain strong learning schemes. AdaBoost algorithms are a widely utilised Boosting algorithm. It aims to obtain a strong learning scheme by focusing on data points that are difficult to classify [53]. In each iteration of the algorithm, the weight values for misclassified instances are increased and the weight values for correctly classified instances are decreased. In this way, the weak learning algorithm involves more iterations and classifiers to the instances that are difficult to classify [54].
4.2.2. Bagging algorithm
Bagging algorithm (also known as Bootstrap aggregating) is an ensemble learning method which combines weak learning algorithms trained on different training sets obtained from the original training set by sampling with replacement [55]. One of the critical issues in classifier combination is to provide diversity in classifier ensembles. Ensemble classifiers tend to provide better results when the weak learners have a significant diversity [56]. In Bagging, the diversity is achieved by the sampling scheme. As a sampling scheme, simple random sampling with replacement is generally utilised. To combine the outputs of weak learners, majority voting or weighted voting schemes are used.
4.2.3. Random Subspace algorithm
Random Subspace algorithm is an ensemble learning method which combines the learning algorithms trained on randomly selected modified feature spaces [57]. Random Subspace algorithm achieves diversity by training classification algorithms on the different samples of the training set, like bagging algorithm. However, Random Subspace method obtains different samples by modifying the feature space. The method aims to avoid overfitting problem and it tends to obtain encouraging results for the data sets with redundant/irrelevant features.
5. The ensemble text genre classification scheme
The ensemble text genre classification scheme relies on feature engineering (features used in AA, LF, CNG, PNG and the frequency of the MDW) to extract features for a supervised machine learning algorithm. We carry out an extensive empirical analysis on different feature sets to determine which kinds of feature sets have the greatest impact on the LFA-based text genre classification. In addition, the combination of different feature sets is taken into consideration to obtain the best feature set with a higher predictive performance. For this purpose, we first construct a LFA corpus with manually annotated English texts from two different domains: Book and Camera reviews. Then, text documents are annotated by language functions, as personal, commercial and informational. In the feature engineering stage, five different feature sets and their possible combinations are evaluated. In the classification phase, five classification algorithms (NB algorithm, SVMs, LR, KNN algorithm and RF algorithm) are employed as the base learning algorithms. To improve the predictive performance, ensemble learning methods (such as AdaBoost, Bagging and Random Subspace) and their combination with the base learning algorithms are also considered. Based on the empirical analysis, the presented ensemble text genre classification scheme utilises the combination of four types of features (features used in AA, CNG, PNG and the frequency of the MDW) to represent text documents. In the classification phase, Random Subspace ensemble of RF is utilised as the ensemble classifier. Figure 1 illustrates the general structure of our text genre classification system.

The general structure of the text genre classification system.
The rest of this section briefly presents the details for LFA corpus and feature engineering.
5.1. LFA corpus
LFA corpus consists of English review text documents with 2121 commercial, informational and personal texts from book reviews and 1638 camera reviews. All of the text documents were manually annotated with respect to their LFA into three distinct classes. The genre corresponds to the language function of the text, which can take the value of commercial, informational and personal. The distribution of the data sets (Book and Camera) based on the language function annotations is presented in Table 1. The data sets utilised in the empirical analysis can be downloaded from.
1
The raw documents of Book and Camera reviews are annotated by two experts. For Book and Camera reviews, approximately 20% of the documents are annotated twice. To examine the inter-annotator agreement, Cohen’s Kappa (
The distribution of data sets based on the language function annotations
5.2. Feature engineering
As mentioned in advance, the identification of an appropriate feature set is an essential task in text genre classification. In this regard, five different feature sets are considered for LFA corpus. These are features used in AA, LF, CNG, PNG and the frequency of the MDW. In Table 2, the number of features for each feature set group is presented.
The number of features for LFA corpus
LFA: language function analysis.
5.2.1. Features used in AA
Features used in AA set consist of features about the writing style. This set contains typical features used in AA, such as the frequency of the most common words, the frequency of POS trigrams, the frequency of character trigrams, the frequency of capitalised uppercase and lowercase words and the frequency of parentheses, punctuation and quotation marks [9,59].
5.2.2. LF
The LF set consist of features about the linguistic expert knowledge. This set contains LF, such as the frequency of time and money entities, the frequency of POS tags, personal pronouns, possessive pronouns, adjectives and nouns [9,60].
5.2.3. CNG
The CNG set consists of the frequency of the most discriminative character trigrams of classes of each language function. In our work, character trigrams that occur over six times in one language function class are utilised.
5.2.4. PNG
The PNG set consists of the frequency of the most discriminative POS trigrams of classes of each language function. In our work, POS trigrams that occur over six times in one language function class are utilised.
5.2.5. The frequency of the MDW
This feature set consists of the frequency of the MDW. In our work, a word that occurs at least 15 times in the training texts of a particular language function class is regarded as discriminative.
6. Experimental results and discussion
6.1. Experimental procedure
In the experimental analysis, 10-fold cross validation method is employed. In this scheme, the original data set is divided into 10 sets of mutually exclusive folds. Then, nine of the sets are utilised for training, and one of the sets is utilised for testing. The process is repeated 10 times, and the average results for 10-fold are reported. The experiments are performed with the machine learning toolkit WEKA (Waikato Environment for Knowledge Analysis) version 3.7.11, which is an open-source platform with many machine learning algorithms implemented in Java [61]. The default parameters for classification algorithms and the ensemble methods are utilised. In the empirical analysis, supervised learning algorithms from different classification approaches are utilised. In the empirical analysis, NB algorithm, SVMs, LR, KNN algorithm and RF algorithm are employed as the baseline classifiers. In ensemble classification, three well-known ensemble methods (AdaBoost, Bagging and Random Subspace) are utilised. The experimental evaluations are carried on a PC with an Intel Core i7 CPU 3.40 GHz with 8.00 GB RAM.
As mentioned in advance, the empirical analysis aims to identify the performance of different feature sets for text genre classification. It aims to examine the performance of CF sets and to present an efficient feature set for the domain. In this regard, five different types of features (features used in AA, LF, CNG, PNG and the frequency of the MDW) are identified. To examine the performance of individual and CF sets, 30 different feature set configurations are obtained and evaluated.
6.2. Evaluation measures
In order to evaluate the predictive performance of different feature sets, classification algorithms and ensemble methods, classification accuracy and F-measure are utilised as the evaluation metrics. Classification accuracy (ACC) is one of the most widely employed metrics in examining the classifiers. It is the proportion of true positives and true negatives over the total number of instances as given by equation (1)
where TN, TP, FP and FN represent number of true negatives, number of true positives, number of false positives and number of false negatives, respectively. Precision (PRE) is the proportion of the true positives against the true positives and false positives as given by equation (2)
Recall (REC) is the proportion of the true positives against the true positives and false negatives as given by equation (3)
F-measure takes values between 0 and 1. It is the harmonic mean of precision and recall as determined by equation (4)
6.3. Results and discussion
This section presents the classification accuracy and F-measure values of the classification algorithms and the ensemble methods by different feature sets on 30 different configurations of LFA corpus. In the tables, the best (the highest) results obtained by a particular feature set are indicated using only italics, and the highest predictive performance among all the compared results is indicated using both italics and underline.
The first concern of the study is to examine the predictive performance of different feature sets for constructing text genre classifiers. In Table 3, classification accuracies obtained by different feature sets on the supervised learning algorithms are presented. As it can be observed from Table 3, the highest (the best) classification accuracies are obtained by a feature set, which combines features used in AA, CNG, PNG and the frequency of the MDW. The second highest predictive performance is generally achieved by the representation of text documents with full feature set. For Book data set, the second highest predictive performance on KNN algorithm is achieved by a feature set, which combines features used in AA with CNG. For Book data set, the second highest predictive performance on RF algorithm is achieved by a feature set, which combines features used in AA, LF and the frequency of the MDW. For Camera data set, the second highest predictive performance on KNN algorithm is obtained by a feature set, which combines features used in AA with the frequency of the MDW. The same feature set also achieves the second highest predictive performance on RF algorithm. As it can be observed from the classification accuracies presented in Table 3, the representation of text documents with individual feature sets (such as features used in AA, LF and CNG) generally yields lower predictive performance compared with the representations obtained by CF sets.
Classification accuracies obtained by different feature sets on the supervised learning methods
AA: features used in authorship attribution; LF: linguistic features; CNG: character n-grams; PNG: part of speech n-grams; MDW: the frequency of the most discriminative words; full set: AA+LF+CNG+PNG+MDW; NB: Naïve Bayes; SVM: support vector machines; LR: logistic regression; KNN: k-nearest neighbour algorithm; RF: Random Forest algorithm.
Regarding the predictive performance of supervised learning algorithms on text genre classification, RF algorithm generally yields the highest classification accuracies and SVMs generally yield the second highest classification accuracies. Among all configurations compared in Table 3, the highest (best) predictive performance (91.33%) is obtained by a feature set, which combines features used in AA, CNG, PNG and the frequency of the MDW with RF algorithm.
In Table 4, F-measure values obtained by different feature sets on the supervised learning methods are presented. Similar to the classification accuracies presented in Table 3, the highest (the best) classification accuracies are obtained by a feature set, which combines features used in AA, CNG, PNG and the frequency of the MDW. The second highest predictive performance is generally achieved by the full set–based representation, which combines features used in AA, LF, CNG, PNG and the frequency of the MDW. Among all configurations compared in Table 4, the highest (best) F-measure value (0.98) is obtained by a feature set, which combines features used in AA, CNG, PNG and the frequency of the MDW with RF algorithm.
F-measure values obtained by different feature sets on the supervised learning methods
AA: features used in authorship attribution; LF: linguistic features; CNG: character n-grams; PNG: part of speech n-grams; MDW: the frequency of the most discriminative words; full set: AA+LF+CNG+PNG+MDW; NB: Naïve Bayes; SVM: support vector machines; LR: logistic regression; KNN: k-nearest neighbour algorithm; RF: Random Forest algorithm.
In Table 5, classification accuracies obtained by different feature sets on the ensemble learning methods are presented. As it can be observed from the classification accuracies presented in Table 5, the proposed feature list (CF), which combines features used in AA, CNG, PNG and the frequency of the MDW, yields the highest predictive performance in conjunction with ensemble learning methods on Book and Camera data sets. The second highest predictive performance is generally obtained by the full set–based representation of text documents. For Book and Camera data sets, the second predictive performances on AdaBoost ensemble of KNN algorithm, Bagging ensemble of KNN algorithm and Random Subspace ensemble of KNN algorithm are achieved by the representation of text documents based on the features used in AA. Regarding the classification accuracies presented in Tables 3 and 5, the predictive performance of text genre classification schemes is generally enhanced with the use of ensemble learning methods. Among the all configurations compared in Tables 3 and 5, the highest predictive performances on Book and Camera data sets are obtained by Random Subspace ensemble of RF algorithm. The predictive performances obtained by Bagging ensemble of RF are also relatively high.
Classification accuracies obtained by the ensemble learning methods with different feature sets
AA: features used in authorship attribution; LF: linguistic features; CNG: character n-grams; PNG: part of speech n-grams; MDW: the frequency of the most discriminative words; full set: AA+LF+CNG+PNG+MDW; CF: AA+CNG+PNG+MDW; NB: Naïve Bayes; SVM: support vector machines; LR: logistic regression; KNN: k-nearest neighbour algorithm; RF: Random Forest; RS: Random Subspace.
In Table 6, F-measure values obtained by different feature sets on the ensemble learning methods are presented. As it can be observed from F-measure values presented in Table 6, the proposed feature list (CF), which combines features used in AA, CNG, PNG and the frequency of the MDW, yields the highest F-measure values in conjunction with ensemble learning methods on Book and Camera data sets, as in the case of classification accuracies presented in Table 5. The second highest predictive performance is generally obtained by the full set–based representation of text documents. Among the all configurations compared in Tables 4 and 6, the highest F-measure values on Book and Camera data sets are obtained by Random Subspace ensemble of RF algorithm. The predictive performances obtained by Bagging ensemble of RF are also relatively high. Regarding results presented in the experimental analysis, the representation of text documents by a CF list, which contains features used in AA, CNG, PNG and the frequency of the MDW yields the optimal representation. Regarding the predictive performance of classification algorithms and ensemble learning methods in terms of classification accuracy and F-measure values, Random Subspace ensemble of RF algorithm yields promising results.
F-measure values obtained by the ensemble learning methods with different feature sets
AA: features used in authorship attribution; LF: linguistic features; CNG: character n-grams; PNG: part of speech n-grams; MDW: the frequency of the most discriminative words; full set: AA+LF+CNG+PNG+MDW; CF: AA+CNG+PNG+MDW; NB: Naïve Bayes; SVM: support vector machines; LR: logistic regression; KNN: k-nearest neighbour algorithm; RF: Random Forest; RS: Random Subspace.
To further evaluate the results obtained in the empirical analysis, we performed general linear model analysis to perform analysis of variance (ANOVA) test in Minitab statistical programme. The results for ANOVA test of overall results obtained by classification algorithms and different feature sets are summarised in Table 7.
ANOVA test results
DF: degrees of freedom; SS: adjusted sum of squares; MS: adjusted mean square; F: F-statistics; p: probability value.
As it can be observed from the results presented in Table 7, there are statistically meaningful differences between the results of compared feature sets, the results of compared classification algorithms and the results of data sets at 99% confidence level. The p-values (p < 0.001) indicate that the three main factors (feature sets, classifiers and data sets) have statistically significant effect on the evaluation metric values. It can also be seen from Table 7 that the interactions between feature sets and classifiers, feature sets and data sets and classifiers and data sets are also important at the level (p < 0.001).
To summarise the main results from the empirical analysis, we have presented the main effects plots for accuracy and F-measure values in Figures 2 and 3, respectively. The main effect plots briefly describe the change of particular metric’s value based on a factor. In our empirical analysis, feature sets, classifiers and data sets are the three main effects. As it can be observed from Figures 2 and 3, the proposed feature list (CF), which combines features used in AA, CNG, PNG and the frequency of the MDW, obtains the highest classification accuracies and F-measure values. The second representation scheme regarding the performance of feature sets on text genre classification is the utilisation of full set. The worst results for each metric are obtained by the features used in AA. Besides, the figures indicate the performance of classification algorithms and ensemble learning methods on text genre classification. Figure 2 clearly depicts that the predictive performance of Random Subspace ensemble of RF is higher compared with the supervised learning algorithms and the other ensemble learning schemes. Regarding the F-measure values of classification algorithms, RF algorithm, AdaBoost ensemble of RF, Bagging ensemble of RF and Random Subspace ensemble of RF algorithm yield higher values. As it can be observed from the figures, metric values obtained on Book data set are higher compared with the metric values of Camera data set.

Main effects plot for accuracy results.

Main effects plot for F-measure results.
Several managerial insights from the results of experimental analysis presented in Tables 3–7 can be summarised as follows:
Regarding the performance of individual feature sets, the frequency of the MDW and CNG is the most significant feature sets related to the identification of text genre; although features used in AA and PNG are not significant as the frequency of the MDW and CNG, they still act as important feature sets.
Regarding the performance of classification algorithms on different feature sets, the highest predictive performance is obtained by RF algorithm. The predictive performance of SVMs is also relatively high. The higher results on classifiers, such as RF and SVMs, are also valid for other recent empirical analysis [3,52]. The use of RF algorithm in conjunction with different ensemble learning algorithms yields promising results compared with the other ensemble schemes.
Ensemble learning can be used to improve the predictive performance of classification algorithms on text genre classification. Regarding the performance of ensemble learning methods in conjunction with different classification algorithms, the highest classification accuracies are obtained by Random Subspace ensemble of RF algorithm. Random Subspace ensemble aims to achieve diversity among the base learners by partitioning the feature space. A potential explanation to the higher predictive performance obtained by Random Subspace ensembles is that the feature space–based partitioning can enhance the diversity and predictive performance on text genre classification.
Compared with the individual feature sets, CF sets generally yield better predictive performance. Although the highest predictive performance is obtained by a feature set, which combines features used in AA, CNG, PNG and the frequency of the MDW, the integration of LF to this set may degrade the predictive performance. Hence, the identification of an optimal subset of features (instead of using all available features) not only enhances the scalability but also improves the predictive performance.
The feature sets and classification schemes (classification algorithms and/or ensemble learning methods) have statistically significant impact on the predictive performance. In addition, the performance of different feature sets, classification schemes and data sets have similar performance patterns in terms of both classification accuracy and F-measure values.
6.4. Case study on topical text classification
In order to examine the predictive performance of the ensemble learning methods and the CF lists, we also performed experimental analysis on topical text classification. For topical text classification, two benchmark text categorisation data sets, namely, Reuters-21578 and 20-NG, are utilised.
6.4.1. Topical text classification benchmarks
To examine the predictive performance of ensemble learning methods and the different feature sets on text classification, Reuters-21578 and 20-NG document collections are used. The Reuters-21578 data set utilised in the empirical analysis contains 10 classes of Reuters-21578 ModApte Split [62,63]. The basic descriptive information regarding the number of training and testing instances on Reuters-21578 data set is presented in Table 8. The second document collection utilised in the empirical analysis is 20-NG (20 Newsgroups) data set. It contains 20,000 messages taken from 20 Usenet groups. The number of terms and the number of classes for the data set are 45,434 and 20, respectively. In order to examine the performance of different feature sets on topical text categorisation, the same individual feature sets outlined in section 5.2 are utilised. The details regarding the experimental procedures and evaluation measures presented in sections 6.1 and 6.2 are also valid for the empirical analysis on topical text classification.
Basic descriptive information about Reuters-21578 data set [63]
6.4.2. Results on topical text classification
This section presents the predictive performance of feature sets, classification algorithms and ensemble learning methods on topical text classification. In Table 9, the classification accuracies obtained by the individual feature sets and the CF set on the classification algorithms and ensemble learning methods are presented.
Classification accuracies obtained by the ensemble learning methods with different feature sets
AA: features used in authorship attribution; LF: linguistic features; CNG: character n-grams; PNG: part of speech n-grams; MDW: the frequency of the most discriminative words; full set: AA+LF+CNG+PNG+MDW; CF: AA+CNG+PNG+MDW; NB: Naïve Bayes; SVM: support vector machines; LR: logistic regression; KNN: k-nearest neighbour algorithm; RF: Random Forest; RS: Random Subspace.
In Table 10, F-measure values obtained by the individual feature sets and the CF set on the classification algorithms and ensemble learning methods are presented. In terms of classification accuracy, the highest predictive performance is obtained by Random Subspace ensemble of RF algorithm when the CF set is utilised. The empirical analysis on topical text categorisation collections indicate that the ensemble learning methods generally yield better predictive performance in terms of accuracy and F-measure values on topical text classification, as well. As summarised in the managerial insights of the empirical analysis presented in section 6.3, CF list can enhance the predictive performance compared with the individual feature sets.
F-measure values obtained by the ensemble learning methods with different feature sets
AA: features used in authorship attribution; LF: linguistic features; CNG: character n-grams; PNG: part of speech n-grams; MDW: the frequency of the most discriminative words; full set: AA+LF+CNG+PNG+MDW; CF: AA+CNG+PNG+MDW; NB: Naïve Bayes; SVM: support vector machines; LR: logistic regression; KNN: k-nearest neighbour algorithm; RF: Random Forest; RS: Random Subspace.
To summarise, the experimental analysis on different feature sets, classification algorithms and ensemble learning methods indicate that, the use of CF sets and ensemble learning methods can enhance the predictive performance on text genre classification. Regarding the performance of topical text classification, the identification of an appropriate set of features is a key issue in predictive performance. In this regard, a recent empirical analysis on ACM and Reuters-21578 document collections for topical text classification indicates that ensemble learning methods can yield promising results in keyword-based representation of text documents [3]. Similarly, an extensive empirical analysis is conducted on sentiment analysis with different feature sets and classification algorithms [61]. In this empirical analysis, different individual feature sets (such as unigrams, part-of-speech-based features and bigrams) and the CF sets obtained from individual feature sets are taken into consideration. The experimental analysis indicated that the CF sets can yield promising results on sentiment classification. Compared with the topical text classification, text genre classification is a more challenging problem, and the idea of using a CF set from promising feature subsets and the utilisation of the paradigm of ensemble learning can be viable tools to build classification schemes on topical text classification, as well.
7. Conclusion
Text genre classification concerns with identifying functional characteristics or kinds of text documents. The genre identification can reveal information about the functions and communicative contexts of text documents. Due to the immense quantity of information available on the web, text genre classification can be extremely useful in several fields, such as document filtering and review spam detection. Genre is a broad term with several aspects, such as function and purpose of text documents. The LFA aims to focus on a single aspect of genres and it aims to classify text documents into three abstract and general classes, as expressive, appellative and informative. To build a robust classification scheme with high predictive performance, the identification of an appropriate feature set is extremely important on text genre classification. We considered five feature sets (features used in AA, LF, CNG, PNG and the frequency of the MDW) and the CF sets obtained from these feature sets. In the classification phase, five different base learners (NB, SVMs, LR, KNN and RF) in conjunction with ensemble learning methods (such as Boosting, Bagging and Random Subspace) are examined. Based on the empirical analysis, the proposed feature list (CF), which combines features used in AA, CNG, PNG and the frequency of the MDW, yields the highest classification accuracies and F-measure values in conjunction with Random Subspace ensemble of RF. For LFA corpus, the highest classification accuracy obtained on Book data set is 94.43%, and the highest classification accuracy obtained on Camera data set is 93.81%.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship and/or publication of this article.
