edbc2890efb8a8842125b484de667c0343e7eb63,tests/test_transforms.py,TransformTests,prepare,#TransformTests#,28

Before Change


        transforms = []
        for transform in gpflow.transforms.Transform.__subclasses__():
            if transform != gpflow.transforms.LowerTriangular:
                transforms.append(transform())
            else:
                transforms.append(transform(4))
        //self.transforms = [C() for C in gpflow.transforms.Transform.__subclasses__()]

After Change


        x_np = np.random.randn(10).astype(settings.np_float)
        transforms = []
        for transform_class in gpflow.transforms.Transform.__subclasses__():
            if transform_class == Chain:
                continue  // Chain transform cannot be tested on its own
            if transform_class == gpflow.transforms.LowerTriangular:
                transforms.append(transform_class(4))
            else:
                transform = transform_class()
                transforms.append(transform)
                transforms.append(Chain(Identity(), transform))
                transforms.append(Chain(transform, Identity()))
        //self.transforms = [C() for C in gpflow.transforms.Transform.__subclasses__()]
        transforms.append(gpflow.transforms.Logistic(7.3, 19.4))
        transforms.append(gpflow.transforms.positive(gpflow.transforms.Rescale(9.5)))  // test __call__() and chaining
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: GPflow/GPflow
Commit Name: edbc2890efb8a8842125b484de667c0343e7eb63
Time: 2017-11-23
Author: st@prowler.io
File Name: tests/test_transforms.py
Class Name: TransformTests
Method Name: prepare


Project Name: instacart/lore
Commit Name: f863a6804ba1f46c3f216c6ba75b642b9b61ad17
Time: 2018-02-01
Author: montanalow@users.noreply.github.com
File Name: lore/pipelines/holdout.py
Class Name: Base
Method Name: encode_x


Project Name: GPflow/GPflow
Commit Name: 01c2aa38bde1f3b97360204cae96076db04c9c95
Time: 2017-11-23
Author: st--@users.noreply.github.com
File Name: tests/test_transforms.py
Class Name: TransformTests
Method Name: prepare