# An Automated Design Method for Plane Trusses Based on User Preference Information
## 3 User Preference Prediction Model
### Selection of Machine Learning (ML) Techniques  
To develop the prediction models of preference, two classical ML techniques, i.e., back propagation neural network (BPNN) and random forest (RF), are used. They are briefly explained in the following. BPNN is a common type of artificial neural network. The basic network structure of BPNN includes an input layer, one or more hidden layers, and an output layer. Each layer contains several neurons that connect to neurons in the adjacent layers with connection weights. During the training phase, the input data is presented to the input neurons. The signals received by each neuron are processed through a weighted sum and converted as an output by an activation function. Then, the output is transmitted to the neurons  
Figure 5: Screenshots of the interaction system: (a) Selection interface; (b) Evaluation interface. in the adjacent layer. This process continues until the outputs are produced through the output neurons [45]. BPNN uses a function to gradually reduce the error between the actual outputs and the target outputs (labels in this study) by adjusting the connection weights. RF [46] is an ensemble learning method composed of a number of decision trees. Each tree is constructed based on a subset of features that are randomly selected and a data subset that is randomly selected from the training data set. The output of RF is the majority or the average of the results of all decision trees. RF shows effective and robust performance since it can overcome the overfitting problem of decision trees. Both BPNN and RF use the 45 training groups to generate the prediction models. In order to compare the performance between the two methods, two numerical experiments are conducted. In the first one, the reappearance ability of the methods is evaluated. The training groups are employed as input again for the corresponding prediction models to get the outputs, which are continuous values ranging from 1 to 3. On the one hand, the mean square error (MSE) between the predicted and targeted outputs is calculated (Equation (9)). On the other hand, the outputs are rounded to integers and then compared with the labels to obtain the reappearance accuracy (RA, Equation (10)). \[MSE=\frac{\sum\limits_{i=1}^{N}{(y_{i}-\hat{y_{i}})^{2}}}{N}, \tag{9}\]  
\[RA=\frac{n_{c}}{N}\times 100\%, \tag{10}\]  
where \(N\) = number of samples, \(y_{i}\) = targeted value of the \(i\)th sample, \(\hat{y_{i}}\) = predicted value of the \(i\)th sample, and \(n_{c}\) = number of correct predictions. In the second experiment, the validation groups are used as input to evaluate the prediction ability of the methods. Besides the MSE index, prediction accuracy (PA), which has a similar definition to RA, and preference accuracy (PreA, Equation (11)) are also calculated. PreA focuses on the model's ability to correctly identify the \"Preferred\" and \"Acceptable\" samples for users, which is conducive to generating satisfactory structures. \[PreA=\frac{n_{pc}}{n_{p}}\times 100\%, \tag{11}\]  
where \(n_{p}\) = number of samples with \"Preferred\" or \"Acceptable\" labels, and \(n_{pc}\) = number of samples that are correctly predicted. Based on the evaluation information provided by the students, the results of the indexes are summarized for each experiment. Taking the No.2 student as an example, Figure 6 illustrates the index values calculated with the nine training groups in the first experiment, whereas Figure 7 depicts the results based on the nine validation groups in the second experiment. Figure 6 compares the reappearance ability of the two methods based on the No. 2 student's evaluation information. It is observed in Figure 6a that the PA values of the RF models are not less than those of the BPNN models in eight groups. The BPNN model achieves a higher PA value only in Group 5. In Figure 6b, obvious differences exist in the MSE values between the two methods for Group 2 and Group 5. This is consistent with the performance of the two methods indicated by the RA index.