You are on page 1of 15

The International Journal of Advanced Manufacturing Technology (2021) 113:419–433

https://doi.org/10.1007/s00170-021-06596-4

ORIGINAL ARTICLE

Comparative evaluation of supervised machine learning algorithms


in the prediction of the relative density of 316L stainless steel
fabricated by selective laser melting
Germán Omar Barrionuevo 1 & Jorge Andrés Ramos-Grez 1,2 & Magdalena Walczak 1,2 & Carlos Andrés Betancourt 3

Received: 27 August 2020 / Accepted: 3 January 2021 / Published online: 25 January 2021
# The Author(s), under exclusive licence to Springer-Verlag London Ltd. part of Springer Nature 2021

Abstract
To find a robust combination of selective laser melting (SLM) process parameters to achieve the highest relative density of 3D
printed parts, predicting the relative density of 316L stainless steel 3D printed parts was studied using a set of machine learning
algorithms. The SLM process brings about the possibility to process metal powders and built complex geometries. However, this
technology’s applicability is limited due to the inherent anisotropy of the layered manufacturing process, which generates
porosity between adjacent layers, accelerating wear of the built parts when in service. To reduce interlayer porosity, the selection
of SLM process parameters has to be properly optimized. The relative density of these manufactured objects is affected by
porosity and is a function of process parameters, rendering it a challenging optimization task to solve. In this work, seven
supervised machine learning regressors (i.e., support vector machine, decision tree, random forest, gradient boosting,
Gaussian process, K-nearest neighbors, multi-layer perceptron) were trained to predict the relative density of 316L stainless
steel samples produced by the SLM process. For this purpose, a total of 112 data sets were assembled from a deep literature
review, and 5-fold cross-validation was applied to assess the regressor error. The accuracy of the predictions was evaluated by
defining an index of merit, i.e., the norm of a vector whose components are the statistical metrics: root mean square error
(RMSE), mean absolute error (MAE), and the coefficient of determination (R2). From this index of merit, it is established that
the use of gradient boosting regressor shows the highest accuracy, followed by multi-layer perceptron and random forest
regressor.

Keywords Selective laser melting . Stainless steel 316L . Relative density . Machine learning . Regressor

1 Introduction customization technique to a process where final functional


parts can be obtained directly. AM expands design freedom
Additive manufacturing (AM), commonly yet mistakenly and offers the possibility to process almost any material, from
known as 3D printing, was initially developed as a rapid polymers, metals, and ceramics to composite materials [35].
prototyping tool [1]. This technology became popular due to Within metal AM, it is possible to distinguish between two
patents’ expiration and went from being a modeling and major technologies, one where there is a bed of metallic pow-
der and the content is selectively melted through a heat source
and the second where the material is deposited directly in the
* Jorge Andrés Ramos-Grez
form of either powder or wires [25]. Selective laser melting
jramos@ing.puc.cl (SLM) is a powder bed fusion technology designed to use
high-power lasers, with power consumption typically greater
1 than 100 W, to melt and fuse particular powder regions layer
Department of Mechanical and Metallurgical Engineering, School of
Engineering, Pontificia Universidad Católica de Chile, Av. Vicuña by layer, using computer-aided design (CAD) data [52]. This
Mackenna, 4860, Macul, Santiago, Chile technique makes it possible to build complex geometries, im-
2
Research Center for Nanotechnology and Advanced Materials possible to achieve through conventional processes [46].
(CIEN-UC), Av. Vicuña Mackenna 4860, Macul, Santiago, Chile However, one of the key challenges to make this technology
3
Graduate Institute of Automation Technology, National Taipei robust and cost-effective is the heterogeneous microstructure
University of Technology, Taipei, Taiwan of the selective laser melted (SLMed) specimens [30]. Since
420 Int J Adv Manuf Technol (2021) 113:419–433

the mechanical properties depend on the microstructure and in to reduce pore formation during the SLM process. Regarding
the case of SLM due to the dizzying heating and cooling cycle the manufacturing strategy, there is no consensus so far on
produced by the material-laser interaction, mechanisms diffi- which technique delivers the best results. Zhang et al. [51]
cult to control are generated, such as the extension of the examined the effects of changing the scanning angle from 0
molten pool, Marangoni convection, unmelted material, pow- to 90° with successive increments of 15°; according to their
der oxidation, among others [50]. This behavior is repeated results, the maximum relative density is obtained at 30° with a
layer by layer, causing a strong anisotropy to arise, mainly due unidirectional scanning pattern. Gupta et al. [17] evaluated the
to the microstructure’s evolution [25]. The grain’s growth impact of layer rotation at different angles 0, 45, and 90°. At
depends primarily on the temperature gradient and the solid- 90°, the samples present a smaller grain size, higher micro-
ification rate [49]. The heat conduction equation that governs hardness, and higher relative density. In general, four types of
the spatial and temporal distribution of the temperature in the scanning strategies can be distinguished: unidirectional, zig-
process is shown below in Eq. (1). zag, crosshatching, and chessboard. However, the scanning
strategy varies depending on the part’s geometry to be
∂T
ρcp ¼ k∇2 T þ Φ ð1Þ manufactured, so its effects on the relative density have not
∂t been studied in depth yet.
where ρ is the material density, cp the specific heat, k the According to Bourell et al. [4], the parameters that define
thermal conductivity, and Φ represents the heat source, given the quality of a material processed by SLM are the laser power
by Eq. (2) [28]. (P) and the scanning speed (v). The ratio between laser power
and speed is named line energy (LE); this is shown in Eq. (4).
P If the power is low and the speed is high, porosities arise,
Φ ¼ 0:864 α ð2Þ
πr2 which are associated with powder particles that did not melt.
where α represents the absorption of laser energy, P the laser On the other hand, if high-power values and low speeds are
power, and r the radius of the laser focal spot. applied, it leads to overheating the molten pool and, conse-
More complex heat sources have been developed; Waqar quently, the material’s evaporation. Additionally, if high laser
et al. [44] analyzed the thermal behavior and melted pool power and high speed are applied, the balling effect is gener-
morphology of 316L stainless steel (316L SS) processed by ated, interrupting the flow continuity and causing a thermal
SLM. They used a 3D volumetric Gaussian heat source given imbalance [46]. Khanna et al. [20] present a linear relationship
by Eq. 3: between density and energy density (ED) of Invar-36 alloy
during selective laser sintering, where the higher the ED, the
0 h i1
2 ð x−vt Þ 2
þ y 2   higher the density and lower surface roughness.
2αP @ A −jzj
Φ ¼ 2 exp − exp ð3Þ
πr S r2 S P
LE ¼ ð4Þ
v
where S represents the laser penetration depth; x, y, and z are
To avoid unwanted phenomena such as unmelted material
geometrical components; t is the time; and v is the scanning
and spatter from molten material, a processing window has
speed.
been defined as a function of the laser energy density (i.e.,
To fabricate parts with better mechanical properties than
laser fluence), given by Eq. (5); this is a measure of the energy
conventionally manufactured ones, it is necessary to optimize
supplied per unit of volume:
the process parameters. Defects are introduced when process
parameter values are not appropriately chosen. The common P
ED ¼ ð5Þ
defects are classified into three types: porosities, incomplete vlh
fusion holes, and cracks [47]. Several studies show the effects
of the process parameters in the final microstructure, mechan- where ED is the energy density (J mm−3), P is the laser power
ical properties, resistance to corrosion, and wear of objects (W), h is the hatch distance (mm), v is the scanning speed
manufactured using this technique. Zhang et al. [51] found (mm s−1), and l is the layer thickness (mm).
that if the laser power is increased, the grain size also in- The rest of this article is organized as follows. An overview
creases, while if the scanning speed is increased, the grain size of related works is presented in the next section, focused on
decreases. According to Lin et al. [26], the grain refinement machine learning (ML) applied to AM. Then, the methodolo-
improves the mechanical properties of the manufactured gy is explained in Section 3, detailing data processing and ML
pieces. To show this, they evaluated the effects of changing algorithms employed. In Section 4, the accuracy of the pre-
the scanning speed on the relative density of manufactured dictions is reported as well as some recommendations to ob-
objects and their resistance to pitting corrosion. Salman et al. tain a robust system for the relative density prediction. Finally,
[37] recommended rotating the scan angle 79° after each coat the main conclusions are presented in Section 5.
Int J Adv Manuf Technol (2021) 113:419–433 421

