src/orion/core/worker/transformer.py
def reverse(self, transformed_point, index=None):
        """Match real vector representations to integers using an argmax function.

        If the number of dimensions is exactly 2, then use 0.5 as a decision boundary,
        and convert representation to integers 0 or 1.

        If the number of dimensions is exactly 1, then return zeros.

        .. note:: This reverse transformation possibly removes the last tensor dimension
           from `transformed_point`.
        """
        point_ = numpy.asarray(transformed_point)
        if self.num_cats == 2:
            return (point_ > 0.5).astype(int)
        elif self.num_cats == 1:
            return numpy.zeros_like(point_, dtype=int)

        assert point_.shape[-1] == self.num_cats
        return point_.argmax(axis=-1)
Match real vector representations to integers using an argmax function.

        If the number of dimensions is exactly 2, then use 0.5 as a decision boundary,
        and convert representation to integers 0 or 1.

        If the number of dimensions is exactly 1, then return zeros.

        .. note:: This reverse transformation possibly removes the last tensor dimension
           from `transformed_point`.
        
Match real vector representations to integers using an argmax function.
If the number of dimensions is exactly 2, then use 0.5 as a decision boundary,
and convert representation to integers 0 or 1.

If the number of dimensions is exactly 1, then return zeros.

: This reverse transformation possibly removes the last tensor dimension
from `transformed_point`.
Match real vector representations to integers using an argmax function . If the number of dimensions is exactly 2 then use 0 . 5 as a decision boundary and convert representation to integers 0 or 1 . If the number of dimensions is exactly 1 then return zeros . : This reverse transformation possibly removes the last tensor dimension from ` transformed_point ` .
def reverse(self, transformed_point, index=None):
        point_ = numpy.asarray(transformed_point)
        if self.num_cats == 2:
            return (point_ > 0.5).astype(int)
        elif self.num_cats == 1:
            return numpy.zeros_like(point_, dtype=int)
        assert point_.shape[-1] == self.num_cats
        return point_.argmax(axis=-1)
def reverse ( self , transformed_point , index = None ) : point_ = numpy . asarray ( transformed_point ) if self . num_cats == 2 : return ( point_ > 0.5 ) . astype ( int ) elif self . num_cats == 1 : return numpy . zeros_like ( point_ , dtype = int ) assert point_ . shape [ - 1 ] == self . num_cats return point_ . argmax ( axis = - 1 )
Match real vector representations to integers using an argmax function.
Match real vector representations to integers using an argmax function .
"""Match real vector representations to integers using an argmax function.

        If the number of dimensions is exactly 2, then use 0.5 as a decision boundary,
        and convert representation to integers 0 or 1.

        If the number of dimensions is exactly 1, then return zeros.

        .. note:: This reverse transformation possibly removes the last tensor dimension
           from `transformed_point`.
        """
self
transformed_point
index