-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
王悦凝
authored and
王悦凝
committed
Apr 4, 2019
1 parent
91fa77f
commit 1e0bd58
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
import model_create | ||
import model_create as mc | ||
|
||
def test_make_combo: | ||
def test_make_combo(): | ||
parameter_combo = mc.make_combo() | ||
assert len(parameter_combo) == 9; "The combination of hyperparameter choices is not correct" | ||
|
||
def test_make_pairwise_list(): | ||
max_depth =2 | ||
options = [1,5,10] | ||
combinations = mc.make_pairwise_list(max_depth=max_depth, options=options) | ||
length = len(options)**max_depth | ||
|
||
assert len(combinations) == length,'not every situation is considered' | ||
|
||
assert combinations[0][1] == 1, 'The hyperparameter is not as chosen' | ||
assert combinations[5][0] == 5, 'The hyperparameters are not combined as designed' | ||
assert combinations[2][1] == 10, 'The hyperparameters are not combined as designed' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters