Machine learning based approach for surface roughness prediction in precision dental prototyping

Machine Learning


To explore the above-mentioned objective, the Response Surface Methodology (RSM) based technique has been used from DoE for five control factors which are Layer thickness, Infill density, print angle, Exposure duration and Lift speed and for one response variable which is Surface roughness. To optimize experimental efficiency without compromising model reliability, this work adopted a Central Composite Design (CCD) under the RSM framework, which generated 32 statistically optimized combinations. This method provides, Uniform coverage of the multidimensional design space, Controlled variation for accurate model fitting, And significant reduction in experimental load and cost. All in all, thirty-two input parametric combinations are discovered as displayed in Table 1 below. This means that each data set that is generated refers to one exact string of parameter values. While it may appear that the dataset contains near-duplicate observations, it is important to emphasize that the data points are generated through a structured Design of Experiments (DoE) approach, specifically using Central Composite Design (CCD). In such experimental designs, the input parameter combinations may be numerically close but are purposefully selected to capture curvature and interaction effects in the response surface. These are not duplicates but strategically designed data points to reflect the design space adequately. Some near-replicate configurations are embedded within DoE as part of its characteristics to assess curvature effects, check for interaction terms, and enhance the generalizability of the model. These structured variations are not redundancies but essential design features that help ensure robust statistical modeling. These test specimens are printed for SR evaluation but in accordance with the specifications provided in ASTM D695. For the preparation of the test samples, a resin 3D printer is used. For the body of the test samples, a resin material has been utilized. It is a methacrylate based resin which is a subgroup of photopolymer resin and it is commonly used in the medical field due to its high tear strength, feasible viscosity around 700centipoise and biocompatibility making it a suitable choice for dental device fabrication.Viscosity plays a vital role in vat photopolymerization-based additive manufacturing, particularly when high surface accuracy and layer uniformity are required for dental applications. This study employed a resin with a viscosity of approximately 700 cP, which falls within a favorable range for dental printing tasks. To ensure optimal fabrication, a temperature-controlled environment is maintained to avoid unwanted fluctuations in resin viscosity that can affect layer recoating and photopolymerization uniformity. Also, a closed printing chamber helped prevent environmental disturbances (as such airflow, temperature shifts) that might otherwise lead to inconsistent resin flow or layer bonding and consistent and stable exposure and recoating conditions are monitored throughout the print job to support predictable and uniform curing. The initial installation of the design is done through Fusion 360 then adjusted into a printable format hence making input configuration for the 3D printer easy. The next process that is applied to a file in a printable format is the slicing process using the software module that cuts the model into layers of the set height. Other parameters such as layer thickness are set with the help of controls offered by the maker of the machine and then the printing process begins. As for each combination of parameters, test pieces of the resin material were produced with the help of the slicer software of the used resin printer, and then the mentioned values of SR were determined after preparing the test pieces. Figure 1 demonstrates the resin 3D printer used for the study. To reduce the toxicity and improve the general appearance of the specimens, the prints are first rinsed with 90% isopropyl alcohol for 5 min according to the manufacturer’s prescription and then underwent curing for 30 and 60 min48. For post-curing, work conducted multi-stage trials at various exposure durations to identify a curing profile that achieves complete polymerization, dimensional stability, and optical clarity in the printed dental devices. This staged approach also helps reduce internal stresses and minimizes surface deformation, which is crucial for achieving a smooth and accurate finish. As indicated by the experimental results and especially by the visual analysis of the specimens, the samples that were treated with a curing time of 60 min evidenced the best results in terms of quality. Therefore, as a result of the above study, a curing time of 60 min was taken as the reference time in the subsequent specimens. For the rest of the remaining 31 specimens, the same experimental procedure was carried out with the control variables deliberately altered systematically with the purpose of observing a large portion of possible input combinations. After the manufacturing of samples and the subsequent curing process, SR is recorded for each of the specimens to enable the accumulation of data that would be subjected to analysis. In the current article, the interaction between the input parameters and SR is analyzed, and to do so RSM interaction model is used. These models form the basis of subsequent analysis as they unveil future assessments. The developed models are then incorporated with machine learning optimization algorithms.

Table 1 RSM-based design of experiment with significant input parameters and corresponding output.

Experimental setup for measurement of surface roughness

