I posted previously with a similar problem (Categorical Data with tpot). Thanks to Randy, I was able to get the code running, but now that I am stopping it hours later, I am getting a similar error:
File "XXXXXXXX", line 832, in score
if np.any(np.isnan(testing_features)):
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
I'm not sure if I'm stopping it incorrectly (I just hit ctrl+c in spyder) or there is some other issue. I made sure the data is all numerical including feature titles. Any idea what may be the problem?
Here is the code I'm running:
train_x, test_x, train_y, test_y=train_test_split(x,y)
train_x=pd.get_dummies(train_x).values
from tpot import TPOTRegressor
regressor=TPOTRegressor()
regressor.fit(train_x,train_y)
print(regressor.score(test_x,test_y))
I don't know how to show the contents of train and test arrays. train_x is a size (2400,62) float64 and train_y is a (2400,) size series.