Loading menu…

Comparative Analysis of Random Forest and J48 Classifiers for “IRIS” Variety Prediction

§ Sultan Moulay Slimane University

Send Message

To: Author

Comparative Analysis of Random Forest and J48 Classifiers for “IRIS” Variety Prediction

Article Fingerprint

ReserarchID

CSTITU8366

Comparative Analysis of Random Forest and J48 Classifiers for “IRIS” Variety Prediction Banner

Key Research Insights

Synthesized scholarly intelligence & interactive research assistant
  • English
  • Afrikaans
  • Albanian
  • Amharic
  • Arabic
  • Armenian
  • Azerbaijani
  • Basque
  • Belarusian
  • Bengali
  • Bosnian
  • Bulgarian
  • Catalan
  • Cebuano
  • Chichewa
  • Chinese (Simplified)
  • Chinese (Traditional)
  • Corsican
  • Croatian
  • Czech
  • Danish
  • Dutch
  • Esperanto
  • Estonian
  • Filipino
  • Finnish
  • French
  • Frisian
  • Galician
  • Georgian
  • German
  • Greek
  • Gujarati
  • Haitian Creole
  • Hausa
  • Hawaiian
  • Hebrew
  • Hindi
  • Hmong
  • Hungarian
  • Icelandic
  • Igbo
  • Indonesian
  • Irish
  • Italian
  • Japanese
  • Javanese
  • Kannada
  • Kazakh
  • Khmer
  • Korean
  • Kurdish (Kurmanji)
  • Kyrgyz
  • Lao
  • Latin
  • Latvian
  • Lithuanian
  • Luxembourgish
  • Macedonian
  • Malagasy
  • Malay
  • Malayalam
  • Maltese
  • Maori
  • Marathi
  • Mongolian
  • Myanmar (Burmese)
  • Nepali
  • Norwegian
  • Pashto
  • Persian
  • Polish
  • Portuguese
  • Punjabi
  • Romanian
  • Russian
  • Samoan
  • Scots Gaelic
  • Serbian
  • Sesotho
  • Shona
  • Sindhi
  • Sinhala
  • Slovak
  • Slovenian
  • Somali
  • Spanish
  • Sundanese
  • Swahili
  • Swedish
  • Tajik
  • Tamil
  • Telugu
  • Thai
  • Turkish
  • Ukrainian
  • Urdu
  • Uzbek
  • Vietnamese
  • Welsh
  • Xhosa
  • Yiddish
  • Yoruba
  • Zulu
Reading Preferences
Font Size
Line Spacing
Background

I. INTRODUCTION

People are often susceptible to making mistakes during analyses or, possibly, when trying to determine relationships between multiple features. This fact, makes it difficult for them to seek out solutions to certain problems. Data mining involves the utilization of sophisticated data analysis tools to get previously unknown, valid patterns, and relationships in the datasets[1]. These tools can include statistical models, mathematical algorithms, and machine learning methods [2].

Consequently, data processing consists of quite a collection and managing data, it also includes analysis and prediction [1].

The classification technique is capable of processing a sort of data than regression and is growing in popularity [3].

II. DATASET USED

The IRIS dataset contains three different classes of IRIS plants depending on their pattern [5,6]. Each class of IRIS plant contain fifty objects. The attributes that already predicted belongs to a category of IRIS plant. The list of attributes presents within the IRIS is often described as categorical, nominal, and continuous. The experts have mentioned that the info set is complete i.e. there isn't any missing value found in any attribute of this data set [6].

This research makes use of the documented IRIS dataset, which contains three classes of fifty instances each. The 150 instances, which are equally divided between the three classes, hold the subsequent four numeric attributes:

1. Sepal length - continuous

2. Sepal width - continuous

3. Petal length - continuous

4. Petal width –continuous

And therefore the fifth attribute "Variety" is that the predictive attribute which identifies which class of the following belongs the instance: IRIS Setosa, IRISVersicolor, or IRIS Virginica [5,6].

III. CLASSIFIERS USED

In this paper, we compared the proficiency assessment of IRIS variety for two tree based classifiers: Random Forest and J48 Classifiers.

a) Random Forest Classifier

Random Forest [7] is considered one of the best "off-the-shelf" classifiers for high-dimensional data. Random forest is a mix of tree predictors sampled autonomously count on the values of a random vector following an equivalent distribution for all trees of the forest. The generalization error of random forest classifier depends on the association between the individual trees inside the forest and the strength of them. The dataset divided into a training dataset to learn each tree, and the remaining of the data set is used to estimate error and variable importance. Class assignment is formed according to the number of votes for any of the trees, to apply the model of the results. it's almost like bagged decision trees with hardly some key differences as given below:

For every split point, the search isn't overall p variables but just over m (number of tested) variables (where, e.g, m = [p/3])

No pruning necessary. Trees are often grown until each node contains just only a few observations. The Random Forest gave better prediction, and almost no parameter adjustment is necessary.

b) J48 Classifier

