scieee AI-readable full text Open interactive document viewer

Multiple classifier performance

Duarte López, Ariel

Full text

Multiple Classifiers Selection by Ariel Duarte López Master in Innovation and Research in Informatics Supervisors: Marta Arias Vicente, PhD. Argimiro Arratia Quesada, PhD. Faculty of Informatics (FIB) Technical University of Catalonia (UPC) - BarcelonaTech October, 2015 i Acknowledgment There are friends that over time become family. I would like to thank to my catalan family Mr. Carles Miquel Magriña and Mrs. María José Ruzafa Mateo for their infinite support during these years. I would like to thank other friends in Badalona that make me feel like in my home town. Thanks the people in the RDlab, UPC for the technical support during this project. Thanks the prof. Josep LLuis Larriba-Pey for given me the chance to finish this project. Last but not least thank a lot to my supervisors Marta Arias Vicente and Argimiro Arratia Quesada. Without your patience it would not be possible!!! A.D.L. ii Abstract This work aims to discover relationships between characteristics of data sets and machine learning algorithms that lead to selecting the best algorithm for classifying the data set. To this end, we have conducted an extensive experimentation including 8 of the main machine learning methods with different configurations and 215 binary data sets, leading to over 7900 experiments. Several state-of-the- art metrics have been used in order to describe the data sets in terms of physical structure, statistics, and information theory. A novelty with respect to prior works is that we use a robust approach based on permutation tests that directly assesses whether a given learning algorithm is able to exploit the attributes in a data set to predict class labels. Using the results of these permutation tests and the F-score, a ranking is calculated in order to propose a set of algorithms that should perform well based on the data sets’ characteristics. The results obtained are evaluated using the area under the curve in the histograms of the normalized positions proposed for the ranking. Such ranking should help scientists and practitioners in the selection of learning algorithms when facing a new problem, as well as to shed light into the behaviour of algorithms on different types of data sets. Keywords: meta-learning, permutation tests, data set description. Contents Acknowledgment ................................ i Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii 1 Introduction 2 2 Related Work 5 3 Methods 10 3.1 Permutation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2 Data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.1 Data sets splitting . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.2 Data set metrics . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.3 Classifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.3.1 Classifier metrics . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.4 General Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4 An experimental database system 20 4.1 Framework description . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.2 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2.1 Functionalities description . . . . . . . . . . . . . . . . . . . 23 iii CONTENTS 1 4.2.2 Folders description . . . . . . . . . . . . . . . . . . . . . . . . 24 4.3 Experimental database . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5 Ranking algorithm 34 5.1 Rank approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.2 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5.2.1 AUC Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 6 Conclusions and Future Work 46 6.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 6.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 A Appendix 48 Bibliography 54 Chapter 1 Introduction Nowadays it is common to find some references about Machine Learning and classification techniques in different areas. The surge of Big Data has spurred the interest of many computer scientists for the development of classification algorithms and the analysis of its results. There are several families of algorithm, each one with different characteristics and ways to optimize the process. In general, a good classification algorithm is the one that has the power to make a good classification for new instances that arrive to a system. The accuracy of the algorithm is calculated using different techniques, for example, cross validation, leave one out and so on. But is the calculated error enough guarantee that we will have a good performance using this algorithm? Will the obtained results depend on how the data set was created? Should it be possible to guarantee the performance of the algorithm based on characteristics of the data sets? In this work we try to answer the above questions. We aim at discovering the impact of data set meta-features that make one algorithm perform better than another. Additionally we want to systematically propose algorithms taking into 2 CHAPTER 1. INTRODUCTION 3 account if there is a real relation between data set attributes and classes. The main objective of this work is to make an experimental study about how to select the algorithm that can give a good performance based on the characteristics of a data set. In order to accomplish this goal we define the following tasks: OBJ 1: To develop a system that allows the execution of multiples classification experiments and to store all their results for further analysis. OBJ 2: To develop a recommendation system to select the algorithm that can give a good performance based on the characteristics of a data set. obj 2.1: To implement the permutation test in order to assess if the algorithms make good use of the structure of the data set. obj 2.2: To create an algorithm that recommends/selects the best classification algorithm for a given data set. obj 2.3: To develop an evaluation mechanism to evaluate the recommendation of our system. The problem of selecting a good classification algorithm is not a trivial task, and keeps on generating a lot of research. Our principal contributions are: the application of the permutation test as a new measure in the algorithm selection problem, and to make publicly available the information of the experiments to other researchers giving them the possibility to reproduce our experiments. The document is structured as follows: Chapter 2, reviews work related to this research project. In Chapter 3explains the permutation test used in our approach and the characterization of the data sets and the algorithms. Chap- CHAPTER 1. INTRODUCTION 4 ter 4presents the web application developed to execute multiple classification processes and store the results. In Chapter 5, we describe the ranking process that we used in order to determine the set of good classification algorithms and the experimentation. Also, the evaluation of the results obtained are discussed. Chapter 6presents our conclusions and suggests some future work. The Appendix includes a description of all data sets and parameters use in this work. Chapter 2 Related Work In this chapter we present some of the most relevant works in the field of the analysis of the performance of multiple classifier algorithms as well as the tools that help us during the development of this work. The use of databases is quite common in computer science. Some applications need to keep persistent information. In Data Mining, Machine Learning areas, it is common to use databases for storing the information that will be analysed. What is less common is to store the description and the results of the classification processes, which is becoming an important issue for determining which classifiers best suit a given data set. These databases which also include the statistics and all experimental details of classification in order to be reproducible are the so-called experimental databases. The work developed by Vanschoren et al. [2012] presents an experimental database to store the information of the machine learning experiments as well as the parameters used in each of them. The main goal of this database is that any researcher can reuse and reproduce the experiments performed by other researchers, keeping this information available for all the community. In words 5 CHAPTER 3. METHODS 12 tation time. Note that using 5-fold cross-validation in 30 random samples of the data set it means to execute the classification process 150 times in each experiment. Once the results of each experiment are downloaded from the cluster, the p-values obtained are stored in the database and associated with their corresponding experiment record. 3.2 Data sets One of the important issues that we face is to find sufficient amount of data sets to enhance the system and to validate our approach. We want to restrict the problem to binary data sets to first explore our selection procedure on these simpler type and not to deal with the number of classes as an extra parameter. But also, on a practical side, it makes easy to store the contingency matrix associated to the experiments. We leave for future work the case of multi-class data sets. Therefore, to count with a large amount of binary data sets becomes crucial in our approach. So we produced extra binary data sets from multi-class data sets. In this section, the heuristic used in order to convert multi-class data sets in binary ones is presented. At the end of the session, we will discuss the metrics used to describe the data sets. 3.2.1 Data sets splitting During this process we filtered the classes that did not have a high number of instances into the data set. First of all, the arithmetic mean (mean) of the cardinalities of the classes is calculated and we proceed to discard all those classes CHAPTER 3. METHODS 13 that have less number of instances with respect to this mean (FILTERCLASS subroutine). The second step produces all possible combinations of two classes (GETCLASSCOMBINATIONS subroutine). The last step is devoted to generating the file (CREATENEWDATASET). The idea behind this method is to guarantee that the new data sets are roughly balanced and have enough instances to perform well with each of the algorithms. This is ensured after applying the filter using the mean number of instances as the cutting point in the original data set. Algorithm 1 Process used to convert multiclass datasets to binary ones. 1: procedure DATASETCONVERTER 2: classDist ←dictionary with the classes distribution 3: mean ←arithmetic mean 4: instances ←number of instances in the dataset 5: f ilteredDict ←FILTERCLASS(mean,classDict) 6: pair s ←GETCLASSCOMBINATIONS(f il teredDict,2) 7: for pair iin pair s do 8: CREATENEWDATASET(i) The following plots show the distribution of the classes for all the data sets processed in this work. Additionally, on the right side of Figure 3.2.1 the frequency distribution of the number of instances in all the data sets used is shown. Note, that the plots are made in log-log scale to reduce the differences between data sets with a huge amount of instances and the ones with only hundreds of them. It can be observed that after executing the splitting algorithm the number of instances in each data set is balanced. It means that we will use data sets with difference sizes. The plot on the right shows that with respect to the global number of instances in each data set we are covering different dimensionality. This CHAPTER 3. METHODS 14 4 6 8 10 12 5 7 9 11 Number of intances of class 1 (ln−scale) Number of intances of class 2 (ln−scale) 0 20 40 60 4 6 8 10 12 Number of intances in each data set (ln−scale) Frequency Figure 3.1: Number of instances in each class and the distribution of the number of instances in each generated data set. shows that the experimentation process deals with various ranges of number of instances in the data sets. We had originally 35 binary data sets. After executing the procedure described above, over some multi-class data sets we obtained 180 new binary data sets. All the data sets used in this work are downloaded from UCI Respository [Lichman,2013]. In total, our application analyses the behaviour of 215 data sets. In next session we describe the features used in order to describe each of the data sets. 3.2.2 Data set metrics At this point we are able to think about the best way to describe the data sets that are used in our experimentation. Most of the metrics used in our work come from the paper by Castiello et al. CHAPTER 3. METHODS 15 [2005] which stated some meta-features that describe the data based on three very important aspects. These three categories are: general, statistical and information theory. Table 3.1 shows the features that are use in our work. General Statistical Information Theory Number of instances Linear Correlation Coeff. Normalized Class Entropy Number of Attributes Skewness Coeff. Normalized Attribute Entropy Has Missing Values? Kurtosis Coeff. Max Normalized Mutual Info Missing Values (%) 1-D Variance Fraction Coeff. Equivalent Number of Attributes Unique Values (%) Noise-signal Ratio Table 3.1: Meta-features used to describe the datasets. The first two general meta-features are from Castiello et al. [2005], the other three are ours which we include in order to balance the number of features in each category. Has Missing Values: Binary attribute that shows if the data set has missing values or not. Missing Values (%): Contains the percentage of missing values. This feature is calculate as the average percentage of missing values for each of the attributes in the data sets. Unique Values (%): Contains the percentage of unique values. This is also calculate as the average percentage of unique values in each of the attributes in the data sets. At the end, each data set is described using 14 different meta-features. There are some peculiarities with respect to the calculation of the statistical features, since it is necessary to discretise the attribute values in order to obtain a value for these metrics. Depending on the definition of the attributes, sometimes the CHAPTER 3. METHODS 16 algorithm used to discretise the values are not able to split the data in more than one interval. Hence, we were not able to obtain a value for these metrics. The algorithm that we have used to discretise the attribute values is due to Irani [1993]and implemented in Orange [Demšar et al.,2013]. In Chapter 5we comment how we deal with these missing values during the experimentation. At this point we have explained all the important issues with respect to the data sets. The next section gives an overview with respect to the classification algorithm used. 3.3 Classifiers This section is devoted to commenting the classification algorithms that are used in the experimentation. As it is commented before, this project is not focused on the implementation of the algorithms. We decided to use the one implemented in Orange [Demšar et al.,2013]. In this work we use eight different classifiers: • Knn Learner • Logistic Regression • Majority • Naive Bayes • Neural Network • Random Forest • SVM CHAPTER 3. METHODS 17 • Tree Learner The criteria used to pick these algorithm is our interest to study the performance of our approach with respect to the behaviour of what we consider the most common methods used in Machine Learning. With respect to the parameters it is important to note that we chose the ones that we considered more realistic. In Appendix A, Table A.5 shows the parameters associated to each classifier and the values used for each of them. It is also important to characterise the algorithms in order to state some relation between the characteristics of the data sets and the characteristic of the algorithms. Next section comments the metrics used to describe the algorithms. 3.3.1 Classifier metrics The algorithms are described by means of five characteristics. Linearity Binary attribute that determine if the function optimized for the algorithm is linear or not. Optimization Type Binary attribute that describes if the optimization is performed in a local or global area. Family Contains the name of the family to which the classifier belongs. Number of parameters Contains the number of parameters used for the classifier. Prediction Type Binary attribute that determines if the prediction is perform using local or global information in the data set. CHAPTER 3. METHODS 18 3.4 General Data Set We close this chapter presenting the data set that is obtained after the execution of the algorithms in the cluster. This data file is generated by means of the web application that we will present in Chapter 4. In summary, we deal with 215 binary data sets and 8 different classification algorithms. In the Appendix Awe give the full details of the 215 data sets and all the parameters used for each classifier. The meaning of the parameters can be consulted in the Orange documentation. It is important to comment about two particular cases which correspond to the parameter k=0 and n_mid =0 for the kNearest Neighbours and the Neural Networks respectively. In both cases when 0 value is used, it means that the square root of the number of instances is used in the first one for the number of neighbours, and in the second one for the number of nodes in the hidden layer of the network. The classifiers are executed using 37 different configurations. In total 7955 experiments were sent to the cluster. However, problems related with singularities in the data sets and also in the parameters of the algorithms prevent us from getting all the results. At the end of the cluster execution we obtain results for 98.5% experiments, what we consider as a reasonable amount of data to validate the approach explained in Chapter 5. Each experiment is evaluated using a 5-fold cross validation in the cluster and the aggregated contingency matrix obtained for each one is downloaded and stored in the database. This information is used to calculate the F-score of each case. Equation 3.2 defines how the F-score is obtained from the contin- CHAPTER 3. METHODS 19 gency matrix. F-score =2T P 2T P +FP +F N , (3.2) where T P is the number of true positive values, FP stands for the number of false positive, and F N is the number of false negative instances. The web application is able to generate a data set that contains all the information. This general data set contains the name of the data set plus all the metrics used to describe each of them, the classifier with the configuration used for its execution and the values obtained for the F-score and the p-value of the permutation test. Once the data set is generated the next step would be to analyse this information. Chapter 4 An experimental database system In this chapter we present what can be considered the technical core of this project. The principal content of the chapter is the description of the framework developed to generate the necessary data to test our proposal. Also a detailed description of our experimental database is presented. 4.1 Framework description We are interested in analysing the results obtained with respect to other metrics associated to each execution process, and for this it is necessary to build our own framework that allows us to deal with the massive execution of experiments and their systematic analysis through the collected statistics. A global overview of the framework is shown in Figure 4.1. The whole process is divided into three principal steps. The first one is devoted to configuring the experiments. It means that the user will decide the data set, the classification algorithm, its parameters and the measure metric used to evaluate the results. This process can be executed for a single combination of 20 CHAPTER 4. AN EXPERIMENTAL DATABASE SYSTEM 21 Figure 4.1: Framework overview. data set and classifier or for multiple combinations of them. Once the experiment is set up, all the configurations are stored into the database. It is necessary to save this information because it will be used in further tests. Then, the second step is in charge of sending the experiment descriptions to the cluster where it will be processed. In the cluster, the learning algorithm will be executed and the value associated to the permutation test will be calculated. The use of a cluster is justified because of the large amount of processing time necessary for some of the algorithms, and the computation of the permutation-based statistical test. At the end of the experiment executions, the results are downloaded and stored in the database. The last step loads the information related to each of the experiments and generate a “general data set” with the results of the F-score and the p-value associated to each execution. Chapter 5explains how the results are processed. CHAPTER 4. AN EXPERIMENTAL DATABASE SYSTEM 28 Field name Description Example IdExperiment Unique identifier associated. - Datasets ∞to ∞relationship that contain all the datasets used. - Classifiers ∞to ∞relationship that contain all the classifiers used. - Parameters ∞to ∞relationship that contain all the parameters used. - Evaluations ∞to ∞relationship that contain all the evaluation algorithms used. - Result 1 to ∞relationship that contain all the results associated to an experiment. - State Specify the state in which the experiment could be. - Table 4.6: Experiment model description. State Definition This attribute associated to an experiment gives us information about the execution process. One experiment could be in five states. Table 4.7 describes the meaning of each one of them. State Description Registered When the experiment is just registered on the database. Submitted When the experiment is registered on the database and sent to the cluster. In Process When the experiment has not complete its execution. Downloaded When the experiment has been downloaded. Error When the experiment execution failed. Table 4.7: List of possible states of an experiment. Result model The logical model that is used to describe the results associated to an experiment is show on Table 4.9. CHAPTER 4. AN EXPERIMENTAL DATABASE SYSTEM 29 Field name Description Example IdResult Unique identifier associated. - Time stamp Time stamp associated to the moment when the results where downloaded from the cluster. - Test 1 Result of the permutation test associated to the experiment. - Contingency Matrix 1 to ∞relationship that contain all the contingency matrix associated to a result (One for the original experiment and 30 related to the permutation tests) - Table 4.8: Result model description. Contingency matrix model Describes the contingency matrix model used to store the result of the experiments. Field name Description Example IdContMatrix Unique identifier associated. - Execution type Specify if the results are associated to a permutation test or to the original experiment. - Positive Number of positive instances - False positive Number of false positive instances - Negative Number of negative instances - False negative Number of false negative instances - Table 4.9: Contingency matrix model description. Tokens model This model is used to store information related to the cluster communication and the file processing. The attributes present in this model are explained on Table 4.10 CHAPTER 4. AN EXPERIMENTAL DATABASE SYSTEM 30 Field name Description Example Token Unique identifier associated to a job sent to the cluster. - Date Contain the date and time when the job was sent to the cluster. - Result Folder Contain all the data associated to the jobs sent to the cluster. - Table 4.10: Token model description. ConfigManager model This model includes all configuration properties used. Field name Description Example Key Property identifier. - Description Property description. - Value Property value. - Table 4.11: Configuration model description. Configuration properties The following Table 4.12 shows the configuration properties defined in the system and their meaning. Database Model To conclude this chapter and to get a better understanding on how all this models are related, Figure 4.2 shows how the models are connected on the database. CHAPTER 4. AN EXPERIMENTAL DATABASE SYSTEM 31 Property name Description Ajo_application_Path Path to AJO application. Ajo_inputFolderName AJO input folder name. Ajo_outputFolderName AJO output folder name. Cluster_orangeLibPath Path to the Orange Libs in the cluster. Cluster_user User used to establish the communication with the cluster. Cluster_server Cluster’s full name. Experiments_fullFileName Scheme path of the complete path for an experiment. Experiments_folderPath Real full path to the folder that contain the experiment files. Experiments_downloadFolder Real full path to the folder that contain the downloaded results of the experiments. Experiments_repository Real full path of the repository that contain the experiment files once they are executed. Experiments_nbrExperiments Amount of experiments that will be send in each submition to the cluster. Experiments_templateName Template name for experiments. Testing_enableTest1 Enable permutation test type 1. Testing_sampleNumber Number of randomized samples of the original data set. Testing_significanceLevel Significance level using in the permutation test. Table 4.12: List of configuration properties in the system. CHAPTER 4. AN EXPERIMENTAL DATABASE SYSTEM 32 4.4 Results This section describes the results obtained during the execution of the classification algorithms. In total 7955 experiments are send to the cluster. Even when a cluster is used to process all the experiments this operation requires some time. In order to evaluate each of the experiments, approximately 20 days are necessary to obtain all the results. When all the process finishes we are able to download the results associated to 7843 experiments, it means the results for the 98.5% of the experiments sent. The common errors obtained are singularities in the definition of the data set with which some algorithms can not deal. For example: • Using the classifier NeuralNetworkLearner with the data set hepatitis; the error obtained is : TypeError: value of attribute ’Protime’ in example ’0’ is undefined. • Using the classifier LogRegLearner with the data set yeast_ME3_CYT; the error obtained is: orange.KernelException: ’orange.LogRegLearner’: singularity in pox. For the 7843 experiments all the information related to the meta-features used to describe the data sets, the classification algorithm used in the experiment and the values for the metrics F-score and the p-value of the permutation test can be download from the application. CHAPTER 4. AN EXPERIMENTAL DATABASE SYSTEM 33 classifiers name VARCHAR(250) visibleName VARCHAR(250) description LONGTEXT Indexes classifiers_parameters id INT(11) classifier_id VARCHAR(250) parametersetup_id VARCHAR(250) Indexes configuration key VARCHAR(100) value VARCHAR(250) description VARCHAR(250) Indexes contMatrices idContMatrix INT(11) execType VARCHAR(250) positive INT(11) falsePositive INT(11) negative INT(11) falseNegative INT(11) idResult_id INT(11) Indexes datasets idDataset INT(11) name VARCHAR(250) visibleName VARCHAR(250) url VARCHAR(100) n_Attributes INT(11) n_Examples INT(11) missing_values TINYINT(1) Indexes evaluationSetups name VARCHAR(250) visibleName VARCHAR(250) parameter VARCHAR(100) seed INT(11) Indexes experimentSetups idExperiment INT(11) description VARCHAR(250) state INT(11) associatedToken VARCHAR(250) 1 more... Indexes experimentSetups_classifiers id INT(11) experimentsetup_id INT(11) classifier_id VARCHAR(250) experimentSetups_idExperiment INT(11) classifiers_name VARCHAR(250) Indexes experimentSetups_datasets id INT(11) experimentsetup_id INT(11) dataset_id INT(11) Indexes experimentSetups_evaluations id INT(11) experimentsetup_id INT(11) evaluationsetup_id VARCHAR(250) experimentSetups_idExperiment INT(11) evaluationSetups_name VARCHAR(250) Indexes experimentSetups_parameters id INT(11) experimentsetup_id INT(11) parameter_id INT(11) Indexes parameterSetups name VARCHAR(250) Indexes parameters idParameter INT(11) value VARCHAR(50) type VARCHAR(100) isDefault TINYINT(1) parameterSetup_id VARCHAR(250) Indexes results idResult INT(11) timestamp VARCHAR(255) experiment_id INT(11) test1 DOUBLE test1F1 DOUBLE test2 DOUBLE Indexes tokens token VARCHAR(250) date DATETIME resultFolder VARCHAR(250) Indexes Figure 4.2: Database model. Chapter 5 Ranking algorithm The goal of the ranking process is to determine which classifier algorithms are prone to give an accurate result for a given data set. Based on the information collected in the experiments, when a new data set arrives, the system is able to propose a classification algorithm that hopefully should perform well. A k- Nearest Neighbour (kNN) algorithm is used to calculate the proximity between data sets. It was decided to use the five closest neighbours to a data set. This section describes the methodology used to tackled this part of the work. 5.1 Rank approach The process starts by loading the general data set described in the last section of the previous chapter. An experimental data set is obtained from the general data set. This experimental data set contains the values of the metrics that describes the original data sets. Figure 5.1 shows an overview of the filter process. As it can be observed in the general data set each row represents an experiment and in the columns the val- 34 CHAPTER 5. RANKING ALGORITHM 35 Figure 5.1: Overview of the process that create the experimental data set. ues of the meta-features, the classification algorithm and the results obtained for the F-score and the p-value are represented. From the general data set is obtained the experimental one. The filter is applied in order to reduce the duplicated information related to a data set. Since one data set is used in at most 37 experiments it becomes necessary to remove the duplicated values of the metafeatures used for the data set description. In the experimental data set the information related with classifiers and results are removed. On the other hand, the values of the meta-features are normalized. The normalization is executed in order to keep all the feature values in the same range before applying the kNN approach. Equation 5.1 shows how the normalization is done. ˜ xi=xi−min(X) max(X)−min(X)(5.1) where xi∈Xand Xis the set of values of one of the metrics that characterizes the data sets. With respect to the statistical metrics, it is important to note that in some cases it was not possible to get a value for each of them. Since kNN is not able to deal with missing values two different approaches to overcome this issue were tried. In the first one these metrics are not taken into account (i.e. were com- CHAPTER 5. RANKING ALGORITHM 36 pletely removed from the data sets). In the second approach the missing values are imputed by means of a kNN algorithm. The kNN is trained using those instances in which the target feature has a value, and the testing set contains the instances in which the feature have missing values. We fill those gasps taking into account the values of the three closest instances (with respect to the other features). The process is performed in sequential order for all the features with missing values. It is easy to test how well behaves the ranking proposed, this can be done comparing with the information about the performance of each classifier in the general data set. Leave-one-out approach is used to test the rank process over all data sets. The evaluation is done by extracting the values of the F-score or p-values obtained by means of the permutation test from the original matrix. Using the kNN algorithm we take the five closest neighbours to a data set. Since each data set is used in at most 37 experiments, we consider that taking into account the five closest neighbours is quite reasonable. The choice of selecting the five closest neighbours is made somewhat arbitrarily but the results obtained are pretty good and we decided not to change this parameter. More experimentation is left for the future work. For each of the closest neighbours two best classifiers associated to them are taken. The decision of using the two best classifiers in each case tries to diversify the options that can be contained in the solution space. Depending on the metrics used to scored the algorithms the criteria of how well a classifier is may vary. In case of working with the F-score metric we are interested in those classifiers which have the largest values of this metric. On the other hand, if we are CHAPTER 5. RANKING ALGORITHM 37 working with p-value the classifiers with the smallest values are chosen. After the algorithm decides which are the closest instances, the score associated to each classifier is calculated. Equation 5.2 and 5.3 show how the rank is calculated when the F-score and p-value are used respectively. score =F1 (distnei )2(5.2) score =1−T1 (distnei )2, (5.3) where F1 and T1 are the F-score and the p-value of the best classifier associated to the closest neighbours data set; and distnei is the distance assigned to the closest data sets. In some cases a classifier can be selected more than once in the list of the 10 classifiers (two classifiers for each neighbour). We interpret this situation as if the classifier is more prone to give a good performance with the analysed data set. In case of repetitions the score associated to each of them are added. After processing the score values a ranking is obtained by sorting the algorithms in descendent with respect to their score values. We consider the algorithm with the largest score value the one that will produce the best classification on the data set under test. The last step of our approach is to evaluate how good the ranking is. In order to accomplish this, the general data set that contains the information associated to the classifier is used. Because of certain technical problems that may appear during the execution of the experiments the number of experiments for a data set may vary. CHAPTER 5. RANKING ALGORITHM 44 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 Normalize position Cumulative density Experiment 1 (F−score) 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 Normalize position Cumulative density Experiment 2 (p−values) 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 Normalize position Cumulative density Experiment 3 (F−score) 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 Normalize position Cumulative density Experiment 4 (p−values) 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 Normalize position Cumulative density Experiment 5 (F−score) 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 Normalize position Cumulative density Experiment 6 (p−values) 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 Normalize position Cumulative density Experiment 7 (F−score) 0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00 Normalize position Cumulative density Experiment 8 (p−values) Figure 5.5: Cumulative density curves associated to each experiment. CHAPTER 5. RANKING ALGORITHM 45 value is used have the best performance. It can be said that some stability is observed in all the results associated to AUC obtained for the p-values. In the analysis of the AUC 0.5 is used as a baseline and it is interpreted as a random result. On the other hand, when the value of the AUC is close to 1 it can be interpret as very good results. This lead us to conclude that it is better to use the p-values of the permutation test in algorithm selection techniques than the F-score metric. The performance obtain using the F-score is also good but the results are better when the p-values are used. With respect to the experiments with imputing the missing values by means of the kNN we observed that there are improvements on the performance, but the different is quite small. Hence, we do not consider that this value imputation has a huge impact on the final results. Chapter 6 Conclusions and Future Work 6.1 Conclusions This work presents an experimental approach for classifier algorithms’ selection. After reviewing the literature our principal contribution is the application of the permutation tests as an important criteria to tackle this problem. From the experiments executed over our ranking approach, we conclude that the pvalues obtained by means of the permutation test seem to be a good indicator that should be used in the selection process. The AUC criteria is the one used in order to obtain this conclusion. We also remark the importance of experimental databases in order to share, reuse and make reproducible experimentation gear for scientists working in this field. The data used in this work is available in http://mucc.lsi.upc.edu/ (Authors permission should be requested.) The meta-features of 215 binary data sets are used in this research. These data sets are processed using 8 of the most common classification algorithms and a total of 37 different configurations of them. It means that approximatively 46 CHAPTER 6. CONCLUSIONS AND FUTURE WORK 47 7800 instances are used to validate our ranking procedure. 6.2 Future Work We see several avenues that could be pursued as continuation of the project presented here. The first one is to study the behaviour of our proposed ranking procedure using multiclasses data sets. In this work we have restricted to using binary data sets. Also, with respect to the data sets in this work these are described by means of 14 meta-features, thus, it becomes important to analyse the impact of each one of the meta-features or subsets of them. It implies measuring the influence of a metric (or a subset of metrics) and its contribution to the final result. In terms of the classification algorithms, it becomes necessary to increase the number of algorithms under study and the number of metrics used to describe them. We consider balancing the number of metrics used to described data sets and algorithm, in order to apply other techniques, such as, regression or classification trees as a good starting point. Appendix A Appendix Tables A.1,A.2,A.3,A.4 present the principal characteristics of all the data sets used in this project. Data sets that were originally multi classes and were converted to binary are shown with their name followed by the class labels used for the bi-partition. For example, abalone_10_13 corresponds to the data set abalone restricted to the classes 10 and 13. Table A.5 shows the parameters associated to each classification algorithm and the values used during the experimentation. 48 APPENDIX A. APPENDIX 49 Name Number of Attributes Number of Instances Missing values ConfLongDemo_lying_sitting 6 81724 0 ConfLongDemo_standing_up_from_lying_lying 6 72841 0 ConfLongDemo_standing_up_from_lying_sitting 6 45605 0 ConfLongDemo_walking_lying 6 87190 0 ConfLongDemo_walking_sitting 6 59954 0 ConfLongDemo_walking_standing_up_from_lying 6 51071 0 EEG_Eye_State 14 14980 0 ILPD 11 583 1 Qualitative_Bankruptcy 6 250 0 Skin_NonSkin 4 245057 0 ThoraricSurgery 16 470 0 abalone_10_12 8 901 0 abalone_10_13 8 837 0 abalone_10_6 8 893 0 abalone_10_7 8 1025 0 abalone_10_8 8 1202 0 abalone_10_9 8 1323 0 abalone_11_10 8 1121 0 abalone_11_12 8 754 0 abalone_11_13 8 690 0 abalone_11_6 8 746 0 abalone_11_7 8 878 0 abalone_11_8 8 1055 0 abalone_11_9 8 1176 0 abalone_12_6 8 526 0 abalone_12_7 8 658 0 abalone_12_8 8 835 0 abalone_12_9 8 956 0 abalone_13_12 8 470 0 abalone_13_6 8 462 0 abalone_13_7 8 594 0 abalone_13_8 8 771 0 abalone_13_9 8 892 0 abalone_6_8 8 827 0 abalone_6_9 8 948 0 abalone_7_6 8 650 0 abalone_7_8 8 959 0 abalone_7_9 8 1080 0 abalone_9_8 8 1257 0 adult 14 32561 0 agaricus-lepiota 24 8124 1 balance-scale_R_L 4 576 0 bands 40 539 1 bank-full 16 45211 0 biodeg 41 1055 0 breast-cancer-wisconsin-cont 9 683 0 breast-cancer-wisconsin-disc 9 699 1 breast-cancer-wisconsin 9 683 1 breast-cancer 9 286 1 bupa 6 345 0 crx 15 690 1 data_banknote_authentication 4 1372 0 dermatology_1_2 34 173 1 dermatology_1_3 34 184 1 dermatology_3_2 34 133 1 ecoli_cp_im 7 220 0 ecoli_pp_cp 7 195 0 ecoli_pp_im 7 129 0 glass_1_2 10 146 0 haberman 4 306 0 heart_disease 13 303 1 hepatitis 20 155 1 ionosphere 32 351 0 iris_Iris-setosa_Iris-versicolor 4 100 0 iris_Iris-virginica_Iris-setosa 4 100 0 iris_Iris-virginica_Iris-versicolor 4 100 0 Table A.1: Principal characteristics of the data sets. APPENDIX A. APPENDIX 50 Name Number of Attributes Number of Instances Missing values krkopt_draw_eleven 6 5650 0 krkopt_draw_fifteen 6 4962 0 krkopt_draw_fourteen 6 7349 0 krkopt_draw_nine 6 4508 0 krkopt_draw_ten 6 4781 0 krkopt_draw_thirteen 6 6990 0 krkopt_eleven_fifteen 6 5020 0 krkopt_eleven_nine 6 4566 0 krkopt_eleven_thirteen 6 7048 0 krkopt_fourteen_eleven 6 7407 0 krkopt_fourteen_fifteen 6 6719 0 krkopt_fourteen_nine 6 6265 0 krkopt_fourteen_thirteen 6 8747 0 krkopt_nine_fifteen 6 3878 0 krkopt_nine_thirteen 6 5906 0 krkopt_ten_eleven 6 4839 0 krkopt_ten_fifteen 6 4151 0 krkopt_ten_fourteen 6 6538 0 krkopt_ten_nine 6 3697 0 krkopt_ten_thirteen 6 6179 0 krkopt_thirteen_fifteen 6 6360 0 krkopt_twelve_draw 6 6393 0 krkopt_twelve_eleven 6 6451 0 krkopt_twelve_fifteen 6 5763 0 krkopt_twelve_fourteen 6 8150 0 krkopt_twelve_nine 6 5309 0 krkopt_twelve_ten 6 5582 0 krkopt_twelve_thirteen 6 7791 0 letter-recognition_A_D 16 1594 0 letter-recognition_A_F 16 1564 0 letter-recognition_A_G 16 1562 0 letter-recognition_A_M 16 1581 0 letter-recognition_A_N 16 1572 0 letter-recognition_A_P 16 1592 0 letter-recognition_A_Q 16 1572 0 letter-recognition_A_T 16 1585 0 letter-recognition_A_U 16 1602 0 letter-recognition_A_X 16 1576 0 letter-recognition_A_Y 16 1575 0 letter-recognition_D_F 16 1580 0 letter-recognition_D_G 16 1578 0 letter-recognition_D_M 16 1597 0 letter-recognition_D_N 16 1588 0 letter-recognition_D_P 16 1608 0 letter-recognition_D_Q 16 1588 0 letter-recognition_D_T 16 1601 0 letter-recognition_D_U 16 1618 0 letter-recognition_D_X 16 1592 0 letter-recognition_D_Y 16 1591 0 letter-recognition_F_M 16 1567 0 letter-recognition_F_N 16 1558 0 letter-recognition_F_P 16 1578 0 letter-recognition_F_Q 16 1558 0 Table A.2: Principal characteristics of the data sets. APPENDIX A. APPENDIX 51 Name Number of Attributes Number of Instances Missing values letter-recognition_F_T 16 1571 0 letter-recognition_F_U 16 1588 0 letter-recognition_F_X 16 1562 0 letter-recognition_F_Y 16 1561 0 letter-recognition_G_F 16 1548 0 letter-recognition_G_M 16 1565 0 letter-recognition_G_N 16 1556 0 letter-recognition_G_P 16 1576 0 letter-recognition_G_Q 16 1556 0 letter-recognition_G_T 16 1569 0 letter-recognition_G_U 16 1586 0 letter-recognition_G_X 16 1560 0 letter-recognition_G_Y 16 1559 0 letter-recognition_M_N 16 1575 0 letter-recognition_M_P 16 1595 0 letter-recognition_M_Q 16 1575 0 letter-recognition_M_T 16 1588 0 letter-recognition_M_U 16 1605 0 letter-recognition_M_X 16 1579 0 letter-recognition_M_Y 16 1578 0 letter-recognition_N_P 16 1586 0 letter-recognition_N_Q 16 1566 0 letter-recognition_N_T 16 1579 0 letter-recognition_N_U 16 1596 0 letter-recognition_N_X 16 1570 0 letter-recognition_N_Y 16 1569 0 letter-recognition_P_T 16 1599 0 letter-recognition_P_U 16 1616 0 letter-recognition_P_X 16 1590 0 letter-recognition_P_Y 16 1589 0 letter-recognition_Q_P 16 1586 0 letter-recognition_Q_T 16 1579 0 letter-recognition_Q_U 16 1596 0 letter-recognition_Q_X 16 1570 0 letter-recognition_Q_Y 16 1569 0 letter-recognition_T_X 16 1583 0 letter-recognition_T_Y 16 1582 0 letter-recognition_U_T 16 1609 0 letter-recognition_U_X 16 1600 0 letter-recognition_U_Y 16 1599 0 letter-recognition_Y_X 16 1573 0 magic04 11 19020 0 mammographic_masses 6 961 1 monks-1 6 556 0 monks-2 6 601 0 monks-3 6 554 0 nursery_priority_not_recom 8 8586 0 nursery_priority_spec_prior 8 8310 0 nursery_spec_prior_not_recom 8 8364 0 pima-indians-diabetes 9 768 0 promoters 57 106 0 seismic-bumps 18 2584 0 spambase 58 4601 0 titanic 3 2201 0 transfusion 4 748 0 Table A.3: Principal characteristics of the data sets. APPENDIX A. APPENDIX 52 Name Number of Attributes Number of Instances Missing values turkiye-student-evaluation_generic_10_13 32 1289 0 turkiye-student-evaluation_generic_10_3 32 1352 0 turkiye-student-evaluation_generic_10_5 32 1104 0 turkiye-student-evaluation_generic_10_6 32 1006 0 turkiye-student-evaluation_generic_10_8 32 948 0 turkiye-student-evaluation_generic_10_9 32 1019 0 turkiye-student-evaluation_generic_11_10 32 932 0 turkiye-student-evaluation_generic_11_13 32 1325 0 turkiye-student-evaluation_generic_11_3 32 1388 0 turkiye-student-evaluation_generic_11_5 32 1140 0 turkiye-student-evaluation_generic_11_6 32 1042 0 turkiye-student-evaluation_generic_11_8 32 984 0 turkiye-student-evaluation_generic_11_9 32 1055 0 turkiye-student-evaluation_generic_13_3 32 1745 0 turkiye-student-evaluation_generic_13_5 32 1497 0 turkiye-student-evaluation_generic_13_6 32 1399 0 turkiye-student-evaluation_generic_13_8 32 1341 0 turkiye-student-evaluation_generic_13_9 32 1412 0 turkiye-student-evaluation_generic_3_5 32 1560 0 turkiye-student-evaluation_generic_3_6 32 1462 0 turkiye-student-evaluation_generic_3_8 32 1404 0 turkiye-student-evaluation_generic_3_9 32 1475 0 turkiye-student-evaluation_generic_5_6 32 1214 0 turkiye-student-evaluation_generic_5_8 32 1156 0 turkiye-student-evaluation_generic_5_9 32 1227 0 turkiye-student-evaluation_generic_6_8 32 1058 0 turkiye-student-evaluation_generic_6_9 32 1129 0 turkiye-student-evaluation_generic_9_8 32 1071 0 voting 16 435 1 wdbc 20 569 0 wilt 5 4839 0 winequality-red_5_6 11 1319 0 winequality-white_5_6 11 3655 0 winequality-white_5_7 11 2337 0 winequality-white_7_6 11 3078 0 yeast_ME3_CYT 8 626 0 yeast_MIT_CYT 8 707 0 yeast_MIT_ME3 8 407 0 yeast_NUC_CYT 8 892 0 yeast_NUC_ME3 8 592 0 yeast_NUC_MIT 8 673 0 Table A.4: Principal characteristics of the data sets. APPENDIX A. APPENDIX 53 Classifiers Parameters Knn Learner k = (0, 1, 5) distance_constructor = Euclidean rank_weight = (True, False) Logistic Regression weight_id = 1 remove_singular = (True, False) fitter = LogRegFitter_Cholesky stepwise_lr = False add_crit = 0.2 num_features = -1 delete_crit = 0.3 Majority - Naive Bayes adjust_threshold = (True, False) Neural Network name = NeuralNetwork n_mid = (0, 6) reg_fact = 0.3 max_iter= (30, 100) normalize = False Random Forest name=randomForest trees=(10, 50 , 100) SVM kernel_type = (Linear, Polynomial, RBF, Sigmoid) degree = 3 gamma = 0.0 coef0 = 0 kernel_func = None C = (0.5, 1, 2, 4) cache_size = 200 probability = False shrinking = True normalization = True verbose = False svm_type = C_SVC Tree Learner max_depth = (8, 16, 32) Table A.5: Parameter configuration used in each classifier.