Update hyperopt.py

This commit is contained in:
MoonGem 2018-03-22 23:03:32 -05:00 committed by GitHub
parent 717f4eefcb
commit c6cee3ebe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,11 +33,7 @@ from user_data.hyperopt_conf import hyperopt_optimize_conf
class Testz(): class Testz():
db_name = 'freqtrade_hyperopt' MongoTrials('mongo://127.0.0.1:1234/freqtrade_hyperopt/jobs')
MongoTrials(
arg='mongo://127.0.0.1:1234/{}/jobs'.format(db_name),
exp_key='exp1'
)
async = 'Null' async = 'Null'
attachments = 'Null' attachments = 'Null'
@ -542,10 +538,6 @@ class Hyperopt(Backtesting):
self.total_tries self.total_tries
) )
A = self.generate_optimizer
B = self.hyperopt_space()
C = self.total_tries
def Tests(): def Tests():
best_parameters = fmin( best_parameters = fmin(
fn=self.generate_optimizer, fn=self.generate_optimizer,
@ -556,7 +548,6 @@ class Hyperopt(Backtesting):
) )
# change the Logging format # change the Logging format
self.logging.set_format('\n%(message)s') self.logging.set_format('\n%(message)s')
# best_parameters = Tests(self)
best_parameters = Tests() best_parameters = Tests()
results = sorted(self.trials.results, key=itemgetter('loss')) results = sorted(self.trials.results, key=itemgetter('loss'))
best_result = results[0]['result'] best_result = results[0]['result']