I have labels I feed to a LSTM model. I noticed that there were to few 1s and -1s compared to the number of 0s. I have at least 99.9% of 0s and the rest are 1s and -1s. I considered using weighted classes where I give more weight on 1 and -1 labels and a lot less weight on the 0 labels.

Is it a good practice to put kinda neighbourhood of 1s and -1s around each 1 and -1 in my dataset?

For instance, suppose I have:

..., 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, ...


I would like to create a function that will transform that to:

..., 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -1, -1, 0, 0, 0, 0, ...


when k=2. So that way we catch the information around the initial labels.