2

In an evolutionary programming project I'm working on I thought it could be a useful idea to use the formula in Bayes' theorem. Although I'm not totally sure what that would look like.

So the programs that are evolving are attempting to predict the future state of a time series using past data. Given some price data for the past n days the program will predict either buy if it predicts the price will rise, sell if fall, leave if there is too little movement.

From my understanding, I work out the probability of the model being accurate with regards to buying with the following algorithm after testing it on the historical data and recording correct and incorrect predictions.

prob-b-given-a = correct-buy-predictions / total
prob-a = actual-buy-count / total
prob-b = prediction-buy-count / total

prob-a-given-b = (prob-b-given-a * prob-a) / prob-b
fitness = prob-a-given-b  //last step for clarification

Am I interpreting Bayes' theorem correctly and is this a suitable fitness function?

How would I combine the fitness function for all predictions? (in my example I only show the predictive probability of the buy prediction)

HedgepigMatt
  • 190
  • 2
  • 14

0 Answers0