Data Mining: Practical Machine Learning Tools and Techniques, Second Edition

(Brent) #1
toolbar. The mouse cursor changes to crosshairs to signal that you should next
place the component. Do this by clicking anywhere on the canvas, whereupon
a copy of the ARFF loader icon appears there. To connect it to an ARFF file,
right-click it to bring up the pop-up menu shown in Figure 11.2(a). Click Con-
figureto get the file browser in Figure 11.2(b), from which you select the desired
ARFF file. The File Formatpull-down menu allows you to choose a different
type of data source—for example, spreadsheet files.
Now we specify which attribute is the class using a ClassAssignerobject. This
is on the Evaluationpanel, so click the Evaluationtab, select the ClassAssigner,
and place it on the canvas. To connect the data source to the class assigner, right-
click the data source icon and select datasetfrom the menu, as shown in Figure
11.2(a). A rubber-band line appears. Move the mouse over the class assigner
component and left-click. A red line labeled datasetappears, joining the two
components. Having connected the class assigner, choose the class by right-
clicking it, selecting Configure,and entering the location of the class attribute.
We will perform cross-validation on the J48classifier. In the data flow model,
we first connect the CrossValidationFoldMakerto create the folds on which the
classifier will run, and then pass its output to an object representing J48. Cross-
ValidationFoldMakeris on the Evaluationpanel. Select it, place it on the canvas,
and connect it to the class assigner by right-clicking the latter and selecting

428 CHAPTER 11 | THE KNOWLEDGE FLOW INTERFACE


Figure 11.1The Knowledge Flow interface.
Free download pdf