def pdf_func(self, mat):
        """
        .. todo::

            WRITEME properly

        This dataset can generate an infinite amount of examples.
        This function gives the pdf from which the examples are drawn.
        """
        x = mat[:, 0]
        y = mat[:, 1]
        rval = N.exp(-(y - N.cos(x)) ** 2. / (2. * (self.std ** 2.)))
        rval /= N.sqrt(2.0 * N.pi * (self.std ** 2.))
        rval /= (self.max_x - self.min_x)
        rval *= x < self.max_x
        rval *= x > self.min_x
        return rval
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/datasets/cos_dataset.py/CosDataset.pdf_func/original