(self, params: Dict[str, Any])
return trans_params
Transform a parameter configuration from actual values to continuous space.

        Args:
            params:
                A parameter configuration to transform.

        Returns:
            A 1-dimensional ``numpy.ndarray`` holding the transformed parameters in the
            configuration.
Transform a parameter configuration from actual values to continuous space.
Transform a parameter configuration from actual values to continuous space .
def transform(self, params: Dict[str, Any]) -> numpy.ndarray:
        """Transform a parameter configuration from actual values to continuous space.

        Args:
            params:
                A parameter configuration to transform.

        Returns:
            A 1-dimensional ``numpy.ndarray`` holding the transformed parameters in the
            configuration.

        """
        trans_params = numpy.zeros(self._bounds.shape[0], dtype=numpy.float64)

        bound_idx = 0
        for name, distribution in self._search_space.items():
            assert name in params, "Parameter configuration must contain all distributions."
            param = params[name]

            if isinstance(distribution, CategoricalDistribution):
                choice_idx = distribution.to_internal_repr(param)
                trans_params[bound_idx + choice_idx] = 1
                bound_idx += len(distribution.choices)
            else:
                trans_params[bound_idx] = _transform_numerical_param(
                    param, distribution, self._transform_log
                )
                bound_idx += 1

        return trans_params
def transform ( self , params : Dict [ str , Any ] ) -> numpy . ndarray : trans_params = numpy . zeros ( self . _bounds . shape [ 0 ] , dtype = numpy . float64 ) bound_idx = 0 for name , distribution in self . _search_space . items ( ) : assert name in params , "Parameter configuration must contain all distributions." param = params [ name ] if isinstance ( distribution , CategoricalDistribution ) : choice_idx = distribution . to_internal_repr ( param ) trans_params [ bound_idx + choice_idx ] = 1 bound_idx += len ( distribution . choices ) else : trans_params [ bound_idx ] = _transform_numerical_param ( param , distribution , self . _transform_log ) bound_idx += 1 return trans_params