Closed blacksnail789521 closed 6 years ago
I'm sorry. Apparently I'm using the old version of TICC. I'll try the latest one. Thank you for your time.
Hi, I tried the latest version of TICC. It seems that it depend on the length of the dataset. If length is not long enough (around 1000), it will occur the error (error message: "numpy.linalg.linalg.LinAlgError: Array must not contain infs or NaNs"). Is it possible that I can input the small dataset without occurring the error? Thank you for your time.
Hi! Typically this error occurs when one of the clusters is "empty", meaning the parameters in the problem were poorly tuned. This occasionally occurs because TICC is a non-convex problem, so there is no way to guarantee that you reach the globally optimal solution, and occasionally it gets stuck in a local minimum that it can't get out of. Can you play around with the problem parameters (beta, number of clusters, etc.) and see if that fixes it? In general, fewer clusters and a smaller beta will decrease the probability of that occurring. Thanks!
Hi, You are right. When I adjust the value of #clusters to lower, the error won't happen again! Thank you very much for your help.
Hi, Could you please help me with this.
I have a problem running your code on my dataset. When I'm in Iteration 0 and calling the function "train_clusters", the return value "optRes" seems to contain some nan. So when the function "optimize_clusters" got the value "optRes" from the function "train_clusters", it raised the error.
I did print out the value of "val" every time. Here is the output and the error information: ################################################## ITERATION ### 0 /usr/local/lib/python3.5/dist-packages/ipykernel_launcher.py:497: RuntimeWarning: Degrees of freedom <= 0 for slice /usr/local/lib/python3.5/dist-packages/numpy/lib/function_base.py:3093: RuntimeWarning: divide by zero encountered in double_scalars c = 1. / np.float64(fact) /usr/local/lib/python3.5/dist-packages/numpy/lib/function_base.py:3093: RuntimeWarning: invalid value encountered in multiply c = 1. / np.float64(fact) val: [0.2301 0.1450 -0.0000 ..., 0.9513 -0.0000 0.3904] OPTIMIZATION for Cluster # 0 DONE!!! val: [0.7449 0.0000 -0.0000 ..., 1.0000 -0.0000 0.5509] OPTIMIZATION for Cluster # 1 DONE!!! val: [0.9931 0.0000 0.0000 ..., 0.7676 -0.0000 0.5487] OPTIMIZATION for Cluster # 2 DONE!!! val: [0.4735 0.0000 0.0000 ..., 0.7480 0.0000 0.3804] OPTIMIZATION for Cluster # 3 DONE!!! val: [0.1999 0.1088 0.0000 ..., 0.8651 0.0000 0.5592] OPTIMIZATION for Cluster # 4 DONE!!! val: [0.0202 0.0314 0.0143 ..., 0.7245 0.0000 0.1511] OPTIMIZATION for Cluster # 5 DONE!!! val: [nan nan nan ..., nan nan nan] OPTIMIZATION for Cluster # 6 DONE!!! /usr/local/lib/python3.5/dist-packages/ipykernel_launcher.py:567: RuntimeWarning: invalid value encountered in less /usr/local/lib/python3.5/dist-packages/ipykernel_launcher.py:567: RuntimeWarning: invalid value encountered in greater
LinAlgErrorTraceback (most recent call last)