diff --git a/t_sne/returnCorrectSigma_sparse.m b/t_sne/returnCorrectSigma_sparse.m index 4396c08..29fee51 100644 --- a/t_sne/returnCorrectSigma_sparse.m +++ b/t_sne/returnCorrectSigma_sparse.m @@ -30,7 +30,9 @@ else test = true; end - + if isinf(sigma) || isnan(sigma) + error('Starting sigma is %0.02f, highGuess is %0.02f and lowGuess is %0.02f. This usually means there are zeros in wavelet amplitudes, could be present in trainingSet too.', sigma, highGuess, lowGuess) + end while test if P > perplexity @@ -65,4 +67,4 @@ - \ No newline at end of file +