2 Related works method provides an effective way to test the algorithm’s abil-
ity to predict new data and face common problems as
Due to the need to optimize manufacturing processes and underfitting or overfitting. In this validation technique, k rep-
thanks to increased computational power, machine learning resents the number of parts in which the data is divided into; k-
algorithms have been recently applied to materials processing. 1 folds are used for training, and the remaining fold is used for
ML algorithms use computational methods to learn informa- testing the model [2]. CV is employed to compare and select a
tion directly from the data without relying on a predetermined model for a given predictive modeling problem because it is
equation or model [9]. Supervised ML algorithms map a func- simple to implement, easy to understand, and results in the
tion from known input-output pairs and are mainly used for predictions having low biases in general.
classification and regression tasks [15]. Regression is In the review by Casalino [7], the laser technologies for
employed to estimate the relationships between a dependent material processing are categorized into union process, ma-
variable and one or more independent variables [21]. Thus, it chining, surface treatment, and AM processes. He further il-
is an appropriate mathematical tool to predict the relative den- lustrates the applicability of different cases of computational
sity of samples processed by AM. The types of ML regressors intelligence: ANN, neuro-fuzzy inference system, meta-
include support vector machine regression (SVR), decision heuristic methods, and computational intelligence, to solve
tree regression (DTR), random forest regression (RFR), problems regarding laser material processing issues in general.
Gaussian process regression (GPR), among others. Other However, there are few publications about ML applied to AM.
ML applications include artificial neural networks (ANN), Kusano et al. [22] developed a predictive model of mechanical
which have the ability to recognize complex patterns, classify properties during the uniaxial tensile test by applying multiple
data, and make predictions [7]. On the other hand, fuzzy logic linear regression and random forest algorithms in a Ti-6Al-4V
(FL) is used when the complexity of the processes is high; for SLMed process. Garg et al. [13] applied multi-genetic algo-
instance, they are appropriate for non-linear processes in rithms to feed an ANN and predicted the roughness and wav-
which mathematical models are not available [40]. An adap- iness of the surface of an aluminum part produced by SLM.
tive neuro-fuzzy inference system (ANFIS) is a hybrid algo- Caggiano et al. [6] employed deep convolutional neural net-
rithm that integrates the ANN and FL principles and can cap- works for on-line detection of defects during SLM in a pre-
ture the benefits of both in a single framework [29]. alloyed Inconel 718 powder. Garg et al. [14] compared differ-
Supervised ML algorithms can be employed to solve opti- ent supervised ML algorithms: SVR and ANFIS versus a hy-
mization problems [41], where the goal is to find a mapping brid algorithm that incorporates linear regression, DTR, and
function that minimizes the loss function shown in Eq. (6). The RFR to predict compressive strength in the process of fused
loss function is a method of evaluating how well the developed deposition modeling (FDM); the hybrid system presented
algorithm models the dataset, and it is calculated as the sum of greater precision in the predictions than SVR and ANFIS.
errors made for each example in training or validation sets [34]. Bayraktar et al. [3] applied ANN to predict the tensile strength
In that sense, minimizing the loss function optimizes the ML of polylactic acid manufactured by FDM. The input layer was
algorithm. In regression problems, the square of the Euclidean formed by the melting temperature, layer thickness, and the
distance between the predictions and the true values is one of printing angle. The results were contrasted with analysis of
the most employed loss functions [45]. variance (ANOVA), and various other statistical metrics were
used to verify the precision of the predictions. Jianjing et al.
1 N  i  i 
min ∑ L y ; f x ;θ ð6Þ [48] developed a prediction model for tensile strength in FDM
θ N i¼1 based on deep learning (DL); the model considers the mate-
rial’s properties, process parameters (extruder temperature,
where L is the loss function, f is the function to be learned, θ is print speed, and layer height), and sensor signals (temperature
the parameter of the mapping function, xi is the feature vector of and vibration) to feed the neural network. The precision
the ith samples, yi is the target value, and N is the number of achieved was higher compared to ML algorithms like SVR
training samples. and RF. Baturynska and Martinsen [2] compared multi-layer
ML accuracy is directly related to the error measurement; perceptron (MLP), gradient boosting regressor (GBR), DTR,
low accuracy means a considerable difference between the SVR, and linear regression to predict width, thickness, and
prediction and the target value. Some of the most employed length in laser-sintered polyamide specimens. Linear regres-
metrics to evaluate the accuracy of regression models are root sion shows higher accuracy, followed by MLP and GBR,
mean squared error (RMSE), mean absolute error (MAE), and respectively. Mycroft et al. [30] analyzed the impact of the
the coefficient of determination (R2) [19]. For MAE and geometry in the printability of the metal AM process applying
RMSE, lower values mean a better model. R2 ranges from SVM, RFR, k-nearest neighbor (KNN), and Bayesian regres-
‑ ∞ to 1; the better model, the higher the R2. To assess ML sion. They addressed new research lines, suggesting measur-
accuracy, the k-fold cross-validation (CV) is employed; this ing the density would better predict the material’s printability.
422 Int J Adv Manuf Technol (2021) 113:419–433

