def infer(self, expl_dims, inf_dims, x):
        """ Use the sensorimotor model to compute the expected value on inf_dims given that the value on expl_dims is x.

        .. note:: This corresponds to a prediction if expl_dims=self.conf.m_dims and inf_dims=self.conf.s_dims and to inverse prediction if expl_dims=self.conf.s_dims and inf_dims=self.conf.m_dims.
        """
        try:
            if self.n_bootstrap > 0:
                self.n_bootstrap -= 1
                raise ExplautoBootstrapError
            y = self.sensorimotor_model.infer(expl_dims,
                                              inf_dims,
                                              x.flatten())
        except ExplautoBootstrapError:
            logger.warning('Sensorimotor model not bootstrapped yet')
            y = rand_bounds(self.conf.bounds[:, inf_dims]).flatten()
        return y
def infer ( self , expl_dims , inf_dims , x ) : try : if self . n_bootstrap > 0 : self . n_bootstrap -= 1 raise ExplautoBootstrapError y = self . sensorimotor_model . infer ( expl_dims , inf_dims , x . flatten ( ) ) except ExplautoBootstrapError : logger . warning ( 'Sensorimotor model not bootstrapped yet' ) y = rand_bounds ( self . conf . bounds [ : , inf_dims ] ) . flatten ( ) return y
Use the sensorimotor model to compute the expected value on inf_dims given that the value on expl_dims is x.

        .. note:: This corresponds to a prediction if expl_dims=self.conf.m_dims and inf_dims=self.conf.s_dims and to inverse prediction if expl_dims=self.conf.s_dims and inf_dims=self.conf.m_dims.