/* Logistic function Data from http://data.princeton.edu/eco572/relationalLogit.html The logistic formula is defined as: 1.0/(1.0+exp(-x)); * Approx 0.1 +,-,*,/,logistic [program = (logistic(A + 5.661984475172117) * logistic(6.803754343094191) / (A + 6.803754343094191) + A) / (A / (logistic(B) * B)),res = 0.824515619186605,count = 1] * Approx 0.01 +,-,*,/,exp (stopped manually) gen = 62548 (time: 11693.860s) results_best = [[0.034227830884697,B * B / (B + B) * exp(exp(5.661984475172117 * B + -6.048972614132321))]] * Without logistic/1 Approx 0.01 stop_criteria=generations num_gens=1800 gen = 1338 (time: 84.975s) results_best = [[0.364607114474557,exp(lx / (5.36459189623808 - 1.079399115908611 + -3.29554488570222)) * (lx * (5.661984475172117 - 5.36459189623808))]] gen = 1451 (time: 93.364s) results_best = [[0.359547629962018,(1.079399115908611 + 5.661984475172117) / exp(5.661984475172117 / exp(lx))]] gen = 1799 (time: 120.853s) results_best = [[0.251078125668164,(lx + exp(-4.444505783936244)) / (lx * -2.112341463618139 - -3.29554488570222)]] Cf logit_formula.conf */ data(logit_formula,Data,Vars,Unknown,Ops,Constants,MaxSize,Params) :- Data = [ [[1,0.9641],0.8499], [[5,0.9409],0.7691], [[10,0.9366],0.7502], [[15,0.9343],0.7362], [[20,0.9227],0.7130], [[25,0.9108],0.6826], [[30,0.8981],0.6525], [[35,0.8843],0.6223], [[40,0.8655],0.5898], [[45,0.8424],0.5534], [[50,0.8045],0.5106], [[55,0.7584],0.4590], [[60,0.6967],0.3965], [[65,0.6028],0.3221], [[70,0.4770],0.2380], [[75,0.3451],0.1521] ], Unknown = [30,0.8981], Vars = ['age','lx'], % Ops = [+,-,*,/,logistic], Ops = [+,-,*,/,exp], % can we recover the formula? Constants = [frand(-10,10) : _ in 1..10], MaxSize = 11, Params = new_map([approx=0.01, init_size=1000, show_best=1, stop_criteria=generations, num_gens=1800 ]).