Ensemble methods – MOA

To ensemble, as the word suggests, is to view together, or at the same time. It is used to combine multiple learner algorithms, in order to obtain better results and performance. There are various techniques that you can use for an ensemble. Some commonly used ensemble techniques or classifiers include bagging, boosting, stacking, a bucket of models, and so on.

Massive Online Analysis (MOA) supports ensemble classifiers, such as accuracy weighted ensembles, accuracy updated ensembles, and many more. In this section, we will show you how to use the leveraging bagging algorithm:

  1. Open the Terminal and execute the following command:
java -cp moa.jar -javaagent:sizeofag-1.0.4.jar moa.gui.GUI
  1. Select the Classification tab and click on the Configure button:

This will open the Configure task option.

  1. In the learner option, select bayes.NaiveBayes, and then, in the stream option, click on Edit, as shown in the following screenshot:

  1. Select ConceptDriftStream, and, in stream and driftstream, select the AgrawalGenerator; it will use the Agrawal dataset for the stream generator:

  1. Close all of the windows and click on the Run button:

This will run the task and generate the following output:

  1. Let's use the LeveragingBag option. For this, open the Configure task window and select the Edit option in baseLearner, which will show the following; select LeveragingBag from the first drop-down box. You can find other options, such as boosting and average weight ensembles, in the first drop-down box:

Leave the stream as AgrawalGenerator, as shown in the following screenshot:

  1. Close the Configure task window and click on the Run button; this will take some time to complete:

The output shows the evaluation after every 10,000 instances, how much RAM time is taken with classification correctness, as well as Kappa statistics. As you can see, over time, the classification correctness increases, along with the increasing instances. The graph in the preceding screenshot shows the correctness and the number of instances.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.170.223