How to use the contextualbandits.online._BasePolicy._drop_ix function in contextualbandits

To help you get started, we’ve selected a few contextualbandits examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github david-cortes / contextualbandits / contextualbandits / online.py View on Github external
Parameters
        ----------
        arm_name : int or object
            Arm to drop. If passing an integer, will drop at that index (starting at zero). Otherwise,
            will drop the arm matching this name (argument must be of the same type as the individual entries
            passed to 'nchoices' in the initialization).

        Returns
        -------
        self : object
            This object
        """
        drop_ix = _BasePolicy._get_drop_ix(self, arm_name)
        del self._oracles[drop_ix]
        _BasePolicy._drop_ix(self, drop_ix)
        return self