接下來來寫我們的主程式:
from def_scv import read_data #由def_scv檔案import def read_data
def main():
output = read_data('data_regression.csv',0)
input_true = read_data('data_regression.csv',1)
input_test = read_data('data_regression.csv',2)
input_train = input_noise[1:160] #將80%作為訓練樣本
output_train = output[1:160]
input_test = input_noise[161:200] #將20%作為測試養本
output_test = output[161:200]
if __name__ == '__main__':
main()