The J48 classifier is an extension of the decision tree C4.5 algorithm for classification [8], which creates a binary tree. It's the foremost useful decision tree approach for classification problems. This system constructs a tree to model the classification process. After the tree is made, the algorithm is applied to every tuple within the database and leads to classification for that tuple [9].

Algorithm J48 [9]:

INPUT: P//Training data OUTPUT DT //Decision tree DTBUILD (*P) { DT = φ; DT = Create root node and label with splitting attribute; DT = Add arc to root node for each split predicate and label; For each arc do P = Database created by applying splitting predicate to P; If stopping point reached for this path, then DT' = create leaf node and label with appropriate class; Else DT' = DTBUILD(P); DT = add DT' to arc; }

The absent values are ignored by J48 while building a decision tree, i.e. the known information about the attribute values for the other records is helpful to predict the value for that item. The idea is to divide the data into a range based on the attribute values for that element which are identified in the training sample [10].

IV. PERFORMANCE MEASURES USED

Various scales are wont to gauge the performance of the classifiers.

a) Classification Accuracy (CA)

Classification accuracy presents the percent of correctly classified instance in the test dataset. We calculate it by dividing the correctly classified instances by the total number of instance multiplied by 100.

b) Mean Absolute Error (MAE)

Mean absolute error is that the average of the variance between predicted and actual value altogether test cases. It's an honest measure to measure performance.

c) Root Mean Square Error (RMSE)

Root mean squared error is employed to scale dissimilarities between values. It's determined by taking the root of the mean square error.

d) Confusion Matrix (CM)

A confusion matrix is a tool checking in particular how often the predictions are correct compared to reality in classification problems.

V. RESULTS AND DISCUSSION

In this work, to evaluate the performance of the different Tree-based Classifiers (Random Forest and J48), we used a well-known open-source tool in the machine learning field called "WEKA". The performance is tested using two methods, first by splitting the dataset into training (70%) and testing (30%) datasets, as well as using different Cross-Validation methods.

a) Performance of Random Forest Classifier

Table 1 show the global evaluation summary of Random Forest Classifier using both of the test modes: splitting and different cross-validation methods. Fig.1 and Fig.2 display the performance of Random Forest Classifier in terms of Classification Accuracy and time taken to build the model. From Table I to Table VI we gave the confusion matrix for different test modes.

By applying these test modes using Random Forest Classifier, we got 95.55% accuracy, spending 0.17s on building the model for the split. Using different cross-validation methods to check their performance, we obtained around 94.99% accuracy, spending 0.06s on building the model.

Table 1: Random Forest Classifier Overall Evaluation Summary
Test ModeCorrectly Classified InstancesIncorrectly Classified InstancesAccuracyMean Absolute ErrorRoot Mean Squared ErrorTime Taken to Build Model (Sec)
Split (70%)43295.55%0.03630.15320.17
5 Fold CV143795.33%0.0370.15310.05
10Fold CV142894.66%0.04080.16240.03
15Fold CV142894.66%0.03850.16130.14
20Fold CV143795.33%0.03790.15580.03
Figure 1: Classification Accuracy of Random Forest Classifier
Figure 1: Classification Accuracy of Random Forest Classifier
Figure 2: Time Taken to Build the Model of Random Forest Classifier
Figure 2: Time Taken to Build the Model of Random Forest Classifier
Table 2: Confusion Matrix – Random Forest Classifier (Split 70%)
SetosaVersicolorVirginicaActual (Total)
Setosa140014
Versicolor016016
Virginica021315
Predicted (Total)14181345
Table 3: Confusion Matrix – Random Forest Classifier (5 Fold CV)
SetosaVersicolorVirginicaActual (Total)
Setosa500050
Versicolor047350
Virginica044650
Predicted (Total)505149150
Table 4: Confusion Matrix – Random Forest Classifier (10 Fold CV)
SetosaVersicolorVirginicaActual (Total)
Setosa500050
Versicolor047350
Virginica044650
Predicted (Total)505149150
Table 5: Confusion Matrix – Random Forest Classifier (15 Fold CV)
SetosaVersicolorVirginicaActual (Total)
Setosa500050
Versicolor047350
Virginica054550
Predicted (Total)505248150
Table 6: Confusion Matrix – Random Forest Classifier (20 Fold CV)
SetosaVersicolorVirginicaActual (Total)
Setosa500050
Versicolor047350
Virginica044650
Predicted (Total)505149150

b) Performance of J48Classifier

Table VII show the global evaluation summary of J48classifier using both of the test modes: splitting and different cross-validation methods. Fig.3 and Fig.4 display the performance of J48classifier in terms of classification accuracy and time taken on building the model. From Table VIII to Table XI we gave the confusion matrix for different test modes.

By applying these test models using J48 classifier we got 95.55% accuracy, spending 0.05s on building the model for the split mode. Using different cross-validation methods to check their performance, on average we obtained around 95.83% accuracy, spending 0.025s to build the model.

