Use bracket notation to query results in hyperopt

This commit is contained in:
Matthias
2020-06-07 15:13:59 +02:00
parent 0f373e6bb9
commit 68395d2745
3 changed files with 5 additions and 5 deletions

View File

@@ -34,5 +34,5 @@ class OnlyProfitHyperOptLoss(IHyperOptLoss):
"""
Objective function, returns smaller number for better results.
"""
total_profit = results.profit_percent.sum()
total_profit = results['profit_percent'].sum()
return 1 - total_profit / EXPECTED_MAX_PROFIT