Skip to content
Snippets Groups Projects
Commit fcab676c authored by Baptiste Bauvin's avatar Baptiste Bauvin
Browse files

Modified possible HP for CQB and CQBv2

parent 8c341d33
No related branches found
No related tags found
No related merge requests found
...@@ -311,8 +311,8 @@ def paramsToSet(nIter, randomState): ...@@ -311,8 +311,8 @@ def paramsToSet(nIter, randomState):
"""Used for weighted linear early fusion to generate random search sets""" """Used for weighted linear early fusion to generate random search sets"""
paramsSet = [] paramsSet = []
for _ in range(nIter): for _ in range(nIter):
paramsSet.append({"mu": randomState.choice([0.001, 0.002]), paramsSet.append({"mu": randomState.uniform(1e-02, 10**(-0.5)),
"epsilon": randomState.choice([1e-08, 2e-08]), "epsilon": 10**-randomState.randint(1, 15),
"n_max_iterations": None}) "n_max_iterations": None})
return paramsSet return paramsSet
...@@ -344,7 +344,7 @@ def genBestParams(detector): ...@@ -344,7 +344,7 @@ def genBestParams(detector):
def genParamsFromDetector(detector): def genParamsFromDetector(detector):
nIter = len(detector.cv_results_['param_classifier__mu']) nIter = len(detector.cv_results_['param_classifier__mu'])
return [("mu", np.array([0.001 for _ in range(nIter)])), return [("mu", detector.cv_results_['param_classifier__mu']),
("epsilon", np.array(detector.cv_results_['param_classifier__epsilon'])), ("epsilon", np.array(detector.cv_results_['param_classifier__epsilon'])),
("n_max_iterations", np.array(detector.cv_results_['param_classifier__n_max_iterations']))] ("n_max_iterations", np.array(detector.cv_results_['param_classifier__n_max_iterations']))]
......
...@@ -330,8 +330,8 @@ def paramsToSet(nIter, randomState): ...@@ -330,8 +330,8 @@ def paramsToSet(nIter, randomState):
"""Used for weighted linear early fusion to generate random search sets""" """Used for weighted linear early fusion to generate random search sets"""
paramsSet = [] paramsSet = []
for _ in range(nIter): for _ in range(nIter):
paramsSet.append({"mu": randomState.choice([0.001, 0.002]), paramsSet.append({"mu": randomState.uniform(1e-02, 10**(-0.5)),
"epsilon": randomState.choice([1e-08, 2e-08]), "epsilon": 10**-randomState.randint(1, 15),
"n_max_iterations": None}) "n_max_iterations": None})
return paramsSet return paramsSet
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment