Skip to content

Commit

Permalink
More test added
Browse files Browse the repository at this point in the history
  • Loading branch information
王悦凝 authored and 王悦凝 committed Apr 4, 2019
1 parent 91fa77f commit 1e0bd58
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
17 changes: 15 additions & 2 deletions neuralizer/tests/test_model_create.py
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'
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 1e0bd58

Please sign in to comment.