1

I am using numpy genfromtxt to load csv file. The first 4 columns are features while last column is target data.

When I run the code, I am getting nan rmse result.

Could anyone explain why?

X = dataset[:,0:4]
y = dataset[:,4]

x_train, x_test, y_train, y_test = train_test_split(
X, y, test_size=0.3)


grnnet = algorithms.GRNN(std=0.5, verbose=True)

grnnet.train(x_train, y_train)

error = scorer(grnnet, x_test, y_test)

print("GRNN RMSLE = {:.3f}\n".format(error))
Raj
  • 664
  • 7
  • 23
merve
  • 11
  • 3
  • Do you have nan values in the data? You can check it like this `np.isnan(X).sum()`. If you have nan values sum will be greater than zero – itdxer Jul 18 '18 at 19:53

1 Answers1

0

Suggest to scale the data first and try again. For your convenience:

from sklearn import preprocessing
X = preprocessing.minmax_scale(X)