583fbccfb801eeb02e4385d8ad8df62046678450,studio/optimizer_plugins/cmaes.py,Optimizer,__pack_solution,#Optimizer#Any#,73
Before Change
i = self.nametoi[name]
solution[i] = hyperparam_dict[name]
if self.log_scale_dict[name]:
solution[i] = math.log(solution[i] + EPSILON)
solution[i] = self.__scale_var(solution[i],
self.bounds[i][0], self.bounds[i][1])
return solution
After Change
def __pack_solution(self, hyperparam_dict):
solution = np.empty(self.dim)
for h in self.hyperparameters:
values = copy.copy(h.values)
if h.is_log:
values = np.log(values)
values = self.__scale_var(values, h.min_value, h.max_value)
if not h.unbounded:
values = np.clip(values, h.min_value, h.max_value)
if h.array_length is None:
solution[h.index] = values
else:
solution[h.index: h.index + h.array_length] = values
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: studioml/studio
Commit Name: 583fbccfb801eeb02e4385d8ad8df62046678450
Time: 2017-08-26
Author: jasonzliang@utexas.edu
File Name: studio/optimizer_plugins/cmaes.py
Class Name: Optimizer
Method Name: __pack_solution
Project Name: etal/cnvkit
Commit Name: 1281963269c819f22fed98583526df8946d18b4a
Time: 2016-04-20
Author: eric.talevich@gmail.com
File Name: cnvlib/commands.py
Class Name:
Method Name: do_import_theta
Project Name: CellProfiler/CellProfiler
Commit Name: 1ca8f3fb1218c7d978ed8a1bd91fc63cb8e1b070
Time: 2009-12-10
Author: leek@1fc53939-2000-0410-845c-e8453a809027
File Name: pyCellProfiler/cellprofiler/cpmath/threshold.py
Class Name:
Method Name: sum_of_entropies