7bd676c9ab6b23ec93499fd72aeadee3a334a163,skopt/utils.py,,normalize_dimensions,#Any#,443

Before Change


         NOTE: The upper and lower bounds are inclusive for `Integer`
         dimensions.
    
    dim_types = [check_dimension(d) for d in dimensions]
    is_cat = all([isinstance(d, Categorical) for d in dim_types])
    if is_cat:
        transformed_dims = [check_dimension(d, transform="identity")
                            for d in dimensions]

After Change



    else:
        for dimension in space.dimensions:
            if isinstance(dimension, Categorical):
                transformed_dimensions.append(dimension)
            // To make sure that GP operates in the [0, 1] space
            elif isinstance(dimension, Real):
                transformed_dimensions.append(
                    Real(dimension.low, dimension.high, dimension.prior,
                         transform="normalize")
                    )
            elif isinstance(dimension, Integer):
                transformed_dimensions.append(
                    Integer(dimension.low, dimension.high,
                            transform="normalize")
                    )
            else:
                raise RuntimeError("Unknown dimension type "
                                   "(%s)" % type(dimension))

    return Space(transformed_dimensions)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: scikit-optimize/scikit-optimize
Commit Name: 7bd676c9ab6b23ec93499fd72aeadee3a334a163
Time: 2017-08-18
Author: betatim@gmail.com
File Name: skopt/utils.py
Class Name:
Method Name: normalize_dimensions


Project Name: stellargraph/stellargraph
Commit Name: 1dbc4bf21b2f67189f3a0c761a774ccaadb47587
Time: 2018-07-26
Author: docherty@gmail.com
File Name: stellar/mapper/node_mappers.py
Class Name: GraphSAGENodeMapper
Method Name: __init__


Project Name: inferno-pytorch/inferno
Commit Name: 325d8412d641af7e52f97e3422e9ef516e4ef726
Time: 2018-07-05
Author: nasim.rahaman@iwr.uni-heidelberg.de
File Name: inferno/trainers/basic.py
Class Name: Trainer
Method Name: wrap_batch