Skip to content

TestStringMethods.test_multiExample fails when run alone #30

@mohataher

Description

@mohataher

I have a had a look at your updated code. Interestingly enough, when running the two tests cases in TestStringMethods together, they both pass.

However, when running TestStringMethods.test_multiExample, it fails. I'm not sure why exactly. Do you have an explanation for this?

I ran that using Mac Pro machine, Python 3.6.4 (miniconda). Which machine and Python version did you use?

When test case passes, this is a snippet of the output

`# PASSED`
lam_sparse 0.11
switch_penalty 600
num_cluster 5
num stacked 5
completed getting the data



ITERATION ### 0
OPTIMIZATION for Cluster # 0 DONE!!!
OPTIMIZATION for Cluster # 1 DONE!!!
OPTIMIZATION for Cluster # 2 DONE!!!
OPTIMIZATION for Cluster # 3 DONE!!!
OPTIMIZATION for Cluster # 4 DONE!!!
length of the cluster  0 ------> 2851.       ` # <---- these numbers are different than the failed one.`
length of the cluster  1 ------> 2698
length of the cluster  2 ------> 2094
length of the cluster  3 ------> 7522
length of the cluster  4 ------> 4438
UPDATED THE OLD COVARIANCE
beginning the smoothening ALGORITHM
length of cluster # 0 --------> 2131
length of cluster # 1 --------> 1886
length of cluster # 2 --------> 3072
length of cluster # 3 --------> 7915
length of cluster # 4 --------> 4599
Done writing the figure

And that is a snippet when it fails

 `# FAILED`
lam_sparse 0.11
switch_penalty 600
num_cluster 5
num stacked 5
completed getting the data



ITERATION ### 0
OPTIMIZATION for Cluster # 0 DONE!!!
OPTIMIZATION for Cluster # 1 DONE!!!
OPTIMIZATION for Cluster # 2 DONE!!!
OPTIMIZATION for Cluster # 3 DONE!!!
OPTIMIZATION for Cluster # 4 DONE!!!
length of the cluster  0 ------> 7851.   `# <-----  really higher than when it passed`
length of the cluster  1 ------> 2246
length of the cluster  2 ------> 2261
length of the cluster  3 ------> 2613
length of the cluster  4 ------> 4632
UPDATED THE OLD COVARIANCE
beginning the smoothening ALGORITHM
length of cluster # 0 --------> 7957
length of cluster # 1 --------> 1617
length of cluster # 2 --------> 3102
length of cluster # 3 --------> 3280
length of cluster # 4 --------> 3647
Done writing the figure

The failed test case has successfully convergred, but still fails

CONVERGED!!! BREAKING EARLY!!!



TRAINING F1 score: -1 -1 -1


Failure
Traceback (most recent call last):
  File "/Users/motaher/miniconda2/envs/pyliger/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/Users/motaher/miniconda2/envs/pyliger/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/Users/motaher/dev/PycharmProjects/ORIGINAL_TICC/UnitTest.py", line 33, in test_multiExample
    self.assertEqual(sum(val), 0)
  File "/Users/motaher/miniconda2/envs/pyliger/lib/python3.6/unittest/case.py", line 829, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/Users/motaher/miniconda2/envs/pyliger/lib/python3.6/unittest/case.py", line 822, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: 45059.0 != 0


Ran 1 test in 53.887s

FAILED (failures=1)

That could be due to the fact that states in stored file and states coming from the algorithms were in different values?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions