1 of 12

Doing Exercises with WEKA

Hands-on Machine Learning Practice

​

dr.Jamolbek Mattiev

2 of 12

What is WEKA?

  • WEKA (Waikato Environment for Knowledge Analysis) is an open-source machine learning toolkit.
  • It provides tools for data preprocessing, classification, regression, clustering, and visualization.

3 of 12

Why Use WEKA for Exercises?

  • User-friendly GUI
  • No programming required
  • Supports many ML algorithms
  • Ideal for teaching and experimentation

4 of 12

Dataset Preparation

  • Supported formats: ARFF, CSV
  • Ensure class attribute is defined
  • Handle missing values
  • Normalize or standardize data if needed

5 of 12

Exercise 1: Loading a Dataset

  • Open WEKA Explorer
  • Click 'Open file'
  • Load an ARFF or CSV dataset
  • Check attributes and class label

6 of 12

Exercise 2: Data Preprocessing

  • Use 'Filter' options
  • Remove irrelevant attributes
  • Normalize numeric attributes
  • Discretize data if needed

7 of 12

Exercise 3: Classification

  • Choose 'Classify' tab
  • Select algorithm (e.g., J48, Naive Bayes, Random Forest)
  • Set class attribute
  • Run the model

8 of 12

Exercise 4: Model Evaluation

  • Evaluation methods:
  • - 10-fold cross-validation
  • - Percentage split
  • - Use training set
  • Analyze accuracy, precision, recall

9 of 12

Exercise 5: Clustering

  • Go to 'Cluster' tab
  • Select algorithm (e.g., K-means)
  • Set number of clusters
  • Interpret cluster assignments

10 of 12

Exercise 6: Visualization

  • Use 'Visualize' tab
  • Plot attributes
  • Color by class label
  • Understand data distribution

11 of 12

Common Student Tasks

  • Compare classifiers
  • Change class attribute order
  • Interpret confusion matrix
  • Export results

12 of 12

Conclusion

  • WEKA is a powerful tool for learning ML concepts
  • Hands-on exercises improve understanding
  • Suitable for research and education