MilesCranmer commited on
Commit
ea6850d
1 Parent(s): 47712b5

Fix printing of equations to ignore size

Browse files
Files changed (1) hide show
  1. eureqa.jl +4 -3
eureqa.jl CHANGED
@@ -770,11 +770,12 @@ function fullRun(niterations::Integer;
770
  for size=1:actualMaxsize
771
  if hallOfFame.exists[size]
772
  member = hallOfFame.members[size]
773
- numberSmallerAndBetter = sum([member.score > hallOfFame.members[i].score for i=1:(size-1)])
 
774
  betterThanAllSmaller = (numberSmallerAndBetter == 0)
775
  if betterThanAllSmaller
776
- debug(verbosity, "$size \t $(member.score-parsimony*size) \t $(stringTree(member.tree))")
777
- println(io, "$size|$(member.score-parsimony*size)|$(stringTree(member.tree))")
778
  push!(dominating, member)
779
  end
780
  end
 
770
  for size=1:actualMaxsize
771
  if hallOfFame.exists[size]
772
  member = hallOfFame.members[size]
773
+ curMSE = MSE(evalTreeArray(member.tree), y)
774
+ numberSmallerAndBetter = sum([curMSE > MSE(evalTreeArray(hallOfFame.members[i].tree), y) for i=1:(size-1)])
775
  betterThanAllSmaller = (numberSmallerAndBetter == 0)
776
  if betterThanAllSmaller
777
+ debug(verbosity, "$size \t $(curMSE) \t $(stringTree(member.tree))")
778
+ println(io, "$size|$(curMSE)|$(stringTree(member.tree))")
779
  push!(dominating, member)
780
  end
781
  end