Use 3 decimals for ROI space
This commit is contained in:
parent
52c482cecf
commit
ce870bbcf7
@ -140,7 +140,7 @@ class IHyperOpt(ABC):
|
|||||||
'roi_p2': roi_limits['roi_p2_min'],
|
'roi_p2': roi_limits['roi_p2_min'],
|
||||||
'roi_p3': roi_limits['roi_p3_min'],
|
'roi_p3': roi_limits['roi_p3_min'],
|
||||||
}
|
}
|
||||||
logger.info(f"Min roi table: {round_dict(self.generate_roi_table(p), 5)}")
|
logger.info(f"Min roi table: {round_dict(self.generate_roi_table(p), 3)}")
|
||||||
p = {
|
p = {
|
||||||
'roi_t1': roi_limits['roi_t1_max'],
|
'roi_t1': roi_limits['roi_t1_max'],
|
||||||
'roi_t2': roi_limits['roi_t2_max'],
|
'roi_t2': roi_limits['roi_t2_max'],
|
||||||
@ -149,17 +149,17 @@ class IHyperOpt(ABC):
|
|||||||
'roi_p2': roi_limits['roi_p2_max'],
|
'roi_p2': roi_limits['roi_p2_max'],
|
||||||
'roi_p3': roi_limits['roi_p3_max'],
|
'roi_p3': roi_limits['roi_p3_max'],
|
||||||
}
|
}
|
||||||
logger.info(f"Max roi table: {round_dict(self.generate_roi_table(p), 5)}")
|
logger.info(f"Max roi table: {round_dict(self.generate_roi_table(p), 3)}")
|
||||||
|
|
||||||
return [
|
return [
|
||||||
Integer(roi_limits['roi_t1_min'], roi_limits['roi_t1_max'], name='roi_t1'),
|
Integer(roi_limits['roi_t1_min'], roi_limits['roi_t1_max'], name='roi_t1'),
|
||||||
Integer(roi_limits['roi_t2_min'], roi_limits['roi_t2_max'], name='roi_t2'),
|
Integer(roi_limits['roi_t2_min'], roi_limits['roi_t2_max'], name='roi_t2'),
|
||||||
Integer(roi_limits['roi_t3_min'], roi_limits['roi_t3_max'], name='roi_t3'),
|
Integer(roi_limits['roi_t3_min'], roi_limits['roi_t3_max'], name='roi_t3'),
|
||||||
SKDecimal(roi_limits['roi_p1_min'], roi_limits['roi_p1_max'], decimals=5,
|
SKDecimal(roi_limits['roi_p1_min'], roi_limits['roi_p1_max'], decimals=3,
|
||||||
name='roi_p1'),
|
name='roi_p1'),
|
||||||
SKDecimal(roi_limits['roi_p2_min'], roi_limits['roi_p2_max'], decimals=5,
|
SKDecimal(roi_limits['roi_p2_min'], roi_limits['roi_p2_max'], decimals=3,
|
||||||
name='roi_p2'),
|
name='roi_p2'),
|
||||||
SKDecimal(roi_limits['roi_p3_min'], roi_limits['roi_p3_max'], decimals=5,
|
SKDecimal(roi_limits['roi_p3_min'], roi_limits['roi_p3_max'], decimals=3,
|
||||||
name='roi_p3'),
|
name='roi_p3'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -9,8 +9,9 @@ class SKDecimal(Integer):
|
|||||||
self.decimals = decimals
|
self.decimals = decimals
|
||||||
_low = int(low * pow(10, self.decimals))
|
_low = int(low * pow(10, self.decimals))
|
||||||
_high = int(high * pow(10, self.decimals))
|
_high = int(high * pow(10, self.decimals))
|
||||||
self.low_orig = low
|
# trunc to precision to avoid points out of space
|
||||||
self.high_orig = high
|
self.low_orig = round(_low * pow(0.1, self.decimals), self.decimals)
|
||||||
|
self.high_orig = round(_high * pow(0.1, self.decimals), self.decimals)
|
||||||
|
|
||||||
super().__init__(_low, _high, prior, base, transform, name, dtype)
|
super().__init__(_low, _high, prior, base, transform, name, dtype)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user