this can have several reasons:
- pixels are classified as NaN because their confidence is too low
- pixels are classified as NaN because one of the input bands is NaN at this location
- the training areas for this class are not large enough (or contain too inhomogenous signatures
Have you seen these discussions?