Using the Surfcom hardness tester S130A, the Ra value of the 3D-printed specimen is evaluated. By measuring height changes on a surface, this device uses contact-based techniques. Using a stylus that comes into contact therewith the surface as its working principle, the SR tester conducts a linear scan in which changes in profiling height are captured as electrical impulses or signals, allowing the Ra value to be calculated. For a variety of applications in fields including manufacturing, engineering, and dentistry, the SR tester helps assess and guarantee the required surface quality by giving SR a numerical representation. Only 2D space, either vertically or horizontally, working around a reference surface, may be used to compute these measures. SR, graphically, corresponds to deviations in height relative to a reference plane. The procedure commences by preparing the specimen, securely mounting it on a stable surface to ensure accuracy in measurements. Calibration of the SR tester with a skidding probe is then conducted as per the manufacturer’s instructions to establish a reference plane. To maintain consistency and reliability, the measurement speed is kept hold on 0.30 mm per second. After adjusting the measurement settings, the SR tester is brought into contact with the 3D-printed specimen, and the probe is moved linearly across its surface at a consistent pace. The device records continuous surface profile data, which is subsequently analyzed to finally provide Ra value. This standardized procedure ensures accurate and dependable SR measurements, facilitating the assessment of print quality and performance for 3D-printed objects. For better accuracy of Ra, measurement is performed three times and the average of three is used as the final output.

Fig. 1
figure 1

Resin 3D printer used for specimen preparation62.

Modelling using basic model techniques

ANN

Neural networks are artificial, neurotically connected systems similar to biological neurons that are capable of learning52. They are well-adapted at automation with high-speed analytics using stored experimental data to accomplish tasks in recognizing patterns63,64. The backpropagation (BP) network was widely applied but it has some drawbacks65. Some can be utilized to forecast future results and drive the resolution of experiment design efficiently. ANN is one of the modelling techniques that imitates the human nervous system whereby learning takes place based on the sample data66. It learns from examples that are representative of natural occurrence of physical events or decision-making. As mentioned above, ANNs are particularly good at searching for regularities of relationships between independent and dependent variables and at solving complex data processing tasks without constructing event ontologies52,67. These are the considerations that allow them to work with noisy data proficiently Credit: Fig. 2 shows the graph. An ANN is mainly composed of the input layer, hidden layer and output layer56. Input nodes transmit information to hidden nodes through activation functions, while hidden nodes process this information based on weighted evidence. When a hidden node’s value surpasses a threshold, it triggers output nodes7,52. ANNs require training with numerous cases to function effectively. However, they may struggle with unfamiliar or extreme events, lacking sufficient training data. In this work, an ANN model is constructed to predict the SR of resin specimens fabricated via a resin 3D printer. The model’s input variables include process parameters like LT, ID, ED, LS, and PA, while the target variable is the SR. Data is divided into training and testing sets. ANN training is achieved with the Levenberg-Marquardt algorithm which is a type of backpropagation algorithm characterized by memory efficiency as well as fast computation. Cross-validation is also used for evaluation and the assessment of the model is based on mean squared error (MSE). The Levenberg-Marquardt algorithm is hybrid in that it contains a combination of the gradient descent and the Gauss-Newton methods which are numerical algorithms for calculations. In ANN sigmoid transfer function is applied with the purpose of activation of weights. When splitting data, most of the time, 70% is used to train the model while 30% is used to assess the performance of the model.

As previously said, each layer’s neurons get compensated donations from the previous layer and transfer them to the layer that follows.

$$\:{Y}_{net}\:=\:\sum\:_{i=0}^{n}{X}_{i}{W}_{i}+\:{W}_{0}$$

(1)

calculates the weighted input signal total, which is then sent via the equation’s nonlinear activation function68.

$$\:Y=f\left({Y}_{net}\right)=\frac{1}{1+{e}^{-x}}$$

(2)

The network error was then determined by MSE

$$\text{MSE} = \frac{1}{k}\sum\:_{i=1}^{k}{({Y}_{i}-{O}_{i})}^{2}$$

(3)

considering the relationship between the expected and actual results. In most cases, even after the preparation cycle is over, this inaccuracy achieves a satisfactory level69.

$$\:var\left(y\right)=\:\text{E}\left[{Y}^{2}\right]-E{\left[Y\right]}^{2}$$

(4)

$$\:{R}^{2}=1-\frac{MSE}{var\left(y\right)}$$

(5)

$$\:RMSE=\:\sqrt{\frac{1}{n}\:\left(\sum\:_{i=1}^{n}{({x}_{i}^{actual}-\:{x}_{i}^{predicted})}^{2}\right)}$$

(6)

This division helps the model acquire the set of patterns from the sizeable number of examples during training and keep aside some for checking its performance of the new set of patterns it has not been trained with. Training and testing are perhaps the basic steps that are known in the context of ANN development. In the training process, the parameters of the model are updated step-by-step by using the training data in order to achieve minimum mean squared error. The testing procedure checks the model’s effectiveness on data that have not been used in its training in order to determine how it will perform in general cases. The choice of the number of neurons and the hidden layers within an ANN is one of the significant factors that determines the accuracy of prediction70. The size and the depth of the networks together determine how effectively the architecture of the neural network can learn the complexity from the given data set. Finding the appropriate number of layers and nodes in a model and the sequences in which they are connected is vital to get high accuracy from the model. This work investigates the influence of neuron quantity and hidden layers on the accuracy of the neural network to predict the trend through the use of the R2 value.

ANNs were initially inspired by the biological brain’s computational capabilities but diverge significantly in architecture55,71. ANNs handle large, high-dimensional datasets through interconnected layers of nodes. The network typically consists of input, hidden, and output layers, with each layer containing interconnected nodes that process data through mathematical functions55. Nodes activate based on weighted inputs, transforming data as it progresses through the layers. Hidden layers, whose values are not directly specified by the training data, contribute to the network’s ability to learn complex patterns. ANNs autonomously acquire and process information, making predictions without needing explicit mathematical definitions or extensive experimentation54,67. Table 2 depicts various ANN architecture performance, where P represents parameter, HL Hidden layer and N neurons. Figure 2 represents graph for ANN best performance metrices.

Table 2 ANN architecture variations and corresponding performance metrices.
Fig. 2
figure 2

Graph representing relation between actual and predicted results from ANN.

SVR

Support Vector Regression (SVR) is a type of supervised learning method that is suitable for regression analysis since the intent is to predict the continuous values for the dependent variable and intends to transform the input variables to dependent variables by constructing the mapping function, and at the same time, the generalization of the constructed machine learning model controls the total mathematical error within a fixed or tenable range30. This is realized by finding the maximum-margin hyperplane that satisfies the data points within a certain distance from the hyperplane and the support vectors are the data points closest to this hyperplane72,73.

SVR is a regression algorithm that includes the fuzzy factor in the sense of margin of tolerance known as epsilon (ε), whose aim is to minimize errors while confining output to a certain margin68,74,75. The main idea of SVR presupposes the use of the so-called support vectors which are the points belonging to the area close to a hyperplane that defines the regression function. Its purpose is to compute a hyperplane (or more than one if the association is nonlinear) through the points that enable categorization to fall inside a margin of error72,76. Due to its analysed ability SVR employs the so-called kernel trick and transforms the input variables into the high-dimensional space75,77. It minimizes an objective function that caps the errors to a certain amount outside a margin and may use some kind of regularization to avoid over-fitting. While in training, SVR finds the support vectors as well as the hyperplane(s) that provide the best margin using methods of optimization46,70,78.

$$\:y=\left({K}_{xi}*{W}_{jk}\right)+b$$

(7)

SVR works by finding the optimal hyperplane(s) that fit the data within a specified margin of tolerance. It involves data preprocessing to ensure uniform scaling, followed by kernel selection, where non-linear relationships are addressed using kernel functions like the radial basis function here73,77. Model training aims to minimize error within the tolerance margin, with techniques like quadratic programming used for optimization. Epsilon defines the acceptable error range, and support vectors, closest to the hyperplane, influence the regression function. Finally, the model is evaluated using metrics like RMSE and R2 to ensure optimal performance. SVR balances close data fitting with specified error tolerance, even in non-linear relationships.

If the kernel function is Kxi, then the SVM network’s bias term is b. The weight vector is referred to as Wjk. Lagrange multipliers are indicated by Kx and W. An input vector is mapped to a high-dimensional feature space via the nonlinear function known as the Kxi. The following is one way to express the nonlinear function method’s equation46:

$$\:{K}_{xi}={e}^{-{\upgamma\:}{\left\| {P}_{i}-{Y}_{i} \right\| }^{2}} \quad \gamma >0 \; and \; i=1,2,3,, n$$

(8)

In order to perform these steps, the following steps are followed in order to select the model with the lowest RMSE and the highest R2: First of all, divide the data set into the training and test sets. Then, proceed to the hyperparameter grid search where one adjusts C and gamma for the RBF kernel only. The best hyperparameters are those that provide the lowest value of RMSE and the highest R2. The following hyperparameters should be used in tuning a new SVR model on the entire training set: Finally, on the test set come to evaluate this model to obtain the final RMSE and R2 values. It was observed that the model with the low RMSE and the high R2 on the test set was the best model to select hence in Table 3 below, the best model is highlighted. This systematic approach makes it possible of arriving at the right SVR model to use in predicting the target variable on unseen data. Figure 3 shows the results of data correlation from SVR modelling.

In SVR, it is the regression function which lies within the margin of tolerance given ‘epsilon’. It seeks to achieve a small difference between the model predicted values and the actual observations bearing in mind this margin of error. Margin is a distance to and from the hyperplane; Support vectors are the data points that lie in the vicinity of the hyperplane and constitute its reference points and the line or plane within which acceptable error lies. These play an important role in defining the hyperplane(s) and the number of parameters in the model, respectively. Essentials of SVR Besides, in the SVR model, only support vectors have non-zero coefficients, which is beneficial to improve the generality of the model.

Table 3 Hyperparameter tuning and their corresponding performance metrices for SVR.
Fig. 3
figure 3

Graph representing actual vs. predicted outcome variation from SVR.

Decision tree

Decision trees resemble flowcharts in structure, with terminal nodes signifying class names, branches displaying test results, and interior nodes representing test characteristics79. They’re valuable for mapping decisions and their consequences, making predictions, and guiding material and process selection80. In 3D printing, where parameter correlations are complex, decision trees aid in predicting outcomes. They’re widely used in decision-making involving AI by constructing predictive trees81. Decision trees are utilized in 3D printing businesses to assist customers in material selection82. Decision tree regression (DTR) is a crucial technique for prediction83. It comprises a root node, internal nodes, and leaf protuberances, dividing sample space based on input attribute values84. Each internal node splits the space using input attributes subjected to specific functions, contributing to accurate modelling46.

$$\:SDR=SD\left(T\right)-\sum\:\left|\frac{{T}_{i}}{T}\right|SD\left|{T}_{i}\right|$$

(9)

SDR: Standard Deviation Reduction.

SD(T): The standard deviation of the target variable before the split (for the parent node).

T: The entire dataset (or node) before the split.

Ti : The subset of the dataset after the split (the child node).

SD(Ti): The standard deviation of the target variable within the child node Ti.

\(\:\frac{\left|{T}_{i}\right|}{\left|T\right|}\): The proportion of instances that end up in child node Ti compared to the total instances in the parent node.

Starting at the root node, the algorithm moves up the tree according to the input feature values until it reaches a leaf node85. A projected output value is eventually reached at the leaf node after judgments are taken at each stage in accordance with the criteria established by the features82. Converging values data are shown in Table 4, and a graph is used to illustrate convergence in Fig. 4.

Table 4 Table depicting performance metrices at various depths.
Fig. 4
figure 4

Convergence of performance metrices at various depth of trees.

Modelling using ensemble techniques

Random forest

A popular ensemble learning technique in data mining and visualisation, Random Forest (RF) combines many decision trees for increased accuracy82. Thus, it might be used for both classification and regression problems when the forecasts are calculated as the mean of all the forecasts obtained with using all the generated trees46. RF is present in numerous fields and industries and is, therefore, under observation. For better performance and to predict the model for different setting with high conclusiveness, RF is generalized with other methods like NN, kNN and RR83. Random Forest Regression (RFR) builds several models of decision trees independently with different observation samples, which offers a good model70. The Random Forest Regression (RFR) algorithm is highly valued for its function to assess a database multiple model so deeply. Due to improved performance in both regression and classification issues, which is more time-efficient than other methods, this method has a more advantage57. In comparison with the RFM, RFR has a higher speed of prediction and fewer regularization parameters, thus making it more suitable for solving multidimensional problems. That is why, the RFR model reduces the degree of overfitting, which is characteristic of decision trees. This is done by building many separately developed decision trees where each tree is developed with random subsamples of observations and features from the training data sample. It involves the averages of the estimate of each tree in the regression terminologies86. The number of attributes randomly selected overall predictor variables at the nodes and the number of trees within the canopy are the two key decision parameters of RFR. These are some of the parameters that were used to be sensitive in this model and improved to enhance the ability of the model to predict accurately.

