Presentation is loading. Please wait.

Presentation is loading. Please wait.

Department of Computer Science, University of Waikato, New Zealand Bernhard Pfahringer (based on material by Eibe Frank, Mark Hall, and Peter Reutemann)

Similar presentations


Presentation on theme: "Department of Computer Science, University of Waikato, New Zealand Bernhard Pfahringer (based on material by Eibe Frank, Mark Hall, and Peter Reutemann)"— Presentation transcript:

1 Department of Computer Science, University of Waikato, New Zealand Bernhard Pfahringer (based on material by Eibe Frank, Mark Hall, and Peter Reutemann) WEKA: A Machine Learning Toolkit The Explorer Classification and Regression Clustering Association Rules Attribute Selection Data Visualization The Experimenter The Knowledge Flow GUI Other Utilities Conclusions Machine Learning with WEKA

2 10/5/2015University of Waikato2 WEKA: the bird Copyright: Martin Kramer (mkramer@wxs.nl) The Weka or woodhen (Gallirallus australis) is an endemic bird of New Zealand. (Source: WikiPedia)

3 10/5/2015University of Waikato3 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 10/5/2015University of Waikato4 History Project funded by the NZ government since 1993  Develop state-of-the art workbench of data mining tools  Explore fielded applications  Develop new fundamental methods

5 10/5/2015University of Waikato5 History (2) Late 1992 - funding was applied for by Ian Witten 1993 - development of the interface and infrastructure  W EKA acronym coined by Geoff Holmes  W EKA ’s file format “ARFF” was created by Andrew Donkin ARFF ARFF was rumored to stand for Andrew’s Ridiculous File Format Sometime in 1994 - first internal release of W EKA  TCL/TK user interface + learning algorithms written mostly in C  Very much beta software  Changes for the b1 release included (among others): “Ambiguous and Unsupported menu commands removed.” “Crashing processes handled (in most cases :-)” October 1996 - first public release: W EKA 2.1

6 10/5/2015University of Waikato6 History (3) July 1997 - W EKA 2.2  Schemes: 1R, T2, K*, M5, M5Class, IB1-4, FOIL, PEBLS, support for C5  Included a facility (based on Unix makefiles) for configuring and running large scale experiments Early 1997 - decision was made to rewrite W EKA in Java  Originated from code written by Eibe Frank for his PhD JAWS  Originally codenamed JAWS (JAva Weka System) May 1998 - W EKA 2.3  Last release of the TCL/TK-based system Mid 1999 - W EKA 3 (100% Java) released  Version to complement the Data Mining book  Development version (including GUI)

7 10/5/2015University of Waikato7 WEKA: versions There are several versions of WEKA:  WEKA 3.4: “book version” compatible with description in data mining book  WEKA 3.5.5: “development version” with lots of improvements This talk is based on a nightly snapshot of WEKA 3.5.5 (12-Feb-2007)

8 10/5/2015University of Waikato8 @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... WEKA only deals with “flat” files

9 10/5/2015University of Waikato9 @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... WEKA only deals with “flat” files

10 10/5/2015University of Waikato10

11 10/5/2015University of Waikato11 java -jar weka.jar

12 10/5/2015University of Waikato12 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, …

13 10/5/2015University of Waikato13

14 10/5/2015University of Waikato14

15 10/5/2015University of Waikato15

16 10/5/2015University of Waikato16

17 10/5/2015University of Waikato17

18 10/5/2015University of Waikato18

19 10/5/2015University of Waikato19

20 10/5/2015University of Waikato20

21 10/5/2015University of Waikato21

22 10/5/2015University of Waikato22

23 10/5/2015University of Waikato23

24 10/5/2015University of Waikato24

25 10/5/2015University of Waikato25

26 10/5/2015University of Waikato26

27 10/5/2015University of Waikato27

28 10/5/2015University of Waikato28

29 10/5/2015University of Waikato29

30 10/5/2015University of Waikato30

31 10/5/2015University of Waikato31

32 10/5/2015University of Waikato32

33 10/5/2015University of Waikato33

34 10/5/2015University of Waikato34 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, …

35 10/5/2015University of Waikato35

36 10/5/2015University of Waikato36

37 10/5/2015University of Waikato37

38 10/5/2015University of Waikato38

39 10/5/2015University of Waikato39

40 10/5/2015University of Waikato40

41 10/5/2015University of Waikato41

