ViktorWase / Frank-the-Science-Bot

Frank is a bot that does science. He takes a dataset and forms hypothesises about mathematical constants (aka conservation laws) of the data. He then tests the hypothesis.
Apache License 2.0
2 stars 0 forks source link

Fitness-funktion #19

Open johnbrynte opened 8 years ago

ViktorWase commented 8 years ago

Exempelkod:

    error = 0
    for obj in database.datapoints:
        tmp = self.function(obj.attributes)
        error += tmp*tmp
    #Make sure it doesn't find conservation laws such as x-x=0.
    tmp = howMuchOfATautologyItIs(database, self)
    error += c1*tmp*tmp