def __call__(self, causes):
        """Run the mechanism."""
        effect = np.zeros((self.points, 1))
        # Compute each cause's contribution
        if(causes.shape[1] > 0):
            mix = np.hstack((causes, self.noise))
            effect[:, 0] = self.mechanism(mix)
        else:
            effect[:, 0] = self.mechanism(self.noise)

        return effect
def __call__ ( self , causes ) : effect = np . zeros ( ( self . points , 1 ) ) if ( causes . shape [ 1 ] > 0 ) : mix = np . hstack ( ( causes , self . noise ) ) effect [ : , 0 ] = self . mechanism ( mix ) else : effect [ : , 0 ] = self . mechanism ( self . noise ) return effect
Run the mechanism.