11

I am trying to write a program for weather forecasting using backpropagation. I am a beginner in this field. I have historical data with different parameters like temperature, humidity, wind speed, rainfall etc.

I am confused about how to provide this data to the input layer. Is each input node to be given the whole of the data for a given day, or do I need to have a different network for each parameter? I am also confused about the output layer.

ire_and_curses
  • 68,372
  • 23
  • 116
  • 141
amey
  • 127
  • 1
  • 3

3 Answers3

3

In the input layer have X separate nodes for each dimension (weather, wind, etc) of input data, where X is the number of days to look back to (let's say 4-7). Then you should normalize each input dimension in a suitable range, let's say [-1.0, 1.0].

Have a second "hidden" layer fully interconnected with the first layer (and also with a fix 1.0 input "bias" node to serve as a fix point). There should be less nodes here than in the input layer, but that's just a rule of thumb, you may need to experiment.

The last layer is your output layer fully interconnected with the second layer (and also drop in a bias). Have a separate output neuron for each dimension.

Don't forget to train with the normalized values on both the input and output. Since this is a time series, you may not need to randomize the order of training data but feed them as they come in time - your net will learn the temporal relations also (with luck :)

(Also note that there is a method called "temporal backpropagation" which is tuned for time series data.)

ron
  • 9,262
  • 4
  • 40
  • 73
  • Would it be correct to assume the more related variables included the more accurate? ie using {Temp, Pressure, Humidity}, better than {Rainfall, Windspeed, UV Index} ? – Aaron Gage Feb 11 '11 at 02:13
  • @Aaron: It is always better to use more related variables, however if there is a strong relation, the network might be able to learn using other variables too. Also note that transforming some data might be required (for example to log-scale, etc) for the network to study better. – ron Feb 13 '11 at 20:06
2

It seems to me, that decision trees might be a better solution to this problem than neural networks. Here is a description of how decision trees work. Also, there is software available that has implementations of various classificators including neural networks. I've worked with Weka and it works very well. There are also libraries which you can use to utilize Weka's functionality with programming languages such as Java and C#. If you do decide to work with Weka, make sure you familiarize yourself with the .arff format described here.

brozo
  • 585
  • 2
  • 13
  • 29
  • If you are interested in using Weka, one option might be to try out Knime, an eclipse based workflow package which includes Weka primitives. – Binary Nerd Feb 07 '10 at 18:49
  • I'm curious how you'd apply decisions trees to this problem. – brian Feb 08 '10 at 14:51
2

I have used (and own) this book: Introduction to Neural Networks with Java

I found it a useful reference. It covers quite a spectrum of NN topics, including backpropogation.

Binary Nerd
  • 13,872
  • 4
  • 42
  • 44