Machine Learning, Artificial Intelligence, Python, Statistics, Mathematics.
training set: DEG=np.arange(1,21,1) MSE=[] MSE_test=[] PRED_TEST=[] for d in DEG: x_train=np.arange(0.0,5.01,0.01) P_train=PolynomialFeatures(d) P_train=P_train.fit_transform(np.array(x_train).reshape(-1,1)) T_train=np.array(T).reshape(-1,1) reg=LinearRegression().fit(P_train,T_train)