Closed RobertArbon closed 7 years ago
This code doesn't seem correct for the IntVariable in search_space.py:
IntVariable
search_space.py
def point_from_gp(self, gpvalue): if self.warp is None: return int( self.min + ( gpvalue * (self.max - self.min) ) )
Shouldn't it return
int(np.floor( min( self.min + gpvalue * (self.max - self.min + 1), self.max ) ))
?
Reason:
Let's say we have an integer variable that can take on values 1, 2, 3, 4, 5. Call x the value returned from point_from_gp, then this function is:
x
point_from_gp
using my suggested alteration the function becomes:
You can see more examples here
It's also a problem for the warped variables but I haven't worked out the answer to that yet.
done in #234
This code doesn't seem correct for the
IntVariable
insearch_space.py
:Shouldn't it return
?
Reason:
Let's say we have an integer variable that can take on values 1, 2, 3, 4, 5. Call
x
the value returned frompoint_from_gp
, then this function is:using my suggested alteration the function becomes:
You can see more examples here
It's also a problem for the warped variables but I haven't worked out the answer to that yet.