583fbccfb801eeb02e4385d8ad8df62046678450,studio/optimizer_plugins/cmaes.py,Optimizer,__unpack_solution,#Optimizer#Any#,61
Before Change
def __unpack_solution(self, solution):
solution_dict = {}
for i in xrange(len(solution)):
name = self.itoname[i]
solution_dict[name] = solution[i]
solution_dict[name] = min(1.0, max(0.0, solution_dict[name]))
After Change
h.values = solutution[h.index: h.index + h.array_length]
if not h.unbounded:
h.values = np.clip(h.values, h.min_value, h.max_value)
h.values = self.__unscale_var(h.values, h.min_value, h.max_value)
if h.is_log:
h.values = np.exp(h.values)
if h.array_length is None:
h.values = float(h.values)
return self.hyperparameters
def __pack_solution(self, hyperparam_dict):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: __unpack_solution
Project Name: nipy/dipy
Commit Name: fa786e5f2a8016725991cf2d02eebe6368dc04b3
Time: 2015-10-15
Author: dimrozakis@gmail.com
File Name: dipy/reconst/dti.py
Class Name:
Method Name: wls_fit_tensor
Project Name: keras-team/keras
Commit Name: 98d49754edd5b5757fb7c37c8a3cdc9a65d6f238
Time: 2015-07-20
Author: michael.d.oliver@gmail.com
File Name: examples/lstm_text_generation.py
Class Name:
Method Name: sample