Skip to content

Commit

Permalink
TEST: Test initial dictionary and number of components.
Browse files Browse the repository at this point in the history
Modify initial dictionary tests to also take the number of components
expected. This way both optional parameters can be tested.
  • Loading branch information
jakirkham committed Feb 18, 2016
1 parent f42ce90 commit 344d41e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_nanshe/test_imp/test_segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,12 +1042,12 @@ def test_generate_dictionary_04(self):
d = nanshe.imp.segment.generate_dictionary(
g.astype(numpy.float32),
g.astype(numpy.float32),
len(g),
**{
"spams.trainDL" : {
"gamma2" : 0,
"gamma1" : 0,
"numThreads" : 1,
"K" : len(g),
"iter" : 10,
"modeD" : 0,
"posAlpha" : True,
Expand Down Expand Up @@ -1098,12 +1098,12 @@ def test_generate_dictionary_05(self):
d = nanshe.imp.segment.generate_dictionary(
g.astype(float),
g.astype(float),
len(g),
**{
"spams.trainDL" : {
"gamma2" : 0,
"gamma1" : 0,
"numThreads" : 1,
"K" : len(g),
"iter" : 10,
"modeD" : 0,
"posAlpha" : True,
Expand Down Expand Up @@ -1155,12 +1155,12 @@ def test_generate_dictionary_06(self):
d = nanshe.imp.segment.generate_dictionary(
g.astype(numpy.float32),
g.astype(numpy.float32),
len(g),
**{
"spams.trainDL" : {
"gamma2" : 0,
"gamma1" : 0,
"numThreads" : 1,
"K" : len(g),
"iter" : 10,
"modeD" : 0,
"posAlpha" : True,
Expand Down Expand Up @@ -1212,12 +1212,12 @@ def test_generate_dictionary_07(self):
d = nanshe.imp.segment.generate_dictionary(
g.astype(float),
g.astype(float),
len(g),
**{
"spams.trainDL" : {
"gamma2" : 0,
"gamma1" : 0,
"numThreads" : 1,
"K" : len(g),
"iter" : 10,
"modeD" : 0,
"posAlpha" : True,
Expand Down Expand Up @@ -1359,10 +1359,10 @@ def test_generate_dictionary_10(self):
d = nanshe.imp.segment.generate_dictionary(
g.astype(float),
g.astype(float),
len(g),
**{
"sklearn.decomposition.dict_learning_online" : {
"n_jobs" : 1,
"n_components" : len(g),
"n_iter" : 20,
"batch_size" : 256,
"alpha" : 0.2
Expand Down Expand Up @@ -1408,10 +1408,10 @@ def test_generate_dictionary_11(self):
d = nanshe.imp.segment.generate_dictionary(
g.astype(float),
g.astype(float),
len(g),
**{
"sklearn.decomposition.dict_learning_online" : {
"n_jobs" : 1,
"n_components" : len(g),
"n_iter" : 20,
"batch_size" : 256,
"alpha" : 0.2
Expand Down

0 comments on commit 344d41e

Please sign in to comment.