b7d464b5c7536b05e2794a83c1b2b8d8da9c3041,optuna/samplers/random.py,RandomSampler,sample_independent,#RandomSampler#Any#Any#Any#Any#,62

Before Change


            return float(min(max(v, param_distribution.low), param_distribution.high))
        elif isinstance(param_distribution, distributions.IntUniformDistribution):
            // numpy.random.randint includes low but excludes high.
            return self._rng.randint(param_distribution.low, param_distribution.high + 1)
        elif isinstance(param_distribution, distributions.CategoricalDistribution):
            choices = param_distribution.choices
            index = self._rng.randint(0, len(choices))
            return choices[index]

After Change


            return float(min(max(v, param_distribution.low), param_distribution.high))
        elif isinstance(param_distribution, distributions.IntUniformDistribution):
            // numpy.random.randint includes low but excludes high.
            low = int(param_distribution.low / param_distribution.q)
            high = int(param_distribution.high / param_distribution.q)
            return int(self._rng.randint(low, high + 1) * param_distribution.q)
        elif isinstance(param_distribution, distributions.CategoricalDistribution):
            choices = param_distribution.choices
            index = self._rng.randint(0, len(choices))
            return choices[index]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: pfnet/optuna
Commit Name: b7d464b5c7536b05e2794a83c1b2b8d8da9c3041
Time: 2020-02-09
Author: hayata.pri.yamamoto@gmail.com
File Name: optuna/samplers/random.py
Class Name: RandomSampler
Method Name: sample_independent


Project Name: SpiNNakerManchester/sPyNNaker
Commit Name: cd19f843caff39e136766a353807ab3a7d4c6a57
Time: 2019-01-17
Author: Andrew.Rowley@manchester.ac.uk
File Name: spynnaker/pyNN/models/spike_source/spike_source_poisson_vertex.py
Class Name: SpikeSourcePoissonVertex
Method Name: _write_poisson_parameters


Project Name: SpiNNakerManchester/sPyNNaker
Commit Name: cd19f843caff39e136766a353807ab3a7d4c6a57
Time: 2019-01-17
Author: Andrew.Rowley@manchester.ac.uk
File Name: spynnaker/pyNN/models/neuron/abstract_population_vertex.py
Class Name: AbstractPopulationVertex
Method Name: _write_neuron_parameters