I am new to remote sensing. I am working on a project where I need to perform land use land cover classification. For such a task I want to use machine learning (python). My features contain 'BANDS' (6 bands), 'NDVI', 'NDWI', and 'NORM' extracted from the sentinel level 1C images. I did cloud masking and then interpolation (to fill the gaps) and finally, I sampled the data and split them into training and testing datasets. I have also used a mask to eliminate samples where I have '0' which essentially means 'no-data':
# remove points with no reference from training (so we dont train to recognize "no data")
mask_train = labels_train == 0
features_train = features_train[~mask_train]
labels_train = labels_train[~mask_train]
# remove points with no reference from test (so we dont validate on "no data", which doesn't make sense)
mask_test = labels_test == 0
features_test = features_test[~mask_test]
labels_test = labels_test[~mask_test]
However, to be extra sure, I checked for the NAN values using:
np.isnan(train_test).any()
(for both training and testing datasets) I found that my features had NAN values. Any idea how to solve this? and why do I have NAN values in the first place?
Edit: This is what my dataset looks like ( a lot of NAN values):