1. Weka: A Useful Tool for Air Quality Forecasting William F. Ryan Department of Meteorology The Pennsylvania State University [email_address] 2007 National Air Quality Conference, Orlando
2. Weka The weka, or woodhen, is a bird native to New Zealand. Weka is also the name of a suite of machine learning software tools, written in Java, and developed at the University of Wiakato in New Zealand. http://www.cs.waikato.ac.nz/ml/weka
3.
4.
5.
6. PM 2.5 Forecasting O 3 (left panel) is well-behaved statistically. Distribution is near normal with a strong association with maximum temperature. As a result, linear techniques are useful. PM 2.5 (right panel) is not well- behaved. Distribution is skewed, no strong association with any particular weather variable. Tools included in Weka, including ANN and classification and regression trees (CART), are capable of addressing non-linear problems posed by PM 2.5 .
8. Input File Format Weka uses its own file format called: *.aarf All you need to do though is provide a *.csv file with variable names in the first line and Weka will convert
9. aarf Format aarf format is simple anyway: ASCII file List of variable and type Then data follows, comma separated Missing data marked as “?”
14. Functions Available WEKA includes a number of different techniques that can be useful for forecast development. These include: Linear and logistic regression Perceptron models (Neural networks)
15. Linear Regression Unfortunately, the “work horse” linear regression module in Weka is limited in usefulness: -No automatic stepwise function -Poor diagnostics Compare: SYSTAT, Minitab
16. Classification and Regression Trees (CART) A variety of classification algorithms are available. Standard algorithm is J48, which is a souped up version of the last free version of CART (Version 4.5) Commercial version is currently 5.0.
17.
18. CART Diagnostics CART is notorious for using CPU resources but the WEKA version runs efficiently on my standard PC. Diagnostics are better for CART than linear regression. Example on left is of a 4 category PM 2.5 CART forecast.
20. Artificial Neural Networks (ANN) “ Linear Regression by a mob” Produces forecast by taking the weighted sum of predictors and then layering the process.
21. Artificial Neural Networks - Summary Known samples (historical data) are used to “train” the network. Input data (x i ) are assigned weights (w i ) and combined in the “hidden” layer – like a set of linear regressions. These sets are then combined in additional layers – like regressions of regressions. The sum of data and weights are transformed (“squashed”) to the range of the training data and error is measured. A supervised training algorithm uses output error to adjust network weights to minimize errors.
24. WEKA Neural Networks WEKA provides user control of training parameters: # of iterations or epochs (“training time”) Increment of weight adjustments in back propogation (“learning rate”) Controls on varying changes to increments (“momentum”)