#============================================= # Regression by scikit-learn functions #============================================= infile =D:/tkProg/tkProg.main/tkprog_COE/regression/random-poly-ML.xlsx outfile=D:\tkProg\tkProg.main\tkprog_COE\regression/random-poly-ML-predict.xlsx method=linear Fraction of test data=0.3 Seed of random() for split data= nmaxiter=1000 For Ridge/LASSO/Elastic Net: alpha=0.1 l1_ratio=0.5 For Random Forest Regression: max_depth=1000 n_estimators=100 max_features=auto For Multilayer Perceptoron Regression: hidden layer sizes=5,5,5 mlp_solver=lbfgs mlp_activation=relu Plot options: plot_boxplot=0 plot_heatmap=0 plot_pairplot=0 Read [D:/tkProg/tkProg.main/tkprog_COE/regression/random-poly-ML.xlsx] Data check isnull() y x^0 x^1 x^2 x^3 0 False False False False False 1 False False False False False 2 False False False False False 3 False False False False False 4 False False False False False .. ... ... ... ... ... 96 False False False False False 97 False False False False False 98 False False False False False 99 False False False False False 100 False False False False False [101 rows x 5 columns] isna() y x^0 x^1 x^2 x^3 0 False False False False False 1 False False False False False 2 False False False False False 3 False False False False False 4 False False False False False .. ... ... ... ... ... 96 False False False False False 97 False False False False False 98 False False False False False 99 False False False False False 100 False False False False False [101 rows x 5 columns] ndata=101 ndescriptors=4 all_labels=['y', 'x^0', 'x^1', 'x^2', 'x^3'] x_labels =['x^0', 'x^1', 'x^2', 'x^3'] o_label =y Split to training and test data Number of training data:70 Number of test data:31 Covariances of standardized values ( 0, 1) ( y, x^0): 0.3066 ( 0, 2) ( y, x^1): 0.2906 ( 0, 3) ( y, x^2): 0.2826 ( 0, 4) ( y, x^3): 0.2839 ( 1, 2) ( x^0, x^1): 0.2865 ( 1, 3) ( x^0, x^2): 0.2799 ( 1, 4) ( x^0, x^3): 0.2780 ( 2, 3) ( x^1, x^2): 0.2777 ( 2, 4) ( x^1, x^3): 0.2718 ( 3, 4) ( x^2, x^3): 0.2666 Execute regression Standaridization Fit Calculate predicted values Scores: Mean absolute error (MAE): training 3.36 test: 3.64 Mean squared error (MSE) : training 15.9 test: 18.7 Root MSE (RMSE) : training 3.99 test: 4.32 R^2 score : training 0.953 test: 0.945 Parameters: intercept: 22.437025191196067 coefficients x^0: 0 x^1: -3.483 x^2: 9.818 x^3: 11.48 Save predict data to [D:\tkProg\tkProg.main\tkprog_COE\regression/random-poly-ML-predict.xlsx] plot Plot index - input/prediction Plot input - prediction Press ENTER to terminate clicked for the data [train] in the input - predict plot (inf #4 data index #10) # 10: input: 22.15454056398367 predict: 28.65 0: index: 70 1: x^0: 1 2: x^1: 3.5 3: x^2: 12.25 4: x^3: 42.88 Warning in tkplotevent.onclick(): Can not find axes