More recently, Kusiak [23] analyzed convolutional and gen- state, an in-depth literature review was executed, the search
erative adversarial neural networks in manufacturing. He con- focused on specific keywords (SLM, relative density, and
cluded that ML algorithms bring new opportunities for the 316L stainless steel), and then the database was consolidated
optimization of advanced manufacturing systems. with a total of 112 datasets. Data were split for training and
In this work, the accuracy of seven machine learning algo- testing processes in the second stage, and cross-validation was
rithms for predicting the relative density in 316L SS speci- applied to validate the model accuracy. Finally, the ML algo-
mens manufactured by SLM is evaluated by applying an in- rithm was tested, and the best model was identified according
dex of merit introduced in the present work. The data collec- to the index of merit, which is described in Section 3.3.
tion was carried out based on an extensive bibliographic re-
view, where the search focused on articles that analyzed the 3.1 Database processing
relative density and mechanical and microstructural properties
of 316L SS parts processed by SLM. A total of 112 data sets The data was collected from 13 references (Table 1) of 316L
were consolidated and then divided into training, validation, SS parts processed by SLM. First, the data were randomized
and testing sets as 70, 15, and 15%. To estimate how accurate and then split into training (70%), validation (15%), and test-
are the implemented models, 5-fold CV was employed with a ing (15%) parts. The input parameters were laser power, scan-
total of 95 datasets. Then, a comparison of each ML prediction ning speed, layer thickness, hatch spacing, and powder size,
accuracy was compared and discussed. with data ranges according to Table 2. The output variable is
the relative density, where the minimum value, mean, and
maximum value are 91.20, 97.71, and 99.90%, respectively
3 Methodology (Fig. 2). Before initiating the training process, the data were
scaled using zero mean and unit variance.
Figure 1 illustrates the process followed to predict the relative The scatter matrix (Fig. 2) helps us find patterns visually
density of 316L samples manufactured by SLM. In the first and relationships between the process parameters and the

Fig. 1 Schematic diagram of the process followed to assess the ML algorithm for the prediction of the relative density of 316L samples processed by
SLM
Int J Adv Manuf Technol (2021) 113:419–433 423

Table 1 Datasets employed for training and testing procedure

Dataset number Reference Study Machine brand/model Mean relative


density (%)

22 [18] Study the effect of process parameters on microstructure EP-M100T 98.77


and mechanical properties.
20 [12] Optimization of the relative density, and surface roughness. FS271M 98.52
16 [24] Study the effect of energy density on densification, microstructure, SLM 125 96.00
and mechanical properties.
10 [43] Investigation of effects of process parameters on microstructure SLM 280HL 98.59
and hardness.
9 [33] Improve surface quality and relative density. RENISHAW AM 400 98.62
7 [51] Effects of placement orientation and scanning angle on BLT S200 95.61
mechanical properties.
5 [26] Effect of microstructural differences along building direction Self-developed 500 W 96.82
on corrosion behavior.
5 [36] Influence of the manufacturing process on the microstructure REALIZER SLM 100 96.50
and material properties.
4 [27] Effects of hot isostatic pressing treatment on relative density. MYSINT100 96.84
4 [37] Impact of the scanning strategy on mechanical behavior. SLM 250 HL 99.05
4 [42] Sliding wear characteristics and corrosion behavior. RENISHAW 125 96.40
3 [10] Effect of powder feedstock on microstructure and AFS-M120 97.38
mechanical properties.
3 [32] Influence of energy density on porosity. – 97.97

relative density; furthermore, it is possible to observe histo- in Google Colaboratory (Colab) environment [31]. S-l and TF
grams throughout the diagonal, allowing us to observe the are popular ML libraries, which are simple to implement and
samples’ trends within the spectrum of possible values. It is efficient in terms of computational power [5]. The algorithms
possible to identify a skewed right pattern for laser power and employed are detailed below. For every algorithm, the
scanning speed; for layer thickness, there is a multimodal hyperparameters were optimized in order to increase accuracy.
pattern; hatch spacing shows the symmetric multimodal dis-
tribution, a truncated pattern for powder size, and a skewed 3.2.1 Support vector regression
left pattern for relative density around 98%, denoting that
SLM is a near-net-shape manufacturing process. Since the Support vector regression (SVR) uses a subset of training points
processing parameters do not show an apparent relationship in the decision function to maximize the minimum distance from
between the latter and the relative density, ML algorithms’ the hyperplane to the adjacent sample point [39]. SVR is effec-
application could find a correlation between them to obtain a tive in facing overfitting whenever the appropriate kernel func-
suitable model for their prediction. tion (KF) is employed. The KF is applied to each instance in the
dataset to map the original non-linear observations into a higher-
3.2 Machine learning algorithms dimensional space in which they become separable. SVR’s goal
is to search for a fitting function f(x) = ⟨w, x⟩ + b, which has a
The ML algorithms employed to assess the relative density deviation less than a small value ε from the target (yi) acquired
were executed using Scikit-learn (S-l) and TensorFlow (TF) for the relating training data set (xi). The employed kernel func-
tion was a radial basis function (RBF) with a margin of tolerance
ε = 0.01.
Table 2 Inputs for the training process
3.2.2 Decision tree regression
Parameters Symbol Min Range mean Max