42 10/5/2015University of Waikato42

43 10/5/2015University of Waikato43

44 10/5/2015University of Waikato44

45 10/5/2015University of Waikato45

46 10/5/2015University of Waikato46

47 10/5/2015University of Waikato47

48 10/5/2015University of Waikato48

49 10/5/2015University of Waikato49

50 10/5/2015University of Waikato50

51 10/5/2015University of Waikato51

52 10/5/2015University of Waikato52

53 10/5/2015University of Waikato53

54 10/5/2015University of Waikato54

55 10/5/2015University of Waikato55

56 10/5/2015University of Waikato56

57 10/5/2015University of Waikato57

58 10/5/2015University of Waikato58

59 10/5/2015University of Waikato59

60 10/5/2015University of Waikato60

61 10/5/2015University of Waikato61

62 10/5/2015University of Waikato62

63 10/5/2015University of Waikato63

64 10/5/2015University of Waikato64

65 10/5/2015University of Waikato65

66 10/5/2015University of Waikato66

67 10/5/2015University of Waikato67

68 10/5/2015University of Waikato68

69 10/5/2015University of Waikato69

70 10/5/2015University of Waikato70

71 10/5/2015University of Waikato71

72 10/5/2015University of Waikato72

73 10/5/2015University of Waikato73

74 10/5/2015University of Waikato74

75 10/5/2015University of Waikato75

76 10/5/2015University of Waikato76

77 10/5/2015University of Waikato77

78 10/5/2015University of Waikato78

79 10/5/2015University of Waikato79

80 10/5/2015University of Waikato80

81 10/5/2015University of Waikato81

82 10/5/2015University of Waikato82

83 10/5/2015University of Waikato83

84 10/5/2015University of Waikato84

85 10/5/2015University of Waikato85

86 10/5/2015University of Waikato86

87 10/5/2015University of Waikato87

88 10/5/2015University of Waikato88

89 10/5/2015University of Waikato89

90 10/5/2015University of Waikato90 Explorer: clustering data WEKA contains “clusterers” for finding groups of similar instances in a dataset Some implemented schemes are:  k-Means, EM, Cobweb, X-means, FarthestFirst Clusters can be visualized and compared to “true” clusters (if given) Evaluation based on loglikelihood if clustering scheme produces a probability distribution

91 10/5/2015University of Waikato91

92 10/5/2015University of Waikato92

93 10/5/2015University of Waikato93

94 10/5/2015University of Waikato94

95 10/5/2015University of Waikato95

96 10/5/2015University of Waikato96

97 10/5/2015University of Waikato97

98 10/5/2015University of Waikato98

99 10/5/2015University of Waikato99

100 10/5/2015University of Waikato100 Explorer: finding associations WEKA contains the Apriori algorithm (among others) for learning association rules  Works only with discrete data Can identify statistical dependencies between groups of attributes:  milk, butter  bread, eggs (with confidence 0.9 and support 2000) Apriori can compute all rules that have a given minimum support and exceed a given confidence

101 10/5/2015University of Waikato101

102 10/5/2015University of Waikato102

103 10/5/2015University of Waikato103

104 10/5/2015University of Waikato104 Explorer: attribute selection Panel that can be used to investigate which (subsets of) attributes are the most predictive ones Attribute selection methods contain two parts:  A search method: best-first, forward selection, random, exhaustive, genetic algorithm, ranking  An evaluation method: correlation-based, wrapper, information gain, chi-squared, … Very flexible: WEKA allows (almost) arbitrary combinations of these two

105 10/5/2015University of Waikato105

106 10/5/2015University of Waikato106

107 10/5/2015University of Waikato107

108 10/5/2015University of Waikato108

109 10/5/2015University of Waikato109

110 10/5/2015University of Waikato110

111 10/5/2015University of Waikato111 Explorer: data visualization Visualization very useful in practice: e.g. helps to determine difficulty of the learning problem WEKA can visualize single attributes (1-d) and pairs of attributes (2-d)  To do: rotating 3-d visualizations (Xgobi-style) Color-coded class values “Jitter” option to deal with nominal attributes (and to detect “hidden” data points) “Zoom-in” function

112 10/5/2015University of Waikato112

113 10/5/2015University of Waikato113

114 10/5/2015University of Waikato114

115 10/5/2015University of Waikato115

116 10/5/2015University of Waikato116

117 10/5/2015University of Waikato117

