Linear Regression on 3D Printing Data
Linear Regression on 3D Printing Data
layerheight wallthickness infill density infil pattern n0zzle_temperature bed temperature prin
0 0.02 90 grid 220 60 40
1 002 7 225 65 40
2 0.02 1 80 0 230 70 40
3 002 70 1 240 40
4 0.02 90 250 40
5 0 02 10 40 1 200 60 40
6 0.02 10 205 6 40
7 0.02 10 10 1 210 70 40
0.02 9 70 0 215 75 40
9 0 02 8 40 1 220 80 40
441
layer_height wal_thickness infil_ density infill patern nozzle termperature bed temperature prin
0 0.02 90 0 220 60 40
0 02 7 90 1 225 65 40
0 02 30 0 230 70 40
D.02 4 70 1 240 75 40
4 002 90 250 80 40
x= [Link] constant(x)
#defining the model, fitting the model and printing the results
multiple model [Link](y,x).fit(0
print(multiple [Link]())
thcalling the linear regression function
linear Regression(X.y)
OLS Regressi on Results
nozzl_e
948
temperature
20.164
bed temperature
15.0562
-55.6225
2.529
9.279
5.953
-5.995
0.000
0.000
9.
-74.
362 -36.883
0.6496 0.206 3.153 0.003
print speed
233 1.066
aterial 298.4514 58.364 5.114 0.000 180.
582 416.321
speed 7.8989 1.238 6.379 0.000 5
398 10.399
**=e=
0.749
Skew: 0.300 Prob (JB) :
0.688
Kurtosis: 3.018 Cond. No. 3
.59e+18
Notes:
(1] Standard Errors assume that the covariance matrix of the errors is
correctly specified.
[2] The smallest eigenvalue is 2.48e-31. This might indicate that there
are
#check X
[Link]()
layer height wall thickness infil_ density infil pattern nozzle_temperature bed_termperature prin
0 0.02 0 220 60 40
1 0.02 90 1 225 65 40
2 0.02 80 230 70 40
3 0.02 1 240 75 40
4 002 6 90 250 80 40
Notes:
(1) Standard Errors assume that the covariance matrix of the errOrs is
correctly specified.
[2] The smallest eigenvalue is 2.37e-31. This might indicate that there
are
Xhead()
2
1
0 02
0.02
0 02
220
225
230
60
65
70
1....
40
40
40 50
3 0.02 240 75 40 75
4 0 02 250 80 40 100
1nter mn
X('material']*X['nozzle temperature']
inter bn X['bed temperature"]'X['nozzle_temperature'])
inter fn = X['fan speed']*X['nozzle temperature"
inter fb Xi'fan speed']*X['bed_temperature"]
In [21]:
linkcode
#adding these interaction terms to dataset using .concat() function of pandas
hwe will call this dataset as interaction
Notes:
[1] Standard Errors assune that the covariance matrix of the errors is
correctly specified
[21 The smallest eigenvalue is 9.58e-32. This might indicate that there
are
strong multicollinearity problems or that the desgn matrix is singular
layer height wall_thickness infilldensity infil pattern nozzle_lemperature bed temperature prin
0 0 02 90 220 60 4
0.02 7 90 225 6 40
2 02 80 230 70 40
3 0 02 70 240 75 40
0 90 250 80
printer['tension strenght']
linear Regression(X,y)
OLS Regression Results
Notes:
(1] Standard Errors assume that the covariance matrix of the errors is
correctly specified.
[21 The smallest eigenvalue is 2.54e-31 This might indicate that there
are
[Link]()
layer height wall_thickness infill density nozzie temperature bed femperature fan speed interc
0.02 90 220 60
0 02 7 225 65 25 0
0 02 1 80 230 70 50
3 002 4 70 240 75 75
linear Regression(interaction,v)
OLS Regression Results
0.134 Durbii-Watson:
Omn ibus:
1.472 Jarque-Bera (JB):
Prob (Omnibus) : 0.935
0.207 Prob (JB) :
-0.114
Skew:
0.902
2.782 Cond. No.
Kurtosis:
.90e+20
[Link]()
R-squared:
tension strenght
Dep. Variable:
Adi. R-squared:
0.673 oLS
Model: F-statistic:
0.609 Least Squares
Method:
10.55
Date: Thu, 07 Jul 2022 Prob (E-statistic) :
.9le-08
Time: 12:50:39 Log-Likelihood:
-151.94
No. Observations :
50 AIC:
321.9
Df Residuals:
41 BIC:
339.1
Df Model: 8
Covariance Type: nonrobust
const
0.0663 0.023 2.863 0.007
020 0.113
layer height 55.5972 12.788 4.348 0.000 29.
772 81.423
wall thickness 1.068 0.319 3.346 0.002 0.
424 1.714
in 1 _density 0.1629 0.034 4.769 0.000 0.
0.232
infill pattern -1.1427 1.646 -0.694 0.491 -4
466 2.181
nozzle temperature -1.0468 0.369 -2.837 0.007 -1.
792 -0.302
bed temperature 3.8647 1.354 2.855 0.007
131 6.599
print speed -0.0156 0.030 -0.519 0.607 -0
076 0.045
material -17.3051 8.515 -2.032 0.049 -34.
502 -0.108
tan speed -0.5719 0.181 -3.166 0.003 -0.
937 -0.207
Notes:
[1] Standard Errors assume that the covariance matrix of the errors
correctly specified.
(2] The smallest eigenvalue is 2.48e-31. This might indicate that there
are
Iinear Regression(X,y)
OLS Regression Results
Notes :
1 0.02 7 90 225 65 0 25
2 0.02 80 230 70 50
3 0.02 70 240 75 75
4 0.02 90 250 80 100
linear Regression(interaction,y)
OLS Regression Results
Notes:
[1] Standard Errors assume that the covarlance natrix of the errors is
correctly specified.
[2] The smallest eigenvalue is 6.94e-32. Thin might indicate that there
are