logo
Loading...

執行cross_val_score出現錯誤 - Cupoy

df_temp = np.log(df_m1.astype('float'))    train_X...

執行cross_val_score出現錯誤

2019/09/15 03:11 AM
機器學習新手論壇
Ma Chao Ting
觀看數:0
回答數:2
收藏數:0

df_temp = np.log(df_m1.astype('float'))

    

train_X = df_temp[:train_num]

estimator = LinearRegression()


print(cross_val_score(estimator, train_X.astype('float'), train_Y.astype('float'), cv=5).mean())


遇到:

ValueError: Input contains NaN, infinity or a value too large for dtype('float64').


我查了好久找不到為什麼?  

謝謝