Attempting to obtain the most balanced individual from the Bike dataset throws the following error:
Traceback (most recent call last):
File "C:/Users/Asher (GOD)/Desktop/VUW/SRS/Research/transient-terminal-gp/code/test-script.py", line 59, in
_best, _log = method.evolve(train_data, train_target, dataset.columns.drop([target]), test_data, test_target)
File "C:\Users\Asher (GOD)\Desktop\VUW\SRS\Research\transient-terminal-gp\code\ttgp.py", line 109, in evolve
logbook.record(gen=g, best=toolbox.evaluation(function=hof[0], data=tdata, actual=tlabels), balanced=shared
File "C:\Users\Asher (GOD)\Desktop\VUW\SRS\Research\transient-terminal-gp\code\shared.py", line 182, in getBalancedInd
return pareto[distances.index(np.min(distances))]
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Other datasets do not throw this; this may be due to the presence of individuals with identical fitness in the Pareto front.
Attempting to obtain the most balanced individual from the Bike dataset throws the following error:
Traceback (most recent call last): File "C:/Users/Asher (GOD)/Desktop/VUW/SRS/Research/transient-terminal-gp/code/test-script.py", line 59, in
_best, _log = method.evolve(train_data, train_target, dataset.columns.drop([target]), test_data, test_target)
File "C:\Users\Asher (GOD)\Desktop\VUW\SRS\Research\transient-terminal-gp\code\ttgp.py", line 109, in evolve
logbook.record(gen=g, best=toolbox.evaluation(function=hof[0], data=tdata, actual=tlabels), balanced=shared
File "C:\Users\Asher (GOD)\Desktop\VUW\SRS\Research\transient-terminal-gp\code\shared.py", line 182, in getBalancedInd
return pareto[distances.index(np.min(distances))]
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Other datasets do not throw this; this may be due to the presence of individuals with identical fitness in the Pareto front.