A powerful learning method known as Random Forest is composed with decision trees that are constructed independently on random samples of features of the data87. Decision trees propose the partition of data in a manner that will facilitate the acquisition of more information, or minimization, on the other hand, of impurity based on a set of feature values. Random forest limits trees on the specific nodes because it guarantees tree diversity through the use of bootstrapping and selecting features at random. Thus, in regression, they predict numerations, which are numbers, and the last prognoses are the mode or average varieties83. To avoid overfitting, Random Forest uses bagging, where the model produces numerous trees, and the result is a projection of the average of all the trees obtained. Some of the hyperparameters include the number of trees that are to be generated and the depth of the trees, that is, the number of levels that a tree can possess, which can be tuned to improve the model’s efficiency88. It also helps in determining the importance of the features, which can be useful for selecting the features or for understanding the pattern in the data set. One of the most used and highly reliable methods of machine learning, Random Forest can be applied to various domains such as finance and healthcare due to its high efficiency and easy implementation ability.

In a decision tree every node refers to a test that is made depending on a feature and the results are further predictions or forecasts. Decision trees are hierarchical structures. Random Forest is one of the assembled learning models that generates a number of decision trees utilizing bootstrap sampling and selecting random features. When only some of the characteristics are taken randomly throughout the split, the overfitting is minimized and the number of trees is maximized. Bagging is used just to derive a set of a number of decision trees, each of which minimizes variance and increases generalization. In order to fine-tune models, parameters, including the number of trees and trees’ depth, should be most important and it can be done using such methods as the grid search or the random search. This provides an insight into the random forest and shows how decision trees, bootstrapping, ensemble learning, and tuning of hyperparameters are used to produce efficient machine learning models.

Tuning hyperparameters is a very important procedure to make Random Forest as efficient as possible. This process involves the selection of hyperparameters and provides some values to the parameters, such as estimators and adept. When it comes to the choice of an evaluation measure in regression analysis, an appropriate one, say RMSE and R2 is used. All the configuration of the six set parameters is worked out by the grid search method out of which the best configuration is selected out of it and graph is plotted in Fig. 5. In order to ensure that the results will be applicable to a more general real-world setting and show good performance in situations similar to those in ‘real life’, a final model with optimal hyperparameters has been trained on the entire dataset to make sure that it is adjusted for the chosen problem, and then evaluated on the test set. It also greatly enhances challenging circumstances when completing this methodology ensures that the applications are resistant and boosts model efficiency.

R2: 0.9864165223734502, RMSE: 0.010734192405298678.

Fig. 5
figure 5

Actual vs. predicted outcome fitting from Random forest modelling.

XGboost

XGBoost is an enhanced version of the Gradient Boosting algorithm also used for the construction of the models of the regression type of supervised machine learning89. Gradient boosting technique is a type of machine learning technique in which a model is built iteratively by adding further ‘weak’ models to the existing models90. XGBoost is known for two major attributes: great accuracy in the results and speedy computation; thus, XGboost is advisable to use for regression predictive modelling. As from different reviews, it is more accurate than other models and, in some sense, the time taken in order to run the model is shorter, especially when working with structured tabular data. Some of the components of XGBoost include base learners as well as the objectives that come with a penalty and that of a loss function57. It thus defines other variables’ errors between the expected and actual results, which will assist the model in preventing errors88. The XGBoost also aids in establishing a number of base learners to increase the accuracy of prediction58. The aim of the method is to select base learners that will help in making better guesswork in the end by averting the resulting errors that may be done.

XGBoost is found to be better than other algorithms in terms of accuracy, training time, the interaction between the independent variable and the dependent variable, explaining the ability of the model and very few hyperparameters are to be tuned88. This is because, in a case where there is a relation in the variables used in the analysis, then the regression is capable of capturing nonlinear equations59. This makes it a preferred choice among researchers for predicting output variables based on input variables. XGBoost’s interpretability is comparable to random forests, but it typically achieves higher predictive accuracy when properly trained with corresponding hyperparameters87. In manufacturing domains, XGBoost has been widely applied for various tasks. For instance, to develop a real-time Industry 4.0 customization framework, achieving synchronization between customer inputs and manufacturing process outputs, to predict geometry in additive manufacturing, demonstrating its superiority over artificial neural networks even with small datasets. In material science, where relationships between properties, compositions, and manufacturing parameters are complex, XGBoost has been utilized effectively91.

XGBoost demonstrates superiority over other machine learning algorithms such as support vector machines and radial function models in various applications. In quality monitoring, XGBoost-based models effectively reinforce quality in machining operations. Additionally, XGBoost has been utilized for the prediction of material characteristics, yielding excellent coefficient of determination values. Despite its success in discrete manufacturing domains, its application for real-time machining data prediction, such as predicting SR remains limited92. The corresponding graph representing the best correlation is shown in Fig. 6.

R2: 0.9985805264402483, RMSE: 0.0034699845680639147.

Fig. 6
figure 6

Actual vs. predicted outcome variation from XGboost.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *