The MathThe model structure is a multi-layer perceptron, the simplest form of a feed-forward neural network. Because the neural net was coded in Rustlang, it was coded from scratch. The linear algebra for the neural net is the same as a normal multi-layer perceptron with an input layer, a middle layer, and an output layer. Each layer is made up of simulated neurons, which use an activation function and weighted sum to simulate the 'action potential' firing of their organic counterparts. The activation function for each layer of the network is different. The first layer uses a hyperbolic tangent as the activation function, the second uses a logistic function, and the third uses a 'step function' to consolidate the values into a 1/0 output. The outputs of each layer's activation function become the inputs of the next layer and are hence forward propagated to generate an output. This output is then compared to an inputted expected output. The difference between the expected and actual output is then used to adjust the weights of each neuron, so it fires more accurately. | The DataThe data is based on Australian weather readings, so the prediction is valid for that geographic area alone. A lot of imputation was done on the data during preprocessing. Note that the dataset is imbalanced so the trained model is biased towards predicting it will not rain tomorrow. This is because the model is aMulti-Layer Perceptron trained on a relatively small amount of data. With more data, this bias could be trained out of the model, however, only 15,000 rows of data were used to train the model. If there were around 100,000 rows of data, then the model would be more accurate. With 15,000 rows, there are some techniques that could have been used to remove this bias, but it runs the risk of biasing the model towards the raining condition, due to the small amount of data. The reason an MLP was used as opposed to a Logistic Regression Model or Bayesian network is because this is a proof of concept for hosting prediction models using the blockchain. |
---|