Machine Learning with WEKA

Slides:



Advertisements
Similar presentations
Department of Computer Science, University of Waikato, New Zealand Eibe Frank WEKA: A Machine Learning Toolkit The Explorer Classification and Regression.
Advertisements

Florida International University COP 4770 Introduction of Weka.
Weka & Rapid Miner Tutorial By Chibuike Muoh. WEKA:: Introduction A collection of open source ML algorithms – pre-processing – classifiers – clustering.
Department of Computer Science, University of Waikato, New Zealand Eibe Frank WEKA: A Machine Learning Toolkit The Explorer Classification and Regression.
UNIVERSITY OF JYVÄSKYLÄ DEPARTMENT OF MATHEMATICAL INFORMATION TECHNOLOGY Tutorial 1: Introduction to WEKA and YALETIES443: Introduction to DM 1 Tutorial.
Department of Computer Science, University of Waikato, New Zealand Eibe Frank WEKA: A Machine Learning Toolkit The Explorer Classification and Regression.
March 25, 2004Columbia University1 Machine Learning with Weka Lokesh S. Shrestha.
An Extended Introduction to WEKA. Data Mining Process.
Machine Learning with WEKA. WEKA: the bird Copyright: Martin Kramer
1 How to use Weka How to use Weka. 2 WEKA: the software Waikato Environment for Knowledge Analysis Collection of state-of-the-art machine learning algorithms.
CSCI 347 / CS 4206: Data Mining Module 05: WEKA Topic 04: Data Preparation Tools.
CSCI 347 / CS 4206: Data Mining Module 05: WEKA Topic 01: WEKA Navigation.
 The Weka The Weka is an well known bird of New Zealand..  W(aikato) E(nvironment) for K(nowlegde) A(nalysis)  Developed by the University of Waikato.
Contributed by Yizhou Sun 2008 An Introduction to WEKA.
Department of Computer Science, University of Waikato, New Zealand Geoff Holmes WEKA project and team Data Mining process Data format Preprocessing Classification.
WEKA – Knowledge Flow & Simple CLI
WEKA - Explorer (sumber: WEKA Explorer user Guide for Version 3-5-5)
WEKA and Machine Learning Algorithms. Algorithm Types Classification (supervised) Given -> A set of classified examples “instances” Produce -> A way of.
Appendix: The WEKA Data Mining Software
In part from: Yizhou Sun 2008 An Introduction to WEKA Explorer.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 2 Welcome Application Introducing the Visual Basic 2008 Express Edition IDE.
Department of Computer Science, University of Waikato, New Zealand Bernhard Pfahringer (based on material by Eibe Frank, Mark Hall, and Peter Reutemann)
2. Introduction to the Visual Studio.NET IDE. Chapter Outline Overview of the Visual Studio.NET IDE Overview of the Visual Studio.NET IDE Menu Bar and.
Hands-on predictive models and machine learning for software Foutse Khomh, Queen’s University Segla Kpodjedo, École Polytechnique de Montreal PASED - Canadian.
Department of Computer Science, University of Waikato, New Zealand Eibe Frank WEKA: A Machine Learning Toolkit The Explorer Classification and Regression.
An Introduction to Designing and Executing Workflows with Taverna Aleksandra Pawlik materials by: Katy Wolstencroft University of Manchester.
Machine Learning with Weka Cornelia Caragea Thanks to Eibe Frank for some of the slides.
Weka: Experimenter and Knowledge Flow interfaces Neil Mac Parthaláin
For ITCS 6265/8265 Fall 2009 TA: Fei Xu UNC Charlotte.
W E K A Waikato Environment for Knowledge Analysis Branko Kavšek MPŠ Jožef StefanNovember 2005.
1 1 Slide Using Weka. 2 2 Slide Data Mining Using Weka n What’s Data Mining? We are overwhelmed with data We are overwhelmed with data Data mining is.
Department of Computer Science, University of Waikato, New Zealand Eibe Frank WEKA: A Machine Learning Toolkit The Explorer Classification and Regression.
Weka – A Machine Learning Toolkit October 2, 2008 Keum-Sung Hwang.
Introduction to Weka Xingquan (Hill) Zhu Slides copied from Jeffrey Junfeng Pan (UST)
 A collection of open source ML algorithms ◦ pre-processing ◦ classifiers ◦ clustering ◦ association rule  Created by researchers at the University.
W E K A Waikato Environment for Knowledge Aquisition.
***Classification Model*** Hosam Al-Samarraie, PhD. CITM-USM.
Weka Tutorial. WEKA:: Introduction A collection of open source ML algorithms – pre-processing – classifiers – clustering – association rule Created by.
Weka. Weka A Java-based machine vlearning tool Implements numerous classifiers and other ML algorithms Uses a common.
Machine Learning with WEKA - Yohan Chin. WEKA ? Waikato Environment for Knowledge Analysis A Collection of Machine Learning algorithms for data tasks.
WEKA's Knowledge Flow Interface Data Mining Knowledge Discovery in Databases ELIE TCHEIMEGNI Department of Computer Science Bowie State University, MD.
In part from: Yizhou Sun 2008 An Introduction to WEKA Explorer.
@relation age sex { female, chest_pain_type { typ_angina, asympt, non_anginal,
WEKA: A Practical Machine Learning Tool WEKA : A Practical Machine Learning Tool.
Department of Computer Science, University of Waikato, New Zealand Eibe Frank WEKA: A Machine Learning Toolkit The Explorer Classification and Regression.
Dive Into® Visual Basic 2010 Express
An Introduction to WEKA
Machine Learning: Decision Trees in AIMA and WEKA
An Introduction to WEKA
Machine Learning: Decision Trees in AIMA and WEKA
Machine Learning with WEKA
Waikato Environment for Knowledge Analysis
WEKA.
Sampath Jayarathna Cal Poly Pomona
An Introduction to WEKA
Machine Learning with WEKA
Machine Learning with WEKA
Weka Package Weka package is open source data mining software written in Java. Weka can be applied to your dataset from the GUI, the command line or called.
Machine Learning with Weka
An Introduction to WEKA
Tutorial for WEKA Heejun Kim June 19, 2018.
Machine Learning with Weka
Lecture 10 – Introduction to Weka
Assignment 1: Classification by K Nearest Neighbors (KNN) technique
Copyright: Martin Kramer
Machine Learning: Decision Trees in AIMA and WEKA
Neural Networks Weka Lab
Data Mining CSCI 307, Spring 2019 Lecture 7
Data Mining CSCI 307, Spring 2019 Lecture 8
Presentation transcript:

Machine Learning with WEKA

Copyright: Martin Kramer (mkramer@wxs.nl) WEKA: the bird Copyright: Martin Kramer (mkramer@wxs.nl) 4/4/2019 University of Waikato

WEKA: the software Machine learning/data mining software written in Java (distributed under the GNU Public License) Used for research, education, and applications Complements “Data Mining” by Witten & Frank Main features: Comprehensive set of data pre-processing tools, learning algorithms and evaluation methods Graphical user interfaces (incl. data visualization) Environment for comparing learning algorithms 4/4/2019 University of Waikato

WEKA: versions There are several versions of WEKA: WEKA 3.0: “book version” compatible with description in data mining book WEKA 3.2: “GUI version” adds graphical user interfaces (book version is command-line only) WEKA 3.3: “development version” with lots of improvements This talk is based on the latest snapshot of WEKA 3.3 (soon to be WEKA 3.4) These slides are old: we are using a newer version 4/4/2019 University of Waikato

Weka Documentation You can go to the main Weka page and then click on documentation and then download the full manual for 3.8.3 https://www.cs.waikato.ac.nz/ml/weka/documentation.html 4/4/2019 University of Waikato

WEKA only deals with “flat” files @relation heart-disease-simplified @attribute age numeric @attribute sex { female, male} @attribute chest_pain_type { typ_angina, asympt, non_anginal, atyp_angina} @attribute cholesterol numeric @attribute exercise_induced_angina { no, yes} @attribute class { present, not_present} @data 63,male,typ_angina,233,no,not_present 67,male,asympt,286,yes,present 67,male,asympt,229,yes,present 38,female,non_anginal,?,no,not_present ... Flat file in ARFF format 4/4/2019 University of Waikato

WEKA only deals with “flat” files @relation heart-disease-simplified @attribute age numeric @attribute sex { female, male} @attribute chest_pain_type { typ_angina, asympt, non_anginal, atyp_angina} @attribute cholesterol numeric @attribute exercise_induced_angina { no, yes} @attribute class { present, not_present} @data 63,male,typ_angina,233,no,not_present 67,male,asympt,286,yes,present 67,male,asympt,229,yes,present 38,female,non_anginal,?,no,not_present ... numeric attribute nominal attribute 4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

Explorer: pre-processing the data Data can be imported from a file in various formats: ARFF, CSV, C4.5, binary Data can also be read from a URL or from an SQL database (using JDBC) Pre-processing tools in WEKA are called “filters” WEKA contains filters for: Discretization, normalization, resampling, attribute selection, transforming and combining attributes, … 4/4/2019 University of Waikato

4/4/2019 University of Waikato

Reading in the Iris Dataset The tutorial accesses a local copy of the iris dataset via the open file tab We will download it from the internet Select open url instead of open file. Then enter: https://storm.cis.fordham.edu/~gweiss/data-mining/weka-data/iris.arff There are other datasets in the same directory They are listed at: https://storm.cis.fordham.edu/~gweiss/data-mining/datasets.html 4/4/2019 University of Waikato

Non-Arff File Types By default WEKA expects files to be in ARFF format If you select the “Open File” option, you will see that you can change the file type to other file types C4.5 (this is for files set up for the old C4.5 decision tree learner format .csv files You can read in data from .csv files. 4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

Explorer: building “classifiers” Classifiers in WEKA are models for predicting nominal or numeric quantities Implemented learning schemes include: Decision trees and lists, instance-based classifiers, support vector machines, multi-layer perceptrons, logistic regression, Bayes’ nets, … “Meta”-classifiers include: Bagging, boosting, stacking, error-correcting output codes, locally weighted learning, … 4/4/2019 University of Waikato

Lets start fresh without discretization Go back to the preprocess tab and reopen the iris data set and then lets use that. Do it now. 4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

Right click on this 4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

In our version of WEKA called MultilayerPerceptron– this is the same thing as a Neural Network. It is still found under functions. 4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

4/4/2019 University of Waikato

Now Try the KnowledgeFlow Interface Will build a flow to do crossvalidated J48 This example is from the WEKA manual for 3.8.3 under the KnowledgeFlow section and then is the first example From the console choose KnowlegeFlow interface 4/4/2019 University of Waikato

Add a DataSources Node Expand the DataSources entry in the Design panel and click on ArffLoader (the mouse pointer will change to a cross hairs). Next place the ArffLoader step on the layout area by clicking somewhere on the layout (a copy of ArffLoader icon will appear). Next specify an ARFF file to load by first right clicking the mouse over the ArffLoader icon on the layout. A pop-up menu will appear. Select Configure under Edit in the list from this menu and browse to the location of your ARFF file. May need to copy an arff file to the PC unless there are data files already loaded under the data folder 4/4/2019 University of Waikato

Adding ClassAssigner to specify class Next click expand the Evaluation entry in the Design panel and choose the ClassAssigner (allows you to choose which column to be the class) step from the toolbar. Place this on the layout. Now connect the ArffLoader to the ClassAssigner: first right click over the ArffLoader and select dataSet under Connections in the menu. A rubber band line will appear. Move the mouse over the ClassAssigner step and left click - a red line labeled dataSet will connect the two steps. Next right click over the ClassAssigner and choose Configure from the menu. This will pop up a window from which you can specify which column is the class in your data (last is the default). 4/4/2019 University of Waikato

Add CrossValidationFoldMaker Next grab a CrossValidationFoldMaker step from the Evaluation entry in the Design panel and place it on the layout. Connect the ClassAssigner to the CrossValidationFoldMaker by right clicking over ClassAssigner and selecting dataSet from under Connections in the menu. 4/4/2019 University of Waikato

Add J48 Next expand the Classifiers entry and then the trees sub-entry in the Design panel and choose the J48 step. Place a J48 step on the layout. • Connect the CrossValidationFoldMaker to J48 TWICE by first choosing trainingSet and then testSet from the pop-up menu for the CrossValidationFoldMaker. 4/4/2019 University of Waikato

Finish the Flow Next go back to the Evaluation entry and place a ClassifierPerformanceEvaluator step on the layout. Connect J48 to this step by selecting the batchClassifier entry from the pop-up menu for J48. Next go to the Visualization entry and place a TextViewer step on the layout. Connect the ClassifierPerformanceEvaluator to the TextViewer by selecting the text entry from the pop-up menu for ClassifierPerformanceEvaluator. Now start the flow executing by pressing the play button on the toolbar at the top of the window. Progress information for each step in the flow will appear in the Status area and Log at the bottom of the window. When finished you can view the results by choosing Show results from the pop-up menu for the TextViewer step. 4/4/2019 University of Waikato

Seeing the Results for Each Fold Connect a TextViewer and/or a GraphViewer to J48 in order to view the textual or graphical representations of the trees produced for each fold of the cross validation (this is something that is not possible in the Explorer). 4/4/2019 University of Waikato