Laser power (W) P 70 152.14 300 The decision tree regression (DTR) goal is to create a model
Scanning speed (mm/s) V 18.75 702.05 2000 that predicts the value of a target variable by learning simple
Layer thickness (mm) L 0.02 0.06 0.46 decision rules inferred from the data features. This regression
Hatch spacing (mm) H 0.02 0.09 0.15 mechanism works by breaking down a dataset into smaller
Particle size (mm) PS 0.016 0.034 0.048 sub-datasets, and subsequently, a related decision tree is de-
veloped incrementally [15]. Finally, a tree having decision
424 Int J Adv Manuf Technol (2021) 113:419–433

Fig. 2 Scatter matrix to show a possible correlation between process parameters and relative density

nodes and leaf nodes is obtained. The parameter that deter- and control overfitting. The selected number of trees in the
mines the accuracy and time employed to find the optimal forest was 100, with a depth of 20 each.
prediction is the depth. In this work, a maximum depth of
eight was occupied. 3.2.4 Gradient boosting regressor

Gradient boosting regressor (GBR) is another class of ensem-


3.2.3 Random forest regression ble boosting methods, which predicts the desired outcome
based on a forward stage-wise fashion; it allows the optimiza-
Random forest regression (RFR) is an ensemble method that tion of arbitrary differentiable loss functions [2]. The opti-
operates by training several decision trees and returning the mized hyperparameters were least squares for the loss func-
class that obtained the best results overall the ensemble trees tion, learning rate equal to 0.001, and maximum iteration
[39]. RFR uses averaging to improve the predictive accuracy number of 2000.
Int J Adv Manuf Technol (2021) 113:419–433 425

3.2.5 Gaussian process regression point and predict the label from the latter. In this work, the
number of neighbors selected was three.
Gaussian process regression (GPR) is a stochastic method
based on statistical learning and Bayesian theory that mea-
sures the similarity between points using a kernel function 3.2.7 Multi-layer perceptron
(KF) to predict the value for an unseen point from the training
data [11]. The KF employed was RBF, with a noise level α = Multi-layer perceptron (MLP), also called deep feedforward
0.001 added to the kernel matrix’s diagonal during fitting, and networks or deep neural networks, are is quintessential deep
ten optimizers. learning model based on the perceptron as an operational unit
trained using backpropagation; therefore, it uses the square
error as a loss function, and the output is a set of continuous
3.2.6 K-nearest neighbor values. Deep neural networks define a mapping y = f(x; θ) and
learn the value of the parameters θ that result in the best func-
K-nearest neighbor (KNN) is employed in cases where feature tion approximation [16]. The employed hyperparameters were
vectors are continuous; the objective is to find a predefined a depth of five hidden layers, ten units per each hidden layer,
number of training samples close in the distance to the new rectified linear unit function (RELU) as activation function,

Fig. 3 Contour plot of relative


density as a function of a laser
power and scanning speed and b
layer thickness and hatching
spacing
426 Int J Adv Manuf Technol (2021) 113:419–433

Table 3 Assessing the accuracy of ML algorithms in CV and testing procedures

CV Testing

R2 RMSE MAE IM R2 RMSE MAE IM

SVR 0.2369 0.7154 0.5149 1.1969 0.2529 0.4319 0.7566 1.0192


DTR 0.3059 0.6855 0.4767 1.1202 0.4193 0.3156 0.4984 0.8365
RFR 0.3853 0.6281 0.4711 1.0557 0.5198 0.1897 0.4443 0.6851
GBR 0.3918 0.6131 0.5046 1.0675 0.5070 0.2093 0.4652 0.7161
GPR 0.3403 0.6339 0.4815 1.0774 0.4423 0.2779 0.4937 0.8076
KNN 0.1554 0.7632 0.5682 1.2952 0.3225 0.3764 0.5216 0.9428
MLP 0.5908 0.1674 0.3813 0.5838 0.4795 0.2605 0.4881 0.7596

and 3000 epochs. In order to increase the accuracy and reduce The IM represents the global accuracy of the validation process
bias on the test data, L2 regularization was applied, with a and then is compared with the average IM of the testing process
penalty parameter λ = 0.001 [38]. calculated ten times. The testing data set was isolated and was
not used in the CV procedure. Finally, all data sets were
employed to assess the global model’s accuracy.
3.3 Index of merit for the evaluation of the precision
of machine learning algorithms

To assess the prediction performance of every algorithm, the


4 Results and discussion
norm of a vector having as components the following three
statistical metrics was employed: the coefficient of determina-
In Fig. 3, it is possible to observe the processing window in red,
tion (R2), which explains how well the model replicates the
where the maximum relative density is obtained. Through Fig. 3a,
observed results; the root mean square error (RMSE), which
a recommended zone for the scanning speed falls in the range of
represents the sample standard deviation of the differences
500 to 1500 (mm/s), and laser power is recommended to be
between predicted values and expected values; and the mean
greater than 180 W; at lower powers, around 100 W, it is recom-
absolute error (MAE), representing the accuracy of the predic-
mended to use a scanning speed of around 800 mm/s. On the
tions. The R2, RMSE, and MAE are computed using Eqs.
other hand, Fig. 3b shows a higher relative density while layer
(7)–(9), where yi is the true value, byi is the prediction, yi is
thickness increases and hatch spacing decreases.
the mean, and N is the total number of samples. This index of
The model’s evaluation was developed by applying the 5-
merit (IM), shown in Eq. (10), seeks to unify the three statis-
fold CV to predict new data and avoid overfitting (Table 3). A
tical metrics into one and propose a robust estimator. As the
successful ML algorithm should have a small training error and
magnitude of the index approaches zero, the maximum
make the gap between training and test error as small as possible
predicting accuracy is obtained, while the further apart from
(Fig. 4). With a total of 3000 epochs, the training error achieves
zero, the lower the predicting accuracy achieved.
 2
∑Ni yi −byi
R2 ¼ 1−  2 ð7Þ
∑Ni yi −yi
rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
2ffi
1 N
RMSE ¼ ∑ y −by ð8Þ
N i i i

1
MAE ¼ ∑Ni yi −byi ð9Þ
N

qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
2
IM ¼ 1−R2 þ MSE þ ðMAE Þ2 ð10Þ

The cross-validation process was repeated ten times for each Fig. 4 Loss function evaluation during training and testing evaluation in
model, and then the average was taken as accuracy estimators. MLP
Int J Adv Manuf Technol (2021) 113:419–433 427

Table 4 Computational a mean squared error value less than 0.253, while for the test set,
time ML algorithm Time (s)
the error gets around 0.386 in the MLP algorithm.
SVR 0.017 MLP achieved the highest R2 for the CV procedure and the
DTR 0.005 lowest RMSE and MAE, respectively. These results were cor-
RFR 0.120 roborated with the index of merit, which reports the lowest IM
GBR 0.542 (0.5838), followed by RFR and GBR with an IM equal to
GPR 0.428 1.0557 and 1.0675, respectively. The algorithm that shows
KNN 0.010 the worst performance was KNN, with the lowest R2 and
MLP 96.088 highest RMSE and MAE, consequently obtaining the largest
IM (1.2952). However, during testing, the models that best

Fig. 5 Evaluation of each ML


algorithm during training and IM
value

IM=0.4673 IM=0.1331

IM=0.2463 IM=0.3528

IM=0.0842 IM=0.5791

IM=0.5061
428 Int J Adv Manuf Technol (2021) 113:419–433

matched the predictions with the true values of the relative not present during the experiments. Considering the exposed
density were RFR and GBR, with an IM of 0.6851 and results, RFR shows better prediction performance in testing,
0.7161, respectively. The models that better adjusted the pre- followed by GBR and MLP.
dictions (>R2) with the relative density’s true values were The no free lunch theorem states that no machine learning
RFR and GBR again. Concerning the accuracy of the predic- algorithm is universally better than any other [16]. However,
tions, the algorithm that performed best at predicting the rela- the metrics to evaluate the accuracy play a significant role in
tive density of the 316L SS pieces processed by SLM is the determining which algorithm is suitable depending on the task
RFR model, followed by GBR and MLP. All the ML algo- to be executed. Chai and Draxler [8] compared RMSE versus
rithms show similar metrics during CV and testing; thus, MAE and determined that RMSE is appropriated to be used
showing their consistency, which means that overfitting was when the error distribution is expected to be Gaussian and

Fig. 6 Evaluation of each ML


algorithm during testing and IM
value

IM=0.5867 IM=0.9118

IM=0.6294 IM=0.6089

IM=0.8441 IM=0.7674

IM=0.5797
Int J Adv Manuf Technol (2021) 113:419–433 429

Table 5 Metrics employed to assess the global accuracy of the (processor i7-7700HQ 2.8 GHz, 12 Gb of RAM) and in the
algorithms employed to predict the true relative density in the SLM
same environment (Colab); the results are presented in
process
Table 4.
R2 RMSE MAE IM Figures 5 and 6 show a comparative evaluation of all su-
pervised ML algorithms in the prediction of the relative den-
SVR 0.6066 0.1425 0.4112 0.5867
sity in 316L SS pieces manufactured by SLM for both training
DTR 0.3767 0.3576 0.5613 0.9118
and testing, respectively, comparing target values on the hor-
RFR 0.5938 0.1519 0.4434 0.6203
izontal axis and the predicted values on the vertical axis. The
GBR 0.6296 0.1263 0.4665 0.6089
IM explains how accurate the models are; the lower the IM,
GPR 0.4039 0.3271 0.5002 0.8441
the more accurate the model. For the training process, GPR
KNN 0.4851 0.2441 0.5140 0.7674
achieves the lowest IM (0.0842), followed by DTR and RFR.
MLP 0.6056 0.1432 0.3896 0.5797 For the test dataset, MLP shows the highest accuracy (IM =
0.5797), followed by SVR and GBR with IM equal to 0.5867
and 0.6089, respectively.
recommended a combination of metrics to assess general To provide a global evaluation of all the algorithms
model performance. The proposed IM appears as a robust employed in this work, the entire dataset was used for
estimator since it integrates the accuracy and variability into predicting the true relative density prediction of the SLMed
one value. Jianjing Zhang et al. (2019) employed RMSE and samples. A total of 87 sets of data were employed for training
R2 to assess the accuracy of the predicted tensile strength in and 25 for the testing. Table 5 shows the obtained metrics for
FDM. Baturynska and Martinsen [2] employed R2, MAE, and accuracy evaluation. The algorithm which shows the highest
RMSE as estimators to compare MLP, DTR, GBR, and SVR R2 is GBR, followed by MLP and SVR. The model that shows
to assess the accuracy of geometry deviations in AM. the lowest RMSE is GB; MLP shows the lowest MAE,
Nevertheless, due to the dataset variability, it is difficult to followed by SVR. With these results, the algorithm that shows
establish which is the best algorithm for width, thickness, the lowest IM was MLP, followed by SVR, GBR, and RFR.
and length prediction. The IM makes the selection of which Therefore, the recommended ML algorithms for predicting
model to choose for the relative density prediction easier the relative density on samples fabricated by SLM are the
since, through a single metric, it is established which algo- ensemble models GBR and RFR. Furthermore, MLP shows
rithm shows greater precision. Besides, Occam’s razor (c. good accuracy presenting the lowest IM (0.5797); however,
1287–1347) states that “among competing hypotheses that MLP shows the highest time computing.
explain known observations equally well, we should choose Figure 7 illustrates the range of the predicted relative den-
the simplest one” [16]. For that reason, we have analyzed the sity. By comparing the true values of the relative density and
computational time for each algorithm in order to determine the ML algorithms’ results, it is possible to determine that
which one consumes more resources. It should be noted that GBR is the model that best fit the predictions. The true mean
all the ML algorithms were run on the same computer value for the RD on the testing process was 97.76% and

Fig. 7 Boxplot of predictions


spread during testing
430 Int J Adv Manuf Technol (2021) 113:419–433

Fig. 8 Scatter plot for comparing


