0% found this document useful (0 votes)
7 views21 pages

Lab Report Using WEKA Lab Report Using WEKA

This lab report provides an overview of using WEKA for data mining, covering various algorithms including Apriori, FP-Growth, ID3, Bayesian classifiers, and K-Means. It outlines the steps for implementing each algorithm, emphasizing WEKA's user-friendly interface for data analysis and model building. The report concludes that WEKA is an effective tool for applying these data mining techniques.

Uploaded by

bibek547khadka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views21 pages

Lab Report Using WEKA Lab Report Using WEKA

This lab report provides an overview of using WEKA for data mining, covering various algorithms including Apriori, FP-Growth, ID3, Bayesian classifiers, and K-Means. It outlines the steps for implementing each algorithm, emphasizing WEKA's user-friendly interface for data analysis and model building. The report concludes that WEKA is an effective tool for applying these data mining techniques.

Uploaded by

bibek547khadka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

lOMoARcPSD|56400582

Lab Report Using WEKA

data warehouse and data mining (Tribhuvan University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Bibek Khadka (bibek547khadka@gmail.com)
lOMoARcPSD|56400582

TABLE OF CONTENTS

1. Learning the Basics of WEKA 1


2. Implementing the Apriori Algorithm 2
3. Implementing FP-Growth Algorithm 5
4. Classifying Using ID3 Algorithm 10
5. Classifying Data Using Bayesian Algorithms 13
6. Implementing K-Means Algorithm 15

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

Introduction

WEKA (Waikato Environment for Knowledge Analysis) is a popular open-source tool for data
mining and machine learning. It provides a collection of algorithms and tools for data
preprocessing, classification, regression, clustering, and association rule mining. This report
covers the implementation of various data mining algorithms using WEKA, including the Apriori
and FP-growth algorithms for association rule mining, ID3 and Bayesian algorithms for
classification, and K-means for clustering.

1. Learning the Basics of WEKA


WEKA provides a graphical user interface for interacting with datasets and applying machine
learning algorithms. Key components include:

● Explorer : For interactive data analysis.


● Experimenter : For performing experiments and evaluating results.
● Knowledge Flow : For visually designing machine learning workflows.
● Command Line Interface : For scripting and batch processing.

Steps to Start Using WEKA:

1. Download and Install : Get WEKA from its [official


website](https://www.cs.waikato.ac.nz/ml/weka/).
2. Load Data : Open WEKA and use the `Explorer` to load datasets in formats such as
ARFF or CSV.
3. Preprocess Data : Use various preprocessing tools to clean and prepare data.

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

2. Implementing the Apriori Algorithm


The Apriori algorithm is used for association rule mining, aiming to find frequent itemsets in
transactional data.

Steps to Implement Apriori in WEKA:

1. Load Dataset : Import a dataset suitable for association rule mining (e.g.,
`Supermarket.arff`).
2. Select Algorithm : Go to the `Associate` tab.
3. Choose Apriori : Select `Apriori` from the list of association algorithms.
4. Set Parameters : Adjust parameters such as `Support` and `Confidence`.
5. Run Algorithm : Click `Start` to run the Apriori algorithm.
6. View Results : Analyze the output rules and their support and confidence values.

Dataset: breast-cancer.arff
Algorithm: Apriori
Parameters: Default

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

3. Implementing FP-Growth Algorithm


The FP-Growth algorithm is another approach to association rule mining that uses a frequent
pattern tree (FP-tree).

Steps to Implement FP-Growth in WEKA:

1. Load Dataset : Use the same or a different transactional dataset.


2. Select Algorithm : Go to the `Associate` tab.
3. Choose FP-Growth : Select `FPGrowth` from the list of association algorithms.
4. Set Parameters : Configure parameters like `MinSupport`.
5. Run Algorithm : Click `Start` to execute the FP-Growth algorithm.
6. View Results : Review the frequent itemsets and association rules.

Procedure

Step 1: Open the data file (Shopping.arff) in Weka Explorer. It assumes that the required data
fields have been discretized.
Step 2: Click on the "Associate" tab to bring up the interface for the association rule algorithm.
Step 3: Use the FP-Growth algorithm (the default algorithm in Weka for association rule
mining).
Step 4: To modify parameters like support or confidence, you can adjust them in the text box
located to the right of the "Choose" button.

The data set includes the following attributes for shopping items:

● milk {yes, no}


● bread {yes, no}
● honey {yes, no}
● ghee {yes, no}
● jam {yes, no}

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

4. Classifying Using ID3 Algorithm


ID3 (Iterative Dichotomiser 3) is a decision tree algorithm used for classification.

Steps to Implement ID3 in WEKA:

1. Load Dataset :.Select vote.arff file from the “Open file” under the preprocess tab option.
2. Select Algorithm : Go to the “Classify” tab for classifying the unclassified data.
3. Choose ID3 :Click on the “Choose” button. From this, select “trees -> J48”.
(an implementation of the C4.5 algorithm, which is an extension of ID3).
4. Set Parameters : Adjust settings if necessary.
5. Run Algorithm : Click `Start` to build the decision tree.
6. View Results : Examine the decision tree and classification accuracy.To visualize the
tree, right-click on the result and select visualize the tree.

10

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

11

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

12

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

5. Classifying Data Using Bayesian Algorithms


Bayesian algorithms, such as the Naive Bayes classifier, are used for probabilistic
classification.

Steps to Implement Naive Bayes in WEKA:

1. Load Dataset : Use a suitable dataset for classification.


2. Select Algorithm : Go to the `Classify` tab.
3. Choose Naive Bayes : Select `NaiveBayes` from the list of classifiers.
4. Set Parameters : Use default settings or adjust parameters.
5. Run Algorithm : Click `Start` to train the model.
6. View Results : Check the classification results and performance metrics.

13

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

14

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

6. Implementing K-Means Algorithm


K-Means is a clustering algorithm used to partition data into k clusters.

Steps to Implement K-Means in WEKA:

1. Load Dataset : Use a dataset suitable for clustering (e.g., `Iris.arff`).


2. Select Algorithm : Go to the `Cluster` tab.
3. Choose K-Means : Select `SimpleKMeans` from the list of clustering algorithms.
4. Set Parameters : Define the number of clusters (k) and other parameters.
5. Run Algorithm : Click `Start` to perform clustering.
6. View Results : Analyze the clusters and their centroids.

15

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

16

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

17

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

18

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)


lOMoARcPSD|56400582

Conclusion

In this lab, we have explored various data mining techniques using WEKA, including
association rule mining with Apriori and FP-Growth algorithms, classification with ID3 and
Bayesian algorithms, and clustering using K-Means. WEKA provides a user-friendly interface
for applying these algorithms, allowing for effective data analysis and model building.

19

Downloaded by Bibek Khadka (bibek547khadka@gmail.com)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy