李宏毅2020深度學習課程作業-Homework 1: Linear Regression

作業鏈接:https://blog.csdn.net/iteapoy/article/details/105431738

筆記鏈接:https://github.com/Sakura-gh/ML-notes(包含作業和筆記)

作業目標:由前9小時的18個feature(包含PM2.5)預測第10個小時的PM2.5

數據:  鏈接:https://pan.baidu.com/s/1vpeNkg13rHtWeg_Mt6v-1w   提取碼:opor

錯誤彙集

1、AttributeError: 'data' object has no attribute 'to_numpy'

2、SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

我是將testdata換成test_data

test_data = pd.read_csv('./test.csv', header = None, encoding = 'big5')
test_data = test_data.iloc[:, 2:]
test_data[test_data == 'NR'] = 0
test_data = test_data.to_numpy()

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章