supervised ML algorithms in
predicting the true relative
density. a All the algorithms. b
Algorithms with the lowest IM

98.4% for the median, while the median RD predicted for all makes sense since the average relative density of the
the ML algorithms was around 98.04 ± 0.28%. dataset is over this value.
Figure 8 shows the behavior of all the employed ML algo- 2. A process window to obtain parts with high density has
rithms, where Fig. 8a indicates the prediction performance been established. The following ranges are recommended:
comparison between all the ML algorithms employed, and laser power greater than 180 W, scanning speed between
the scatter plots of the most accurate algorithms (MLP, 600 and 800 mm/s, layer thickness between 0.1 and
GBR, RFR) are shown in Fig. 8b. 0.4 mm, and hatch spacing around 0.03 mm. The latter
for a powder diameter size varying between 16 and 48 μm
and machine brands: SLM solutions (125, 250, and
280HL), Renishaw (AM 125, and 400), ReaLizer SLM
5 Conclusions 100, SISMA MySint 100, SHINING 3D EP-M100, AFS-
M120, Xi’an BLT S200, and FARSOON FS271M.
Seven machine learning algorithms have been thoroughly 3. An Index of Merit has been built from the norm of a
employed for predicting the relative density of 316L stainless vector having as components the three statistical metrics:
steel parts processed by SLM and comprehensively analyzed R2, RMSE, and MAPE. The lower the norm value, the
and compared; the following conclusions are drawn: more accurate the algorithm predicts the relative density.
4. The algorithm that better represents the relative density
1. The algorithms work well for predictions (near-net-shape) prediction spread is gradient boosting regressor (GBR).
where there is a relative density greater than 97%; this This model achieves high replicability, the lowest
Int J Adv Manuf Technol (2021) 113:419–433 431

standard deviation, and excellent accuracy in the predic- References


tions. For these reasons, GBR is the algorithm recom-
mended for the prediction of relative density in samples 1. Alafaghani A, Qattawi A, Alrawi B, Guzman A (2017)
Experimental optimization of fused deposition modelling process-
of 316L stainless steel processed by selective laser melt-
ing parameters: a design-for-manufacturing approach. Procedia
ing using the machine brands listed in Table 1 and a pow- Manufacturing 10:791–803. https://doi.org/10.1016/j.promfg.
der diameter size ranging from 16 to 48 μm. 2017.07.079
5. Multi-layer perceptron (MLP) is the second-best algo- 2. Baturynska I, Martinsen K (2020) Prediction of geometry devia-
rithm to predict the relative density SLMed accurately. It tions in additive manufactured parts: comparison of linear regres-
sion with machine learning algorithms. J Intell Manuf. https://doi.
shows good accuracy during the testing process and pre- org/10.1007/s10845-020-01567-0
sents the lowest MAE; however, significantly more com- 3. Bayraktar Ö, Uzun G, Çakiroğlu R, Guldas A (2017) Experimental
puting time is required for its processing. study on the 3D-printed plastic parts and predicting the mechanical
6. The ensemble method random forest regressor (RFR) properties using artificial neural networks. Polym Adv Technol
28(8):1044–1051. https://doi.org/10.1002/pat.3960
shows accurate metrics during cross-validation and test-
4. Bourell D, Coholich J, Chalancon A, Bhat A (2017) Evaluation of
ing; it is the third ML algorithm recommended for the energy density measures and validation for powder bed fusion of
relative density prediction in SLM fabrication. polyamide. CIRP Ann Manuf Technol 66(1):217–220. https://doi.
7. Finally, DTR, KNN, and GPR achieve the worst metrics, org/10.1016/j.cirp.2017.04.128
and therefore, we do not recommend them to predict the 5. Buitinck, L., Louppe, G., Blondel, M., Pedregosa, F., Mueller, A.,
Grisel, O., … Varoquaux, G. (2013). API design for machine learn-
relative density of 316L stainless steel fabricated using the ing software: experiences from the scikit-learn project, 1–15.
above listed selective laser melting machines. Retrieved from http://arxiv.org/abs/1309.0238
6. Caggiano A, Zhang J, Alfieri V, Caiazzo F, Gao R, Teti R (2019)
Acknowledgments The main and corresponding author would like to Machine learning-based image processing for on-line defect recog-
acknowledge SENESCYT grant no. ARSEQ-BEC-000329-2017, the nition in additive manufacturing. CIRP Ann 68(1):451–454. https://
Research Center for Nanotechnology and Advanced Materials (CIEN- doi.org/10.1016/j.cirp.2019.03.021
UC) and ANID FONDECYT grant no. 1201068 project for making this 7. Casalino G (2018) Computational intelligence for smart laser ma-
publication possible. terials processing. Opt Laser Technol 100:165–175. https://doi.org/
10.1016/j.optlastec.2017.10.011
Authors’ contributions Germán Omar Barrionuevo: paper original idea, 8. Chai T, Draxler RR (2014) Root mean square error (RMSE) or
literature review and data collection, selection and implementation of mean absolute error (MAE)? -arguments against avoiding RMSE
machine learning algorithms, data processing, plot generation, and man- in the literature. Geosci Model Dev 7(3):1247–1250. https://doi.
uscript writing and funding. org/10.5194/gmd-7-1247-2014
Jorge Andrés Ramos Grez: paper original conceptualization, close 9. Chelly SM, Denis C (2001) Introducing machine learning.
supervision and guidance during research process, index of merit formu- Medicine and Science in Sports and Exercise 33(2):326–333
lation, critical advice, and manuscript proofread and funding. Retrieved from http://www.ncbi.nlm.nih.gov/pubmed/11224825
Magdalena Walczak: supervision and guidance, critical advice and 10. Chen W, Yin G, Feng Z, Liao X (2018) Effect of powder feedstock
manuscript proofread, and valuable comments. on microstructure and mechanical properties of the 316L stainless
Carlos Andrés Betancourt: critical advice and manuscript proofread steel fabricated by selective laser melting. Metals 8(9). https://doi.
and valuable comments. org/10.3390/met8090729
11. Chen Z, Wang B, Gorban AN (2020) Multivariate Gaussian and
Funding This study is financially supported by the SENESCYT grant no. Student-t process regression for multi-output prediction. Neural
ARSEQ-BEC-000329-2017 and ANID FONDECYT grant no. 1201068 Comput & Applic 32(8):3005–3028. https://doi.org/10.1007/
project. s00521-019-04687-8
12. Deng Y, Mao Z, Yang N, Niu X, Lu X (2020) Collaborative opti-
Data availability Source files are available in GitHub (https://github.com/ mization of density and surface roughness of 316L stainless steel in
GermanOmar/SLM-ML). selective laser melting. Materials 13(7). https://doi.org/10.3390/
ma13071601
13. Garg A, Lam JSL, Savalani MM (2018) Laser power based surface
Compliance with ethical standards characteristics models for 3-D printing process. J Intell Manuf
29(6):1191–1202. https://doi.org/10.1007/s10845-015-1167-9
Ethical approval Not applicable. 14. Garg A, Tai K, Lee CH, Savalani MM (2014) A hybrid M5’-genetic
programming approach for ensuring greater trustworthiness of pre-
Consent to participate All the authors involved have agreed to partici- diction ability in modelling of FDM process. J Intell Manuf 25(6):
pate in this submitted article. 1349–1365. https://doi.org/10.1007/s10845-013-0734-1
15. Gianey HK, Choudhary R (2018) Comprehensive review on super-
Consent to publish All the authors involved in this manuscript give full vised machine learning algorithms. In: Proceedings - 2017 interna-
consent for publication of this submitted article. tional conference on machine learning and data Science, MLDS
2017, 2018-Janua, pp 38–43. https://doi.org/10.1109/MLDS.
Competing interests The authors declare that they have no conflict of 2017.11
interest. 16. Goodfellow I, Bengio Y, Courville A (2016) Deep learning adap-
tive computation and machine learning. The MIT Press 1. https://
doi.org/10.2172/1462436
432 Int J Adv Manuf Technol (2021) 113:419–433

17. Gupta MK, Singla AK, Ji H, Song Q, Liu Z, Cai W, Mia M, 31. Pedregosa F, Varoquaux G, Gramfort A, Michel V, Buitinck L,
Khanna N, Krolczyk GM (2020) Impact of layer rotation on mi- Louppe G et al (2011) Scikit-learn: machine learning in Python. J
cro-structure, grain size, surface integrity and mechanical behaviour Mach Learn Res 19(1):29–33. https://doi.org/10.1145/2786984.
of SLM Al-Si-10Mg alloy. Journal of Materials Research and 2786995
Technology 9(5):9506–9522. https://doi.org/10.1016/j.jmrt.2020. 32. Peng T, Chen C (2018) Influence of energy density on energy
06.090 demand and porosity of 316L stainless steel fabricated by selective
18. Huang M, Zhang Z, Chen P (2019) Effect of selective laser melting laser melting. International Journal of Precision Engineering and
process parameters on microstructure and mechanical properties of Manufacturing - Green Technology 5(1):55–62. https://doi.org/10.
316L stainless steel helical micro-diameter spring. Int J Adv Manuf 1007/s40684-018-0006-9
Technol 2154:2117–2131. https://doi.org/10.1063/1.5125347 33. Ramirez-Cedillo E, Uddin MJ, Sandoval-Robles JA, Mirshams
19. Hyndman RJ, Koehler AB (2005) Another look at measures of RA, Ruiz-Huerta L, Rodriguez CA, Siller HR (2020) Process plan-
forecast accuracy. Int J Forecast 22(November):679–688. https:// ning of L-PBF of AISI 316L for improving surface quality and
doi.org/10.1016/j.ijforecast.2006.03.001 relating part integrity with microstructural characteristics. Surf
20. Khanna N, Mistry S, Rashid RAR, Gupta MK (2019) Coat Technol 396(May):125956. https://doi.org/10.1016/j.
Investigations on density and surface roughness characteristics surfcoat.2020.125956
during selective laser sintering of Invar-36 alloy. Materials 34. Ren Z, Yang L (2019) Robust extreme learning machines with
Research Express 6(8):86541. https://doi.org/10.1088/2053-1591/ different loss functions. Neural Process Lett 49(3):1543–1565.
ab18bd https://doi.org/10.1007/s11063-018-9890-9
21. Kostopoulos G, Karlos S, Kotsiantis S, Ragos O (2018) Semi- 35. Rinaldi M, Ghidini T, Cecchini F, Brandao A, Nanni F (2018)
supervised regression: a recent review. Journal of Intelligent and Additive layer manufacturing of poly (ether ether ketone) via
Fuzzy Systems 35(2):1483–1500. https://doi.org/10.3233/JIFS- FDM. Compos Part B 145(December 2017):162–172. https://doi.
169689 org/10.1016/j.compositesb.2018.03.029
22. Kusano M, Miyazaki S, Watanabe M, Kishimoto S, Bulgarevich
36. Röttger A, Geenen K, Windmann M, Binner F, Theisen W (2016)
DS, Ono Y, Yumoto A (2020) Tensile properties prediction by
Comparison of microstructure and mechanical properties of 316 L
multiple linear regression analysis for selective laser melted and
austenitic steel processed by selective laser melting with hot-
post heat-treated Ti-6Al-4V with microstructural quantification.
isostatic pressed and cast material. Mater Sci Eng A 678(April):
Mater Sci Eng A 787(March):139549. https://doi.org/10.1016/j.
365–376. https://doi.org/10.1016/j.msea.2016.10.012
msea.2020.139549
37. Salman OO, Brenne F, Niendorf T, Eckert J, Prashanth KG, He T,
23. Kusiak A (2020) Convolutional and generative adversarial neural
Scudino S (2019) Impact of the scanning strategy on the mechanical
networks in manufacturing. Int J Prod Res 58(5):1594–1604.
behavior of 316L steel synthesized by selective laser melting. J
https://doi.org/10.1080/00207543.2019.1662133
Manuf Process 45(July):255–261. https://doi.org/10.1016/j.
24. Larimian T, Kannan M, Grzesiak D, AlMangour B, Borkar T
jmapro.2019.07.010
(2020) Effect of energy density and scanning strategy on densifica-
tion, microstructure and mechanical properties of 316L stainless 38. Shi G, Zhang J, Li H, Wang C (2019) Enhance the performance of
steel processed via selective laser melting. Mater Sci Eng A deep neural networks via L2 regularization on the input of activa-
770(June 2019):138455. https://doi.org/10.1016/j.msea.2019. tions. Neural Process Lett 50(1):57–75. https://doi.org/10.1007/
138455 s11063-018-9883-8
25. Li N, Huang S, Zhang G, Qin R, Liu W, Xiong H, Shi G, Blackburn 39. Singh, A., Thakur, N., & Sharma, A. (2016). A review of super-
J (2019) Progress in additive manufacturing on new materials: a vised machine learning algorithms. Proceedings of the 10th
review. J Mater Sci Technol 35(2):242–269. https://doi.org/10. INDIACom; 2016 3rd International Conference on computing for
1016/j.jmst.2018.09.002 sustainable global development, INDIACom 2016, 1310–1315
26. Lin K, Gu D, Xi L, Yuan L, Niu S, Lv P, Ge Q (2019) Selective 40. Sumathi S, Paneerselvam S (2010) Computational intelligence par-
laser melting processing of 316L stainless steel: effect of micro- adigms theory and applications. Taylor & Francis Group, LCC.
structural differences along building direction on corrosion behav- https://doi.org/10.1201/9781439809037
ior. Int J Adv Manuf Technol 104(5–8):2669–2679. https://doi.org/ 41. Sun S, Cao Z, Zhu H, Zhao J (2019) A survey of optimization
10.1007/s00170-019-04136-9 methods from a machine learning perspective. IEEE Transactions
27. Liverani, E., Lutey, A. H. A., Ascari, A., & Fortunato, A. (2020). on Cybernetics 50:1–14. https://doi.org/10.1109/tcyb.2019.
The effects of hot isostatic pressing (HIP) and solubilization heat 2950779
treatment on the density, mechanical properties, and microstructure 42. Sun Y, Moroz A, Alrbaey K (2014) Sliding wear characteristics and
of austenitic stainless steel parts produced by selective laser melting corrosion behaviour of selective laser melted 316L stainless steel. J
(SLM). Int J Adv Manuf Technol, 107(1–2), 109–122. https://doi. Mater Eng Perform 23(2):518–526. https://doi.org/10.1007/
org/10.1007/s00170-020-05072-9, 122 s11665-013-0784-8
28. Lopez-Botello O, Martinez-Hernandez U, Ramírez J, Pinna C, 43. Tucho WM, Lysne VH, Austbø H, Sjolyst-Kverneland A, Hansen
Mumtaz K (2017) Two-dimensional simulation of grain structure V (2018) Investigation of effects of process parameters on micro-
growth within selective laser melted AA-2024. Mater Des 113: structure and hardness of SLM manufactured SS316L. J Alloys
369–376. https://doi.org/10.1016/j.matdes.2016.10.031 Compd 740:910–925. https://doi.org/10.1016/j.jallcom.2018.01.
29. Mathew J, Griffin J, Alamaniotis M, Kanarachos S, Fitzpatrick ME 098
(2018) Prediction of welding residual stresses using machine learn- 44. Waqar S, Sun Q, Liu J, Guo K, Sun J (2020) Numerical investiga-
ing: comparison between neural networks and neuro-fuzzy systems. tion of thermal behavior and melt pool morphology in multi-track
Applied Soft Computing Journal 70:131–146. https://doi.org/10. multi-layer selective laser melting of the 316L steel. Int J Adv
1016/j.asoc.2018.05.017 Manuf Technol. https://doi.org/10.1007/s00170-020-06360-0
30. Mycroft W, Katzman M, Tammas-Williams S, Hernandez-Nava E, 45. Yang N, Zheng Z, Wang T (2019) Model loss and distribution
Panoutsos G, Todd I, Kadirkamanathan V (2020) A data-driven analysis of regression problems in machine learning. In: ACM in-
approach for predicting printability in metal additive manufacturing ternational conference proceeding series, part F1481(1), pp 1–5.
processes. J Intell Manuf 31:1769–1781. https://doi.org/10.1007/ https://doi.org/10.1145/3318299.3318367
s10845-020-01541-w
Int J Adv Manuf Technol (2021) 113:419–433 433

46. Yap CY, Chua CK, Dong ZL, Liu ZH, Zhang DQ, Loh LE, Sing Journal of Laser Applications 31(3):031201. https://doi.org/10.
SL (2015) Review of selective laser melting: materials and applica- 2351/1.5085206
tions. Appl Phys Rev 2(4). https://doi.org/10.1063/1.4935926 51. Zhang Z, Chu B, Wang L, Lu Z (2019a) Comprehensive effects of
47. Zhang B, Li Y, Bai Q (2017) Defect formation mechanisms in placement orientation and scanning angle on mechanical properties
selective laser melting: a review. Chinese Journal of Mechanical and behavior of 316L stainless steel based on the selective laser
Engineering (English Edition) 30(3):515–527. https://doi.org/10. melting process. J Alloys Compd 791:166–175. https://doi.org/10.
1007/s10033-017-0121-5 1016/j.jallcom.2019.03.082
48. Zhang J, Wang P, Gao RX (2019c) Deep learning-based tensile 52. Zhu Y, Zou J, Yang H (2018) Wear performance of metal parts
strength prediction in fused deposition modeling. Comput Ind fabricated by selective laser melting: a literature review选区激光熔化
107:11–21. https://doi.org/10.1016/j.compind.2019.01.011 成形件磨损特性综述. Journal of Zhejiang University-SCIENCE A
49. Zhang J, Song B, Wei Q, Bourell D, Shi Y (2019b) A review of 19(2):95–110. https://doi.org/10.1631/jzus.a1700328
selective laser melting of aluminum alloys: processing, microstruc-
ture, property and developing trends. J Mater Sci Technol 35(2):
Publisher’s note Springer Nature remains neutral with regard to jurisdic-
270–284. https://doi.org/10.1016/j.jmst.2018.09.004
tional claims in published maps and institutional affiliations.
50. Zhang X, Yocom CJ, Mao B, Liao Y (2019d) Microstructure evo-
lution during selective laser melting of metallic materials: a review.

You might also like