-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Hello!
I've got an imbalanced problem, namely classifcation of temporal sequences using an LSTM, and I've been exploring your code to see whether your method would help.
I've been trying to run the notebook you provide, and I've found the following stepbacks.
Firstly, on the first cell of the notebook, it fails on importing the tSmote module: import tSmote as ts
It was a problem with indentation, as there is a tab missing:
Lines 748 to 749 in 26766f3
| elif j+1 not in bins: | |
| dataNew[i,j,:]=np.median(np.array(tSliceSyn[j]),axis=0) |
Secondly, it naggs about an unknown class: from keras.layers.embeddings import Embedding
I've been searching and found that this answer fixes it: change to from keras.layers import Embedding
Finally, the function ts.imputeMixed sometimes raises an error when creating arrays with negative dimensions (makes sense) , raising ValueError: negative dimensions are not allowed
Line 306 in 26766f3
| T=np.zeros((1+(nStop-nStart-1)*nSubSamp,1+(nStop-nStart-1)*nSubSamp)) |
I've printed values and, in one case, it is trying to create an array with shape (-19, -19)
In fact, any cell that uses imputeMixed leads to this error or similar.
Since X0 and X1 depend on imputeMixed, the code that follows does not run as well...
Given that this problem is closely related to the implementation of your method, could you please check if there is something wrong?
Thank you!