Open mentalssh opened 5 years ago
Thanks very much for sharing this ANFIS solution. Iris example works great, however the sk_examples.py fails with following error:
Traceback (most recent call last):
File "/home/jp/Documents/Developments/anfis-python/sk_examples.py", line 181, in
At line 226 in anfis.py coeff2d, = torch.gels(y_actual_2d, weighted_x_2d)
Any plans or recommendation to fix? Many thanks
For version > 1.2 WARNING torch.gels() is deprecated in favour of torch.lstsq() and will be removed in the next release. Please use torch.lstsq() instead.
Related: #3 Fixed by: #4
thanks for sharing your code, sir. I tried your code with some other time series data, I found torch.gels function is not stable. when passing through first layer of anfis, it returns nans, or after several iterations, anfis.coeff went too large, loss become inf. maybe gaussmembership functions mu and sigma which i used are not suitable for these data. I
m wondering what
s the suitable range of mu and sigma for setting membership functions, do you have any good suggetions? thank you in advance.here is some error
217 y_actual_2d = y_actual.view(y_actual.shape[0], -1) 218 # Use gels to do LSE, then pick out the solution rows: --> 219 coeff2d, = torch.gels(y_actual_2d, weighted_x_2d) 220 coeff_2d = coeff_2d[0:weighted_x_2d.shape[1]] 221 # Reshape to 3D tensor: divide by rules, n_in+1, then swap last 2 dims
RuntimeError: Lapack Error in gels : Illegal Argument 5 at c:\a\w\1\s\windows\pytorch\aten\src\th\generic/THTensorLapack.cpp:252