Table 7: J48 Classifier Overall Evaluation Summary
Test ModeCorrectly Classified InstancesIncorrectly Classified InstancesAccuracyMean Absolute ErrorRoot Mean Squared ErrorTime Taken to Build Model (Sec)
Split (70%)43295.55%0.04160.16820.05
5Fold CV144696%0.0350.15820.02
10Fold CV144696%0.0350.15860.02
15Fold CV143795.33%0.03950.17580.03
20Fold CV144696%0.03540.15860.03
Figure 3: Classification Accuracy of J48 Classifier
Figure 3: Classification Accuracy of J48 Classifier
Figure 4: Time Taken to Build the Model of J48Classifier
Figure 4: Time Taken to Build the Model of J48Classifier
Table 8: Confusion Matrix – J48 Classifier (Split 70%)
SetosaVersicolorVirginicaActual (Total)
Setosa140014
Versicolor016016
Virginica021315
Predicted (Total)14181345
Table 9: Confusion Matrix – J48 Classifier (5 Fold CV)
SetosaVersicolorVirginicaActual (Total)
Setosa491050
Versicolor047350
Virginica024850
Predicted (Total)495051150
Table 10: Confusion Matrix – J48 Classifier (10 Fold CV)
SetosaVersicolorVirginicaActual (Total)
Setosa491050
Versicolor047350
Virginica024850
Predicted (Total)495051150
Table 11: Confusion Matrix – J48 Classifier (15 Fold CV)
SetosaVersicolorVirginicaActual (Total)
Setosa491050
Versicolor047350
Virginica034750
Predicted (Total)495150150
Table 12: Confusion Matrix – Random Forest Classifier (20 Fold CV)
SetosaVersicolorVirginicaActual (Total)
Setosa491050
Versicolor047350
Virginica024850
Predicted (Total)495051150

VI. COMPARISON OF RANDOM FOREST AND J48 CLASSIFIERS

Fig. 5 and Fig. 6 illustrate a comparison between Random forest and J48 according to classification accuracy and time taken on building the model.

Through the comparison of the performance using training set (70%) process and various cross-validation methods between Random Forest and J48 classifiers depending on time taken on building the model, CA, MAE, and RMSE values, we reached that J48 classifier outperforms Random Forest.

Figure 5: Classification Accuracy, Comparison between Random Forest and J48 Classifiers Figure 6: Time Taken to Build the Model, Comparison between Random Forest and J48 Classifiers
Figure 5: Classification Accuracy, Comparison between Random Forest and J48 Classifiers Figure 6: Time Taken to Build the Model, Comparison between Random Forest and J48 Classifiers

VII. CONCLUSION

This research work compares the efficiency of Random Forest and J48 Classifiers for IRIS variety prediction. The test is accomplished using WEKA 3.9in a machine with a processor i5-2430M 2.40 GHz and 4.00GB in RAM. Also, we compare the performance of both of the classifiers in terms of different scales of effectiveness evaluation. At last, we observed that J48classifier performs best than Random Forest classifier for IRIS variety prediction by taking different measures, including classification accuracy, Mean Absolute Error, and Time Taken to Build the Model.

References

3 Cites in Article
  1. 1. T Daniel,Chantal Larose,Larose (2014). An Introduction to Data Mining. An Introduction to Data Mining
  2. 2. M Mehmed,Kantardzic (2002). Data Mining: Concepts, Models, Methods, and Algorithms. Data Mining: Concepts, Models, Methods, and Algorithms
  3. 3. Margaret Danham,S Sridhar (2006). Data Mining, Introductory and Advanced Topics. Person Education

Funding

No external funding was declared for this work.

Conflict of Interest

The authors declare no conflict of interest.

Ethical Approval

No ethics committee approval was required for this article type.

Data Availability

Not applicable for this article.

How to Cite This Article

Youness Lakhdoura, Rachid Elayachi. 2020. "Comparative Analysis of Random Forest and J48 Classifiers for “IRIS” Variety Prediction". Global Journal of Computer Science and Technology - H: Information & Technology GJCST-H Volume 20 (GJCST Volume 20 Issue H2).

More Citation Formats

Download Citation

Journal Specifications

Crossref Journal DOI 10.17406/gjcst

Print ISSN 0975-4350

e-ISSN 0975-4172

Keywords
Classification
GJCST-H Classification J.1
Version of record
v1.2

Issue date
October 21, 2020

Language
English
Order Article Reprint
Experience in AR

Explore published articles in an immersive Augmented Reality environment. Our platform converts research papers into interactive 3D books, allowing readers to view and interact with content using AR and VR compatible devices.

Read in 3D

Your published article is automatically converted into a realistic 3D book. Flip through pages and read research papers in a more engaging and interactive format.

Article Matrices
Total Views: 1.8K
Total Downloads: 99
All Trends

Request Access

Please fill out the form below to request access to this research paper. Your request will be reviewed by the editorial or author team.
X

This is the heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

High-quality academic research articles on global topics and journals.

Comparative Analysis of Random Forest and J48 Classifiers for “IRIS” Variety Prediction

Youness Lakhdoura
Youness Lakhdoura Sultan Moulay Slimane University
Rachid Elayachi
Rachid Elayachi <p>Sultan Moulay Slimane University</p>