mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
change the mechanism of traceback and action choosing (#320)
This commit is contained in:
@@ -91,8 +91,8 @@ class KGHypothesisGen(ModelHypothesisGen):
|
||||
self.reward_estimates = {
|
||||
"Feature engineering": 0.0,
|
||||
"Feature processing": 0.0,
|
||||
"Model feature selection": 0.0,
|
||||
"Model tuning": 0.5,
|
||||
"Model feature selection": 0.2,
|
||||
"Model tuning": 1.0,
|
||||
}
|
||||
self.confidence_parameter = 1.0
|
||||
self.initial_performance = 0.0
|
||||
@@ -192,7 +192,7 @@ class KGHypothesisGen(ModelHypothesisGen):
|
||||
else:
|
||||
performance_t_minus_1 = self.initial_performance
|
||||
|
||||
reward = performance_t_minus_1 - performance_t
|
||||
reward = (performance_t - performance_t_minus_1) / performance_t_minus_1
|
||||
n_o = self.action_counts[last_action]
|
||||
mu_o = self.reward_estimates[last_action]
|
||||
self.reward_estimates[last_action] += (reward - mu_o) / n_o
|
||||
|
||||
@@ -117,7 +117,7 @@ class LoopBase:
|
||||
continue
|
||||
except CoderError as e:
|
||||
logger.warning(f"Traceback loop {li} due to {e}")
|
||||
self.step_idx -= 1
|
||||
self.step_idx = 0
|
||||
continue
|
||||
|
||||
end = datetime.datetime.now(datetime.timezone.utc)
|
||||
|
||||
Reference in New Issue
Block a user