118 10/5/2015University of Waikato118

119 10/5/2015University of Waikato119

120 10/5/2015University of Waikato120

121 10/5/2015University of Waikato121

122 10/5/2015University of Waikato122 Performing experiments Experimenter makes it easy to compare the performance of different learning schemes For classification and regression problems Results can be written into file or database Evaluation options: cross-validation, learning curve, hold-out Can also iterate over different parameter settings Significance-testing built in!

123 10/5/2015University of Waikato123

124 10/5/2015University of Waikato124

125 10/5/2015University of Waikato125

126 10/5/2015University of Waikato126

127 10/5/2015University of Waikato127

128 10/5/2015University of Waikato128

129 10/5/2015University of Waikato129

130 10/5/2015University of Waikato130

131 10/5/2015University of Waikato131

132 10/5/2015University of Waikato132

133 10/5/2015University of Waikato133 The Knowledge Flow GUI Java-Beans-based interface for setting up and running machine learning experiments Data sources, classifiers, etc. are beans and can be connected graphically Data “flows” through components: e.g., “data source” -> “filter” -> “classifier” -> “evaluator” Layouts can be saved and loaded again later cf. Clementine ™

134 10/5/2015University of Waikato134

135 10/5/2015University of Waikato135

136 10/5/2015University of Waikato136

137 10/5/2015University of Waikato137

138 10/5/2015University of Waikato138

139 10/5/2015University of Waikato139

140 10/5/2015University of Waikato140

141 10/5/2015University of Waikato141

142 10/5/2015University of Waikato142

143 10/5/2015University of Waikato143

144 10/5/2015University of Waikato144

145 10/5/2015University of Waikato145

146 10/5/2015University of Waikato146

147 10/5/2015University of Waikato147

148 10/5/2015University of Waikato148

149 10/5/2015University of Waikato149 Sourceforge.net – Downloads

150 10/5/2015University of Waikato150 Sourceforge.net – Web Traffic WekaWikiWekaWiki launched – 05/2005 WekaDocWekaDoc Wiki introduced – 12/2005

151 10/5/2015University of Waikato151 Projects based on W EKA 45 projects currently (30/01/07) listed on the WekaWikiWekaWiki Incorporate/wrap W EKA  GRB Tool Shed - a tool to aid gamma ray burst research  YALE - facility for large scale ML experiments  GATE - NLP workbench with a W EKA interface  Judge - document clustering and classification  RWeka - an R interface to Weka Extend/modify W EKA  BioWeka - extension library for knowledge discovery in biology  WekaMetal - meta learning extension to W EKA  Weka-Parallel - parallel processing for W EKA  Grid Weka - grid computing using W EKA  Weka-CG - computational genetics tool library

152 10/5/2015University of Waikato152 W EKA and P ENTAHO Pentaho – The leader in Open Source Business Intelligence (BI) Pentaho September 2006 – Pentaho acquires the Weka project (exclusive license and SF.net page)acquires Weka will be used/integrated as data mining component in their BI suite Weka will be still available as GPL open source software Most likely to evolve 2 editions:  Community edition  BI oriented edition

153 10/5/2015University of Waikato153 Limitations of W EKA Traditional algorithms need to have all data in main memory ==> big datasets are an issue Solution:  Incremental schemes  Stream algorithms MOA MOA “Massive Online Analysis” (not only a flightless bird, but also extinct!)

154 10/5/2015University of Waikato154 Conclusion: try it yourself! WEKA is available at http://www.cs.waikato.ac.nz/ml/weka  Also has a list of projects based on WEKA  (probably incomplete list of) WEKA contributors: Abdelaziz Mahoui, Alexander K. Seewald, Ashraf M. Kibriya, Bernhard Pfahringer, Brent Martin, Peter Flach, Eibe Frank, Gabi Schmidberger, Ian H. Witten, J. Lindgren, Janice Boughton, Jason Wells, Len Trigg, Lucio de Souza Coelho, Malcolm Ware, Mark Hall, Remco Bouckaert, Richard Kirkby, Shane Butler, Shane Legg, Stuart Inglis, Sylvain Roy, Tony Voyle, Xin Xu, Yong Wang, Zhihai Wang


Download ppt "Department of Computer Science, University of Waikato, New Zealand Bernhard Pfahringer (based on material by Eibe Frank, Mark Hall, and Peter Reutemann)"

Similar presentations


Ads by Google