Building a Machine Learning Model Using J48 Classifier
What is the J48 Classifier?
J48 is a machine learning decision tree classification algorithm based on Iterative Dichotomiser 3. It is very helpful in examine the data categorically and continuously.
Attention reader! Don’t stop learning now. Get hold of all the important Machine Learning Concepts with the Machine Learning Foundation Course at a student-friendly price and become industry ready.
Note: To build our J48 machine learning model we’ll use the weka tool.
What is Weka?
Weka is an open-source tool developed by the University of Waikato, New Zealand licensed under GNU public license. You can download weka on any operating system. Weka has GUI and APIs available to use.
Steps to follow:
Step 1: Create a model using GUI
Step 2: After opening Weka click on the “Explorer” Tab
Step 3: In the “Preprocess” Tab Click on “Open File” and select the “breast-cancer.arff” file which will be located in the installation path, inside the data folder.
In this tab, you can view all the attributes and play with them.
Step 4: In the “Classify” tab click on the choose button. Now under weka/classifiers/trees/ select J48
Step 5: Now one can click on the J48 Classifier selection and play around with it like changing batch size, confidence factor, etc. There under “Test Options” we’ll use the default cross-validation option as folds 10 and click on start.
Now we are done with discussing that Weka has Java API that you can use to create machine learning models so di now let us create a model using API