WEKA: A Useful Tool for Air Quality Forecasting


Published on

1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

WEKA: A Useful Tool for Air Quality Forecasting

  1. 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. 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. 3. Machine Learning <ul><li>Machine learning is a subfield of artificial intelligence (AI) concerned with the development of algorithms and techniques that allow computers to &quot;learn&quot;. </li></ul><ul><li>The machine learning algorithms in Weka include, among others, linear regression, classification trees, clustering and artificial neural networks (ANN). </li></ul>
  4. 4. Weka Can Be A Useful Tool <ul><li>Weka has the potential to be a useful tool to support local air quality forecasting efforts – particularly those operating on a limited budget. </li></ul><ul><ul><li>Weka is open source (free) software - although the purchase of the associated text book is strongly recommended. </li></ul></ul><ul><ul><li>Weka is easily installed on standard PC's but can also run on Linux and other platforms. </li></ul></ul><ul><ul><li>Only minimal modifications are necessary to prepare data files for use in Weka. </li></ul></ul><ul><ul><li>The user interface is simple and intuitive. </li></ul></ul>
  5. 5. Weka and PM 2.5 Forecasting <ul><li>Of particular interest to air quality forecasters is the wide range of algorithms included in Weka. </li></ul><ul><li>These algorithms may be useful to address shortcomings in statistical forecast guidance for fine particulate matter (PM 2.5 ). </li></ul><ul><li>Simple linear regression methods provide reasonable skill for O 3 forecasting, due to the very strong and nearly linear ozone-temperature relationship, but linear regression methods have shown limited skill in forecasting PM 2.5 . </li></ul>
  6. 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 .
  7. 7. Weka: Information http://www.cs.waikato.ac.nz/ml/weka/
  8. 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. 9. aarf Format aarf format is simple anyway: ASCII file List of variable and type Then data follows, comma separated Missing data marked as “?”
  10. 10. Data Editing Data can be easily edited within Weka itself
  11. 11. Analyzing Data Variables can be easily scanned with basic statistics and histograms provided by Weka
  12. 12. Quick Analysis Tools
  13. 13. Sampling and Test Data Set Options
  14. 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. 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. 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. 17. CART Options <ul><li>A number of options </li></ul><ul><li>are available to </li></ul><ul><li>fine tune the CART </li></ul><ul><li>Analysis: </li></ul><ul><li>Minimum # of cases </li></ul><ul><li>per node </li></ul><ul><li>Types of pruning: e.g., </li></ul><ul><li>sub-tree raising </li></ul><ul><li>Confidence values for </li></ul><ul><li>splitting nodes </li></ul>
  18. 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.
  19. 19. CART Visualization
  20. 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. 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.
  22. 22. Artificial Neural Networks – Pros/Cons <ul><li>Pro: ANN’s are a powerful technique utilized across scientific disciplines. </li></ul><ul><li>Pro: Theoretically well suited to non-linear processes like air quality. </li></ul><ul><li>Con: Not transparent to users. Hard to integrate into forecast thinking. </li></ul><ul><li>Con: Technically difficult to understand, raises risk of misuse. </li></ul>
  23. 23. Example: Neural Network Structure www.doc.ic.ac.uk/~sgc/teaching/v231/
  24. 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”)
  25. 25. Conclusions <ul><li>Weka is a low-cost forecasting tool that has the potential to be a useful for air quality forecasting – particularly in situations where non-linear effects dominate. </li></ul><ul><li>Some Weka modules are not fully developed for forecast algorithm development. </li></ul><ul><li>Patience, use of textbook and Weka listserv are required to get the most out of the program. </li></ul>
  26. 26. URLs of Interest <ul><li>Weka: </li></ul><ul><ul><li>http://www.cs.waikato.ac.nz/ml/weka </li></ul></ul><ul><li>Mailing List: </li></ul><ul><ul><li>https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist </li></ul></ul><ul><li>Mailing List Archives </li></ul><ul><ul><li>https:// list.scms.waikato.ac.nz/mailman/htdig/wekalist / </li></ul></ul><ul><li>Informal FAQ: </li></ul><ul><ul><li>http://www.public.asu.edu/~sksinghi/weka-faq.html </li></ul></ul>
  27. 27. Acknowledgements <ul><li>The Delaware Valley Regional Planning Commission (DVRPC) – Mike Boyer and Sean Greene – and the member states (PA, DE and NJ) for supporting air quality forecast development. </li></ul><ul><li>Dr. George Young of Penn State for his advice, patience and teaching skill. </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.