Machine Learning (ML) with
Weka
Weka can classify data or
approximate functions: choice of
many algorithms
Weka: can use GUI or command line
Click Explorer
Data Preprocessing
Open .arff file: click "Open file", browse to file
The well-known iris ML data set
For sepallength attribute we see distribution of classes (colors).
We see min, max, mean, standard deviation of numeric attribute.
Data Preprocessing
Click Edit to view/modify the .arff file
Data Preprocessing by instance
Click Filter Choose. Select filters > unsupervised > Instance > Randomize
Press Apply. Click Edit: see that examples are now randomized
Data Preprocessing by attribute
Click Filter Choose. Select filters > unsupervised > Attribute > Normalize
Press Apply. Click Edit: see that examples are now normalized also. Can save
Data Preprocessing
Statistics have changed due to data normalization
Can reduce number of attributes
Choose unsupervised>attribute>PrincipalComponents
Select Apply (will select Ranker also)
0.581petallength+0.566petalwidth+0.522sepallength-0.263sepalwidth
-0.926sepalwidth-0.372sepallength-0.065petalwidth-0.021petallength
Can reduce number of attributes
Press “Undo” to get back all 4 attributes
Then remove an attribute: click the checkbox for petalwidth
Then click the Remove button
Classify
Click Classify, Choose: functions >SMO for support vector machine
Left-click “SMO” for properties, for kernel click Choose > RBFkernel
left-click on the kernel for properties specific to RBF (ex: gamma)
Click on “More” for more information about the parameters of ML method
Classify
Click Classify, Choose: functions >Multilayer Perceptron
Left-click for properties, change GUI to true, press start to see ANN topology
4 green input nodes(1 per attribute), 3 red hidden nodes {user controlled:
defaults to a=(inputs +outputs) / 2}, 3 yellow output nodes (1 per class)
© Copyright 2026 Paperzz