Method, device, equipment and medium for expanding sample verification based on neural network
By training and evaluating the hierarchical feedforward neural network based on a neural network method, the optimal network is determined for sample expansion and verification, which solves the problems of time-consuming and labor-intensive surface roughness evaluation in milling processing and low reliability of expanded sample verification, and improves the reliability and objectivity of verification.
Patent Information
- Application Number
- CN202510019197.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-01-07
AI Technical Summary
In the existing technology, the orthogonal cutting surface roughness evaluation of milling processing is time-consuming, labor-intensive and unreliable. The reliability of expanded sample verification is also low, and it is difficult to verify its effectiveness manually.
A neural network-based method is used to train and evaluate multiple hierarchical feedforward neural networks to determine the optimal neural network, predict the expanded input parameters, form expanded experimental data, and merge the training sample sets to form a synthetic sample set to further train and evaluate the effectiveness of the expanded samples.
The verification reliability of the expanded sample is improved, interference from invalid samples is avoided, objectivity is higher, and the problem of low reliability of expanded sample verification in the existing technology is improved.
Smart Images

Figure CN119939187B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of neural network technology, and more specifically, to a neural network-based extended sample verification method and apparatus, equipment, and medium. Background Art
[0002] For orthogonal cutting in milling, the roughness of the cutting surface is one of the important parameters that characterize the quality of the processed product, or in other words, different roughness is required based on different needs. In traditional technical solutions, the roughness of the cutting surface is generally evaluated by corresponding inspectors, which is time-consuming, labor-intensive and unreliable. Therefore, in the prior art, images of the cutting surface can be captured, and the captured images can be analyzed to obtain the corresponding cutting surface roughness. In this way, efficiency can be improved and labor costs can be reduced to a certain extent. However, it requires more computing resources (image recognition process).
[0003] However, the inventors have found through research that there is a correlation between the cutting surface roughness of the product and the parameters of the milling process. In this way, the cutting surface roughness can be predicted by analyzing the relationship between the two. However, more sample data is needed to learn the corresponding relationship, and the cost of orthogonal cutting experiments in milling processing is relatively high, making it difficult to obtain more samples. Therefore, it is necessary to expand the samples, and the validity of the expanded samples is an important basis for subsequent learning. If manual verification of the validity is used, it is easy to have low reliability problems. Therefore, there is an urgent need for a solution that can reliably verify the validity of the expanded samples. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide an expanded sample verification method and device, equipment and medium based on a neural network to improve the problem of low reliability of expanded sample verification in the prior art.
[0005] To achieve the above objectives, this application adopts the following technical solutions:
[0006] A neural network-based extended sample verification method, comprising:
[0007] Determining a training sample set and a validation sample set based on a plurality of original experimental data generated by an orthogonal cutting experiment of a milling process, wherein the original experimental data included in the training sample set and the validation sample set are at least partially different, and the original experimental data include input parameters and output parameters, the input parameters include at least one parameter of a spindle speed, a feed rate, and a cutting depth, and the output parameter includes a cutting surface roughness;
[0008] Based on the training sample set, a plurality of pre-constructed first hierarchical feedforward neural networks are trained to form a plurality of trained first hierarchical feedforward neural networks, wherein, during the training process, the first hierarchical feedforward neural networks output corresponding predicted output parameters based on input parameters, and update network parameters of the first hierarchical feedforward neural networks based on errors between the predicted output parameters and the output parameters;
[0009] Evaluating the plurality of trained first hierarchical feedforward neural networks based on the validation sample set to obtain a first evaluation result, and determining an optimal first hierarchical feedforward neural network among the plurality of trained first hierarchical feedforward neural networks based on the first evaluation result;
[0010] Using the optimal first hierarchical feedforward neural network, predicting the constructed expanded input parameters, outputting corresponding expanded output parameters, combining the expanded input parameters and the expanded output parameters to form corresponding expanded experimental data, and merging the expanded experimental data and the training sample set to form a corresponding synthetic sample set;
[0011] Based on the synthetic sample set, training a plurality of pre-constructed second hierarchical feedforward neural networks to form a plurality of trained second hierarchical feedforward neural networks;
[0012] Based on the validation sample set, the multiple trained second hierarchical feedforward neural networks are evaluated to obtain a second evaluation result, and based on the second evaluation result and the first evaluation result, the validity of the expanded experimental data is determined, wherein the first evaluation result and the second evaluation result are used to reflect the prediction accuracy of the corresponding hierarchical feedforward neural network.
[0013] In a preferred embodiment of the present invention, in the above-mentioned neural network-based expanded sample verification method, the step of training a plurality of pre-constructed first hierarchical feedforward neural networks based on the training sample set to form a plurality of trained first hierarchical feedforward neural networks includes:
[0014] Determining the number of input parameters and output parameters included in the original experimental data in the training sample set, and obtaining the corresponding input number and output number;
[0015] Determining the number of nodes in the input layer of a first hierarchical feedforward neural network to be constructed based on the number of inputs, and determining the number of nodes in the output layer of a second hierarchical feedforward neural network to be constructed based on the number of outputs;
[0016] Based on the input quantity and the output quantity, determining the node quantity interval of the hidden layer of the first hierarchical feedforward neural network to be constructed;
[0017] Constructing a plurality of different first hierarchical feedforward neural networks based on the number of nodes in the input layer, the number of nodes in the output layer, and the interval of the number of nodes in the hidden layer, wherein the number of nodes in the hidden layer of each first hierarchical feedforward neural network falls within the interval of the number of nodes, and the number of nodes in the hidden layer of each two first hierarchical feedforward neural networks is different;
[0018] Based on the training sample set, the multiple first hierarchical feedforward neural networks are trained to form multiple trained first hierarchical feedforward neural networks.
[0019] In a preferred embodiment of the present application, in the above-mentioned neural network-based expanded sample verification method, the step of determining the interval of the number of nodes of the hidden layer of the first hierarchical feedforward neural network to be constructed based on the number of inputs and the number of outputs includes:
[0020] performing a sum calculation on the input quantity and the output quantity to obtain a first parameter, and performing a square root operation on the target quantity to obtain a second parameter;
[0021] The second parameter and a predetermined adjustment parameter are summed to obtain a node number interval of a hidden layer of a first hierarchical feedforward neural network to be constructed, wherein the adjustment parameter is a constant in the range of [0, 10].
[0022] In a preferred embodiment of the present application, in the above-mentioned neural network-based expanded sample verification method, the step of evaluating the multiple trained first hierarchical feedforward neural networks based on the verification sample set to obtain a first evaluation result, and, based on the first evaluation result, determining the optimal first hierarchical feedforward neural network among the multiple trained first hierarchical feedforward neural networks includes:
[0023] For any trained first hierarchical feedforward neural network, using the trained first hierarchical feedforward neural network, predicting the input parameters included in each original experimental data in the validation sample set to obtain corresponding predicted output parameters, and, based on the predicted output parameters and the output parameters included in each original experimental data in the validation sample set, respectively calculating corresponding prediction errors and determination coefficients, wherein the determination coefficient is an evaluation parameter of the ability of the trained first hierarchical feedforward neural network to reproduce the original experimental data;
[0024] Determining a first evaluation result corresponding to the trained first hierarchical feedforward neural network based on the prediction error and the determination coefficient;
[0025] After determining the first evaluation result corresponding to each trained first hierarchical feedforward neural network, the trained first hierarchical feedforward neural network corresponding to the first evaluation result having the minimum value is determined as the optimal first hierarchical feedforward neural network.
[0026] In a preferred embodiment of the present invention, in the above-mentioned neural network-based expanded sample verification method, for any one trained first hierarchical feedforward neural network, using the trained first hierarchical feedforward neural network to predict the input parameters included in each original experimental data in the verification sample set to obtain corresponding predicted output parameters, and, based on the predicted output parameters and the output parameters included in each original experimental data in the verification sample set, respectively calculating the corresponding prediction error and determination coefficient, the steps include:
[0027] For any trained first hierarchical feedforward neural network, using the trained first hierarchical feedforward neural network, predicting the input parameters included in each original experimental data in the verification sample set to obtain corresponding predicted output parameters;
[0028] For each original experimental data in the validation sample set, determining a difference between an output parameter included in the original experimental data and a corresponding predicted output parameter, and calculating a ratio between the difference and the output parameter, and using an absolute value of the ratio as a local prediction error of the trained first hierarchical feedforward neural network relative to the original experimental data, and calculating a mean of the local prediction errors of the trained first hierarchical feedforward neural network relative to each original experimental data to obtain a corresponding prediction error;
[0029] Determine the mean of the output parameters included in each original experimental data in the verification sample set, and, for each original experimental data in the verification sample set, determine the square value of the difference between the output parameter included in the original experimental data and the mean, to obtain a corresponding first square value, and determine the square value of the difference between the predicted output parameter corresponding to the original experimental data and the mean, to obtain a corresponding second square value, and determine the ratio between the sum of the second square values corresponding to each original experimental data in the verification sample set and the sum of the first square values corresponding to each original experimental data in the verification sample set, to obtain a corresponding determination coefficient.
[0030] In a preferred embodiment of the present application, in the above-mentioned neural network-based expanded sample verification method, the step of determining the first evaluation result corresponding to the trained first hierarchical feedforward neural network based on the prediction error and the determination coefficient includes:
[0031] Determining weighting coefficients corresponding to the prediction error and the determination coefficient respectively, wherein a sum of the weighting coefficients corresponding to the prediction error and the determination coefficient is equal to 1, and a value range of the weighting coefficients corresponding to the prediction error and the determination coefficient is [0, 1];
[0032] Based on the corresponding weighting coefficient, the prediction error and the determination coefficient are weighted and summed to obtain a first evaluation result corresponding to the trained first hierarchical feedforward neural network.
[0033] In a preferred embodiment of the present invention, in the above-mentioned neural network-based expanded sample verification method, the step of evaluating the plurality of trained second hierarchical feedforward neural networks based on the verification sample set to obtain a second evaluation result, and determining the validity of the expanded experimental data based on the second evaluation result and the first evaluation result includes:
[0034] Based on the verification sample set, evaluating the plurality of trained second hierarchical feedforward neural networks to obtain a second evaluation result;
[0035] The first evaluation result and the second evaluation result are compared in size, and when the first evaluation result is greater than the second evaluation result, the expanded experimental data is determined to be valid, and when the first evaluation result is less than the second evaluation result, the expanded experimental data is determined to be invalid, wherein the first evaluation result and the second evaluation result have a negative correlation with the prediction accuracy of the corresponding hierarchical feedforward neural network.
[0036] The present application also provides an expanded sample verification device based on a neural network, comprising:
[0037] a sample set determination module, configured to determine a training sample set and a validation sample set based on a plurality of original experimental data generated by an orthogonal cutting experiment of a milling process, wherein the original experimental data included in the training sample set and the validation sample set are at least partially different, and the original experimental data include input parameters and output parameters, the input parameters include at least one parameter of a spindle speed, a feed rate, and a cutting depth, and the output parameter includes a cutting surface roughness;
[0038] a first neural network training module, configured to train a plurality of pre-constructed first hierarchical feedforward neural networks based on the training sample set to form a plurality of trained first hierarchical feedforward neural networks, wherein during the training process, the first hierarchical feedforward neural networks output corresponding predicted output parameters based on input parameters, and update network parameters of the first hierarchical feedforward neural networks based on an error between the predicted output parameters and the output parameters;
[0039] a neural network determination module, configured to evaluate the plurality of trained first hierarchical feedforward neural networks based on the validation sample set to obtain a first evaluation result, and determine an optimal first hierarchical feedforward neural network among the plurality of trained first hierarchical feedforward neural networks based on the first evaluation result;
[0040] a sample set expansion module, configured to predict the constructed expanded input parameters using the optimal first hierarchical feedforward neural network, output corresponding expanded output parameters, combine the expanded input parameters and the expanded output parameters to form corresponding expanded experimental data, and merge the expanded experimental data with the training sample set to form a corresponding synthetic sample set;
[0041] A second neural network training module is used to train a plurality of pre-constructed second hierarchical feedforward neural networks based on the synthetic sample set to form a plurality of trained second hierarchical feedforward neural networks;
[0042] A sample validity determination module is used to evaluate the multiple trained second hierarchical feedforward neural networks based on the verification sample set to obtain a second evaluation result, and to determine the validity of the expanded experimental data based on the second evaluation result and the first evaluation result, wherein the first evaluation result and the second evaluation result are used to reflect the prediction accuracy of the corresponding hierarchical feedforward neural network.
[0043] Based on the above, the present application further provides an electronic device, including:
[0044] memory for storing computer programs;
[0045] A processor connected to the memory is used to execute the computer program stored in the memory to implement the above-mentioned neural network-based expanded sample verification method.
[0046] On the basis of the above, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is run, it executes the various steps of the above-mentioned neural network-based expanded sample verification method.
[0047] The neural network-based expanded sample verification method, device, equipment and medium provided in the present application can evaluate multiple trained first-layer feedforward neural networks to obtain a first evaluation result and determine the optimal first-layer feedforward neural network; use the optimal first-layer feedforward neural network to predict the expanded input parameters to form expanded experimental data, merge the expanded experimental data and the training sample set to form a synthetic sample set; based on the synthetic sample set, train multiple second-layer feedforward neural networks; evaluate multiple trained second-layer feedforward neural networks to obtain a second evaluation result, and determine the validity of the expanded experimental data based on the second evaluation result and the first evaluation result. Based on the above content, on the one hand, by first training the optimal first-layer feedforward neural network to expand the sample, the validity of the expanded sample can be guaranteed to a certain extent, thereby avoiding the interference caused by too many invalid samples in the verification process, so that the reliability of the verification can be guaranteed. On the other hand, by comparing the prediction accuracy of the neural networks trained on the samples before and after expansion, the effectiveness of the corresponding samples can also be reflected, making it more objective than the technical means of manual analysis, thereby ensuring the reliability of verification and improving the problem of low reliability of verification of expanded samples in existing technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings.
[0049] Figure 1 This is a structural block diagram of the electronic device provided in an embodiment of the present application.
[0050] Figure 2 A flowchart of a neural network-based expanded sample verification method provided in an embodiment of the present application.
[0051] Figure 3 A schematic diagram of the verification process of the expanded sample set provided in an embodiment of the present application.
[0052] Figure 4 This is a schematic diagram of some experimental data provided in the examples of this application.
[0053] Figure 5 A parameter diagram of the network architecture of the neural network provided in an embodiment of the present application.
[0054] Figure 6 A schematic diagram of the verification results provided in the embodiment of the present application.
[0055] Figure 7 A schematic diagram of the expanded input parameters provided in an embodiment of the present application.
[0056] Figure 8 A schematic diagram of some expanded samples provided in an embodiment of the present application.
[0057] Figure 9 A schematic diagram of another verification result provided in an embodiment of the present application.
[0058] Figure 10 A block diagram of a neural network-based expanded sample verification device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0060] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.
[0061] like Figure 1 As shown, an embodiment of the present application provides an electronic device, wherein the electronic device may include a memory, a processor, and an expanded sample verification device based on a neural network.
[0062] In detail, the memory and the processor are electrically connected directly or indirectly to realize data transmission or interaction. For example, the memory and the processor can be electrically connected through one or more communication buses or signal lines. The neural network-based expanded sample verification device includes at least one software function module stored in the memory in the form of software or firmware. The processor is used to execute the executable computer program stored in the memory, for example, the software function module and computer program included in the neural network-based expanded sample verification device, so as to implement the neural network-based expanded sample verification method provided in the embodiment of the present application.
[0063] Optionally, the memory may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0064] Furthermore, the processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a system on chip (SoC), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0065] I understand. Figure 1 The structure shown is only for illustration, and the electronic device may also include Figure 1 More or fewer components than shown, or with Figure 1 The different configurations shown may, for example, further include a communication unit for exchanging information with other devices.
[0066] Combine Figure 2 The embodiment of the present application also provides a neural network-based extended sample verification method applicable to the above electronic device. The method steps defined in the process related to the neural network-based extended sample verification method can be implemented by the electronic device. Figure 2 The specific process shown is explained in detail.
[0067] Step S110 : determining a training sample set and a validation sample set based on a plurality of original experimental data generated by the orthogonal cutting experiment of the milling process.
[0068] In an embodiment of the present application, the electronic device may determine a training sample set and a validation sample set based on a plurality of original experimental data generated by an orthogonal cutting experiment of a milling process. The original experimental data included in the training sample set and the validation sample set are at least partially different (exemplarily, may be completely different), and the original experimental data include input parameters and output parameters, the input parameters include at least one parameter of spindle speed, feed rate, and cutting depth (exemplarily, may include three parameters), and the output parameter (label) includes cutting surface roughness.
[0069] Step S120 : Based on the training sample set, the pre-constructed multiple first hierarchical feedforward neural networks are trained to form multiple trained first hierarchical feedforward neural networks.
[0070] In an embodiment of the present application, after obtaining a training sample set, the electronic device can train a plurality of pre-constructed first hierarchical feedforward neural networks based on the training sample set to form a plurality of trained first hierarchical feedforward neural networks. During the training process, the first hierarchical feedforward neural network outputs corresponding predicted output parameters based on the input parameters, and updates the network parameters of the first hierarchical feedforward neural network based on the error between the predicted output parameters and the output parameters, that is, updates the network parameters of the first hierarchical feedforward neural network in a direction that reduces the error until the error converges or the number of updates reaches a threshold.
[0071] Step S130: Based on the verification sample set, the multiple trained first hierarchical feedforward neural networks are evaluated to obtain a first evaluation result, and based on the first evaluation result, an optimal first hierarchical feedforward neural network is determined among the multiple trained first hierarchical feedforward neural networks.
[0072] In an embodiment of the present application, after the training of the first hierarchical feedforward neural network is completed, the electronic device can evaluate the multiple trained first hierarchical feedforward neural networks based on the verification sample set to obtain a first evaluation result, and, based on the first evaluation result, determine the optimal first hierarchical feedforward neural network among the multiple trained first hierarchical feedforward neural networks, such as a first hierarchical feedforward neural network with the highest prediction accuracy.
[0073] Step S140, using the optimal first hierarchical feedforward neural network, predict the constructed expanded input parameters, output corresponding expanded output parameters, and combine the expanded input parameters and the expanded output parameters to form corresponding expanded experimental data, and merge the expanded experimental data and the training sample set to form a corresponding synthetic sample set.
[0074] In an embodiment of the present application, after obtaining the optimal first hierarchical feedforward neural network, the electronic device can use the optimal first hierarchical feedforward neural network to predict the constructed expanded input parameters (such as multiple groups of different levels of spindle speed, feed speed, and cutting depth configured by the corresponding user), output the corresponding expanded output parameters (i.e., the corresponding cutting surface roughness), and combine the expanded input parameters and the expanded output parameters to form corresponding expanded experimental data, and merge the expanded experimental data and the training sample set to form a corresponding synthetic sample set.
[0075] Step S150 : Based on the synthetic sample set, a plurality of pre-constructed second hierarchical feedforward neural networks are trained to form a plurality of trained second hierarchical feedforward neural networks.
[0076] In an embodiment of the present application, after forming a synthetic sample set, the electronic device can train a plurality of pre-constructed second hierarchical feedforward neural networks based on the synthetic sample set (the training process is as described above) to form a plurality of trained second hierarchical feedforward neural networks.
[0077] Step S160: Based on the verification sample set, the plurality of trained second hierarchical feedforward neural networks are evaluated to obtain a second evaluation result, and based on the second evaluation result and the first evaluation result, the validity of the expanded experimental data is determined.
[0078] In an embodiment of the present application, after the second hierarchical feedforward neural network training is completed, the electronic device can evaluate the multiple trained second hierarchical feedforward neural networks based on the validation sample set to obtain a second evaluation result (the determination method of the first evaluation result is the same as that described below), and, based on the second evaluation result and the first evaluation result, determine the validity of the expanded experimental data. The first evaluation result and the second evaluation result are used to reflect the prediction accuracy of the corresponding hierarchical feedforward neural network.
[0079] Based on the above, on the one hand, by first training the optimal first-layer feedforward neural network to expand the sample, the validity of the expanded sample can be guaranteed to a certain extent, thereby avoiding the interference caused by too many invalid samples in the verification process, so that the reliability of the verification can be guaranteed. On the other hand, by comparing the prediction accuracy of the neural networks trained on the samples before and after expansion, the validity of the corresponding samples can also be reflected, making it more objective than the technical means of manual analysis, thereby ensuring the reliability of the verification and further improving the problem of low reliability of verification of expanded samples in the existing technology.
[0080] It should be noted that for step S120 , the specific method of training the pre-constructed multiple first hierarchical feedforward neural networks is not limited and can be selected according to actual needs.
[0081] For example, in an alternative embodiment, in order to enable multiple trained first-layer feedforward neural networks to have better prediction functions so that reliable first-layer feedforward neural networks can be screened out, the above-mentioned step S120 can further include step S121, step S122, step S123, step S124 and step S125, and the specific content of each step is described below.
[0082] Step S121 : determining the number of input parameters and output parameters included in the original experimental data in the training sample set, and obtaining the corresponding input number and output number.
[0083] In an embodiment of the present application, the number of input parameters and output parameters included in the original experimental data in the training sample set can be determined to obtain the corresponding input number and output number. For example, when the input parameters include spindle speed, feed rate, and cutting depth, the input number is equal to 3. When the output parameter includes cutting surface roughness, the output number is equal to 1.
[0084] Step S122: determining the number of nodes of the input layer of the first hierarchical feedforward neural network to be constructed based on the number of inputs, and determining the number of nodes of the output layer of the second hierarchical feedforward neural network to be constructed based on the number of outputs.
[0085] In an embodiment of the present application, after obtaining the number of inputs and the number of outputs, the number of nodes of the input layer of the first hierarchical feedforward neural network that needs to be constructed can be determined based on the number of inputs, for example, the number of inputs is equal to the number of nodes, and the number of nodes of the output layer of the second hierarchical feedforward neural network that needs to be constructed can be determined based on the number of outputs, for example, the number of outputs is equal to the number of nodes. In this way, reliable input and output of input parameters and output parameters can be achieved.
[0086] Step S123: Based on the input quantity and the output quantity, determine the node quantity interval of the hidden layer of the first hierarchical feedforward neural network to be constructed.
[0087] In an embodiment of the present application, after obtaining the number of inputs and the number of outputs, the node number interval of the hidden layer of the first hierarchical feedforward neural network to be constructed can be determined based on the number of inputs and the number of outputs.
[0088] Step S124: constructing a plurality of different first hierarchical feedforward neural networks based on the number of nodes in the input layer, the number of nodes in the output layer, and the interval of the number of nodes in the hidden layer.
[0089] In an embodiment of the present application, after obtaining the corresponding number of nodes, a plurality of different first hierarchical feedforward neural networks can be constructed based on the number of nodes in the input layer, the number of nodes in the output layer, and the interval of the number of nodes in the hidden layer. The number of nodes in the hidden layer of each first hierarchical feedforward neural network falls within the interval of the number of nodes, and the number of nodes in the hidden layer of each two first hierarchical feedforward neural networks is different.
[0090] Step S125 : training the plurality of first hierarchical feedforward neural networks based on the training sample set to form a plurality of trained first hierarchical feedforward neural networks.
[0091] In an embodiment of the present application, after constructing a plurality of first hierarchical feedforward neural networks, the plurality of first hierarchical feedforward neural networks can be trained based on the training sample set to form a plurality of trained first hierarchical feedforward neural networks.
[0092] It is understandable that, in the above step S123, the specific method of determining the node number interval of the hidden layer of the first hierarchical feedforward neural network to be constructed is not limited and can be selected according to actual needs. For example, in an alternative embodiment, in order to increase the reliability of the first hierarchical feedforward neural network constructed based on the determined node number interval, the above step S123 may further include the following content:
[0093] First, a sum calculation may be performed on the input quantity and the output quantity to obtain a first parameter, and a square root operation may be performed on the target quantity to obtain a second parameter;
[0094] Secondly, the sum of the second parameter and a predetermined adjustment parameter is calculated to obtain the node number interval of the hidden layer of the first hierarchical feedforward neural network to be constructed, wherein the adjustment parameter is a constant in the range of [0, 10]. For example, the sum of the second parameter and the lower limit value of the adjustment parameter can be used as the lower limit value of the node number interval, and the sum of the second parameter and the upper limit value of the adjustment parameter can be used as the upper limit value of the node number interval.
[0095] It should be noted that for step S130 , the specific method of determining the optimal first hierarchical feedforward neural network among the multiple trained first hierarchical feedforward neural networks is not limited and can be selected according to actual needs.
[0096] For example, in an alternative embodiment, in order to ensure that the determined optimal first hierarchical feedforward neural network has a higher reliability, the above-mentioned step S130 may further include step S131, step S132 and step S133, and the specific content of each step is described as follows.
[0097] Step S131: For any trained first hierarchical feedforward neural network, use the trained first hierarchical feedforward neural network to predict the input parameters included in each original experimental data in the verification sample set to obtain corresponding predicted output parameters, and based on the predicted output parameters and the output parameters included in each original experimental data in the verification sample set, calculate the corresponding prediction error and determination coefficient respectively.
[0098] In an embodiment of the present application, for any trained first hierarchical feedforward neural network, the trained first hierarchical feedforward neural network can be used to predict the input parameters included in each original experimental data in the verification sample set to obtain corresponding predicted output parameters, and based on the predicted output parameters and the output parameters included in each original experimental data in the verification sample set, the corresponding prediction error and determination coefficient (two parameters can be used to characterize the difference between the predicted output parameter and the output parameter) are calculated respectively. The determination coefficient is an evaluation parameter of the ability of the trained first hierarchical feedforward neural network to reproduce the original experimental data.
[0099] Step S132: Determine a first evaluation result corresponding to the trained first hierarchical feedforward neural network based on the prediction error and the determination coefficient.
[0100] In an embodiment of the present application, after obtaining the prediction error and the determination coefficient, the first evaluation result corresponding to the trained first layered feedforward neural network can be determined based on the prediction error and the determination coefficient, that is, the prediction accuracy of the trained first layered feedforward neural network is evaluated based on the prediction error and the determination coefficient.
[0101] Step S133: After determining the first evaluation result corresponding to each trained first hierarchical feedforward neural network, the trained first hierarchical feedforward neural network corresponding to the first evaluation result having the minimum value is determined as the optimal first hierarchical feedforward neural network.
[0102] In an embodiment of the present application, after obtaining the first evaluation result, after determining the first evaluation result corresponding to each trained first layered feedforward neural network, the trained first layered feedforward neural network corresponding to the first evaluation result with the minimum value can be determined as the optimal first layered feedforward neural network, that is, the first layered feedforward neural network with the highest prediction accuracy.
[0103] It is understood that in the above step S131, the specific method of calculating the corresponding prediction error and determination coefficient is not limited and can be selected according to actual needs. For example, in an alternative embodiment, in order to ensure that the prediction error and determination coefficient can fully characterize the difference between the predicted output parameter and the output parameter, the above step S131 may include:
[0104] First, for any trained first hierarchical feedforward neural network, the trained first hierarchical feedforward neural network is used to predict the input parameters included in each original experimental data in the verification sample set to obtain the corresponding predicted output parameters. In this way, the predicted output parameters corresponding to each input parameter can be obtained;
[0105] Secondly, for each original experimental data in the validation sample set, determining the difference between the output parameter included in the original experimental data and the corresponding predicted output parameter, and calculating the ratio between the difference and the output parameter, and taking the absolute value of the ratio as the local prediction error of the trained first hierarchical feedforward neural network relative to the original experimental data, and calculating the mean of the local prediction errors of the trained first hierarchical feedforward neural network relative to each original experimental data to obtain the corresponding prediction error;
[0106] Then, the mean of the output parameters included in each original experimental data in the verification sample set is determined, and, for each original experimental data in the verification sample set, the square value of the difference between the output parameter included in the original experimental data and the mean is determined to obtain the corresponding first square value, and the square value of the difference between the predicted output parameter corresponding to the original experimental data and the mean is determined to obtain the corresponding second square value, and the ratio between the sum of the second square values corresponding to each original experimental data in the verification sample set and the sum of the first square values corresponding to each original experimental data in the verification sample set is determined to obtain the corresponding determination coefficient.
[0107] It is understandable that, in the above step S132, the specific method of determining the first evaluation result corresponding to the trained first hierarchical feedforward neural network is not limited and can be selected according to actual needs. For example, in an alternative embodiment, in order to ensure that the first evaluation result can fully reflect the difference between the prediction error and the determination coefficient, the above step S132 may further include the following contents:
[0108] First, weighting coefficients corresponding to the prediction error and the determination coefficient can be determined respectively, wherein the sum of the weighting coefficients corresponding to the prediction error and the determination coefficient is equal to 1, and the value range of the weighting coefficients corresponding to the prediction error and the determination coefficient is [0, 1].
[0109] Secondly, based on the corresponding weighting coefficient, the prediction error and the determination coefficient are weighted and summed to obtain a first evaluation result corresponding to the trained first hierarchical feedforward neural network.
[0110] It should be noted that for step S160 , the specific method of determining the validity of the expanded experimental data based on the second evaluation result and the first evaluation result is not limited and can be selected according to actual needs.
[0111] For example, in an alternative embodiment, in order to include the reliability of the validity determination, the above step S160 may further include the following:
[0112] First, the plurality of trained second hierarchical feedforward neural networks may be evaluated based on the validation sample set to obtain a second evaluation result (referring to a method for determining the first evaluation result);
[0113] Secondly, the first evaluation result and the second evaluation result are compared in size, and when the first evaluation result is greater than the second evaluation result (i.e., the prediction accuracy of the trained second layered feedforward neural network is higher than that of the trained first layered feedforward neural network), the expanded experimental data is determined to be valid, and when the first evaluation result is less than the second evaluation result (i.e., the prediction accuracy of the trained second layered feedforward neural network is lower than that of the trained first layered feedforward neural network), the expanded experimental data is determined to be invalid, wherein the first evaluation result and the second evaluation result have a negative correlation with the prediction accuracy of the corresponding layered feedforward neural network, that is, the larger the evaluation result, the lower the prediction accuracy.
[0114] In order to facilitate understanding of the above-mentioned neural network-based expanded sample verification method, the following specific application example is also provided in the embodiments of the present application:
[0115] (1) Conduct orthogonal cutting experiments on milling to obtain original experimental data. Randomly extract a set of data from the original experimental data according to different spindle speed levels to form a validation sample set, and the remaining experimental data constitute a training sample set;
[0116] (2) Use the training sample set to train the BP neural network with different structures to obtain a set of trained neural network models, denoted as N1;
[0117] (3) Use the validation sample set to verify the prediction accuracy of the N1 neural network model, and introduce an evaluation coefficient to evaluate the prediction results of each neural network model on the validation set. Among them, the neural network model with the smallest evaluation coefficient (i.e., evaluation result) is the optimal solution, denoted as BN1;
[0118] (4) Based on the number of required expansion samples, different levels of spindle speed, feed rate, and cutting depth parameters are constructed and fed into the optimal neural network model BN1 as input parameters to generate roughness values corresponding to the input parameters. The input parameters and the generated roughness values together constitute the expansion samples, thus completing the expansion of the sample.
[0119] In order to verify the validity of the expanded sample, the following work was carried out:
[0120] (1) The expanded samples are combined with the training sample set to form a synthetic sample set.
[0121] (2) Use the synthetic sample set to train a new set of BP neural networks, and record the trained neural network models as N2;
[0122] (3) Use the validation sample set to verify the prediction accuracy of the N2 neural network model and compare its prediction accuracy with that of N1. If the prediction accuracy is improved, it proves that the synthetic sample set is effective, which also proves the effectiveness of the expanded sample set; otherwise, it proves that the expanded sample set is invalid.
[0123] The above process is as follows Figure 3 shown.
[0124] Among them, 13 spindle speed levels (A), 3 feed speed levels (B) and 3 cutting depth levels (C) can be designed, as shown in Table 1. A total of 117 groups of milling experiments were conducted, and some experimental results are shown in Figure 1. Figure 4 As shown in Figure 2, 13 sets of milling experimental data were randomly selected from 117 sets according to different speed levels as validation sample sets to verify the prediction accuracy of the trained neural network model; the remaining 104 sets of data constituted the training sample set for training the BP neural network.
[0125] The BP neural network is a typical hierarchical feedforward neural network, consisting of an input layer, a hidden layer, and an output layer. When training the neural network, the machine tool spindle speed, feed rate, and cutting depth are used as input, so the number of input layer nodes is 3; the surface roughness value is used as the output sample, so the number of output layer nodes is 1. The number of hidden layers and nodes in the BP neural network has a significant impact on the network's functionality. The number of hidden layer nodes can be determined using the following formula:
[0126]
[0127] Where m is the number of input layer nodes, n is the number of output layer nodes, α is a constant in the range of [0, 10]. The number of input nodes is 3, and the number of output nodes is 1, so the number of hidden layer nodes can be selected between 2 and 12. The neural networks with different numbers of hidden layers and hidden layer nodes are trained and verified. The optimal neural network is determined based on the verification results and used to generate expanded samples. The hidden layer is set to 1 and 2 layers. When the number of hidden layers is 1, the number of hidden layer nodes is set to 2, 3, 4, 5, and 6 respectively; when the number of hidden layers is 2, the number of hidden layer nodes is set to [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], and more. For details, please refer to Figure 5 shown.
[0128] The activation function for the hidden layer is the tansig function, the activation function for the output layer is the purelin function, and the training function is the trainlm function. The maximum number of iterations is 1000, the error threshold is 10-7, and the learning rate is 0.01. Given the different value ranges and dimensions of the input and output parameters, the sample parameters need to be normalized before neural network training begins. This normalization process uses the mapminmax function to convert all parameters to the range [-1, 1].
[0129] The BP neural network is trained using a training sample set, which is divided into a training set and a test set at 80% and 20% of the training sample set. The training results are evaluated using the average relative deviation and the coefficient of determination. The specific formula is as follows:
[0130] Mean relative deviation (i.e. the prediction error mentioned above):
[0131]
[0132] In the formula, err represents the average relative deviation, n represents the number of test samples, and y i represents the measured surface roughness value in the training sample (i.e., the cutting surface roughness included in the output parameters), y i ' represents the surface roughness value output by the neural network (i.e. the cutting surface roughness included in the predicted output parameters).
[0133] Coefficient of determination:
[0134]
[0135] Where R 2 represents the coefficient of determination, with a value range of [0, 1]; n represents the number of test samples, The coefficient of determination (CDR) represents the average of the measured surface roughness values in the training samples. It is an important parameter for evaluating the neural network model's ability to reproduce the original data. The closer the value is to 1, the higher the prediction accuracy.
[0136] In order to comprehensively consider the average relative deviation and the coefficient of determination, the evaluation coefficient (i.e., the evaluation result) is introduced to evaluate the performance of the neural network. The calculation formula of the evaluation coefficient is as follows:
[0137] Δ=α×err+(1-α)×(1-R 2 );
[0138] Where Δ is the evaluation coefficient, α is a constant, and its value range is [0, 1]. The lower the evaluation coefficient, the better the performance of the network model, that is, the higher the prediction accuracy.
[0139] The BP neural network with different network structures was trained using training samples, and each trained neural network model was recorded as N1. The prediction accuracy of N1 was verified using the validation sample set, and the evaluation coefficient of the validation result was calculated (with a value of 0.4). Figure 6 The training and validation results, as well as the evaluation coefficients, are shown. It can be seen that the neural network model with two hidden layers and a hidden layer node count of [4, 1] has the lowest evaluation coefficient, making it the optimal solution: neural network BN1, with a network structure of 3-4-1-1.
[0140] Among them, in order to expand at least 1000 samples, such as Figure 7 As shown in Figure 7, 13 spindle speed levels (A), 13 feed speed levels (B), and 7 cutting depth levels (C) were designed, with a total of 1183 sets of parameters as input parameters of the BN1 neural network, as shown in Figure 7. After inputting each set of parameters, the BN1 neural network was run to generate the corresponding roughness values, forming 1183 expanded samples, as shown in Figure 7. Figure 8 shown.
[0141] Among them, the expanded sample set is merged with the training sample set to form a synthetic sample set, totaling 1287 samples, which are divided into training set and test set at a ratio of 80% and 20%, respectively. The BP neural networks with different network structures are trained. The structure and training parameters of the trained neural network are consistent with the previous neural network (ie N1). The trained neural network model is recorded as N2. The prediction accuracy of the N2 neural network model is verified using the verification sample set, and its evaluation coefficient is calculated (α is 0.4). The training results, verification results and evaluation coefficients are shown in the figure. Figure 9 As shown, it can be seen that the optimal solution neural network BN2 has 2 hidden layers, [6, 1] nodes, and a network structure of 3-6-1-1.
[0142] Combine Figure 10 The present application also provides a neural network-based expanded sample verification device applicable to the aforementioned electronic device. The neural network-based expanded sample verification device may include a sample set determination module, a first neural network training module, a neural network determination module, a sample set expansion module, a second neural network training module, and a sample validity determination module.
[0143] The sample set determination module is used to determine a training sample set and a verification sample set based on a plurality of original experimental data formed by an orthogonal cutting experiment of a milling process, wherein the original experimental data included in the training sample set and the verification sample set are at least partially different, and the original experimental data include input parameters and output parameters, the input parameters include at least one parameter of spindle speed, feed rate and cutting depth, and the output parameters include cutting surface roughness. In an embodiment of the present application, the sample set determination module can be used to perform Figure 2 As shown in step S110 , for the relevant contents of the sample set determination module, reference may be made to the above description of step S110 .
[0144] The first neural network training module is used to train a plurality of pre-constructed first hierarchical feedforward neural networks based on the training sample set to form a plurality of trained first hierarchical feedforward neural networks, wherein, during the training process, the first hierarchical feedforward neural network outputs corresponding predicted output parameters based on the input parameters, and updates the network parameters of the first hierarchical feedforward neural network based on the error between the predicted output parameters and the output parameters. In the embodiment of the present application, the first neural network training module can be used to perform Figure 2 Regarding step S120 shown, the relevant contents of the first neural network training module can refer to the above description of step S120.
[0145] The neural network determination module is used to evaluate the plurality of trained first hierarchical feedforward neural networks based on the validation sample set to obtain a first evaluation result, and, based on the first evaluation result, determine the optimal first hierarchical feedforward neural network among the plurality of trained first hierarchical feedforward neural networks. In the embodiment of the present application, the neural network determination module can be used to perform Figure 2 As shown in step S130, for the relevant content of the neural network determination module, reference can be made to the above description of step S130.
[0146] The sample set expansion module is used to use the optimal first hierarchical feedforward neural network to predict the constructed expanded input parameters, output corresponding expanded output parameters, and combine the expanded input parameters and the expanded output parameters to form corresponding expanded experimental data, and merge the expanded experimental data and the training sample set to form a corresponding synthetic sample set. In the embodiment of the present application, the sample set expansion module can be used to perform Figure 2 Regarding step S140 shown, the relevant contents of the sample set expansion module can refer to the above description of step S140.
[0147] The second neural network training module is used to train the pre-built multiple second hierarchical feedforward neural networks based on the synthetic sample set to form multiple trained second hierarchical feedforward neural networks. In the embodiment of the present application, the second neural network training module can be used to perform Figure 2 Regarding step S150 shown, the relevant contents of the second neural network training module can refer to the above description of step S150.
[0148] The sample validity determination module is used to evaluate the plurality of trained second hierarchical feedforward neural networks based on the validation sample set to obtain a second evaluation result, and to determine the validity of the expanded experimental data based on the second evaluation result and the first evaluation result, wherein the first evaluation result and the second evaluation result are used to reflect the prediction accuracy of the corresponding hierarchical feedforward neural network. In the embodiment of the present application, the sample validity determination module can be used to perform Figure 2 As shown in step S160, for the relevant content of the sample validity determination module, reference can be made to the above description of step S160.
[0149] In an embodiment of the present application, corresponding to the above-mentioned neural network-based expanded sample verification method applied to the electronic device, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is run, the various steps of the neural network-based expanded sample verification method are executed.
[0150] Among them, the steps executed when the aforementioned computer program is running will not be described one by one here. Please refer to the previous explanation of the neural network-based expanded sample verification method.
[0151] In summary, the neural network-based expanded sample verification method, device, equipment and medium provided in this application can evaluate multiple trained first-layer feedforward neural networks, obtain a first evaluation result, and determine the optimal first-layer feedforward neural network; use the optimal first-layer feedforward neural network to predict the expanded input parameters to form expanded experimental data, merge the expanded experimental data and the training sample set to form a synthetic sample set; based on the synthetic sample set, train multiple second-layer feedforward neural networks; evaluate multiple trained second-layer feedforward neural networks to obtain a second evaluation result, and determine the validity of the expanded experimental data based on the second evaluation result and the first evaluation result. Based on the above content, on the one hand, by first training the optimal first-layer feedforward neural network to expand the sample, the validity of the expanded sample can be guaranteed to a certain extent, thereby avoiding the interference caused by too many invalid samples in the verification process, so that the reliability of the verification can be guaranteed. On the other hand, by comparing the prediction accuracy of the neural networks trained on the samples before and after expansion, the effectiveness of the corresponding samples can also be reflected, making it more objective than the technical means of manual analysis, thereby ensuring the reliability of verification and improving the problem of low reliability of verification of expanded samples in existing technologies.
[0152] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device and method embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0153] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0154] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or partly contributed to the prior art or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. It should be noted that, in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without further constraints, an element defined by the phrase "comprises a..." does not preclude the existence of additional identical elements in the process, method, article or apparatus that includes the element.
[0155] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A neural network-based expanded sample verification method, characterized in that: include: Determining a training sample set and a validation sample set based on a plurality of original experimental data generated by an orthogonal cutting experiment of a milling process, wherein the original experimental data included in the training sample set and the validation sample set are at least partially different, and the original experimental data include input parameters and output parameters, the input parameters include at least one parameter of a spindle speed, a feed rate, and a cutting depth, and the output parameter includes a cutting surface roughness; Based on the training sample set, a plurality of pre-constructed first hierarchical feedforward neural networks are trained to form a plurality of trained first hierarchical feedforward neural networks, wherein, during the training process, the first hierarchical feedforward neural networks output corresponding predicted output parameters based on input parameters, and update network parameters of the first hierarchical feedforward neural networks based on errors between the predicted output parameters and the output parameters; Evaluating the plurality of trained first hierarchical feedforward neural networks based on the validation sample set to obtain a first evaluation result, and determining an optimal first hierarchical feedforward neural network among the plurality of trained first hierarchical feedforward neural networks based on the first evaluation result; Using the optimal first hierarchical feedforward neural network, predicting the constructed expanded input parameters, outputting corresponding expanded output parameters, combining the expanded input parameters and the expanded output parameters to form corresponding expanded experimental data, and merging the expanded experimental data with the training sample set to form a corresponding synthetic sample set, wherein the constructed expanded input parameters include multiple sets of different levels of spindle speed, feed rate, and cutting depth configured by the user; Based on the synthetic sample set, training a plurality of pre-constructed second hierarchical feedforward neural networks to form a plurality of trained second hierarchical feedforward neural networks; Based on the validation sample set, the multiple trained second hierarchical feedforward neural networks are evaluated to obtain a second evaluation result, and based on the second evaluation result and the first evaluation result, the validity of the expanded experimental data is determined, wherein the first evaluation result and the second evaluation result are used to reflect the prediction accuracy of the corresponding hierarchical feedforward neural network.
2. The neural network-based expanded sample verification method according to claim 1, characterized in that: The step of training a plurality of pre-constructed first hierarchical feedforward neural networks based on the training sample set to form a plurality of trained first hierarchical feedforward neural networks includes: Determining the number of input parameters and output parameters included in the original experimental data in the training sample set, and obtaining the corresponding input number and output number; Determining the number of nodes in the input layer of a first hierarchical feedforward neural network to be constructed based on the number of inputs, and determining the number of nodes in the output layer of a second hierarchical feedforward neural network to be constructed based on the number of outputs; Based on the input quantity and the output quantity, determining the node quantity interval of the hidden layer of the first hierarchical feedforward neural network to be constructed; Constructing a plurality of different first hierarchical feedforward neural networks based on the number of nodes in the input layer, the number of nodes in the output layer, and the interval of the number of nodes in the hidden layer, wherein the number of nodes in the hidden layer of each first hierarchical feedforward neural network falls within the interval of the number of nodes, and the number of nodes in the hidden layer of each two first hierarchical feedforward neural networks is different; Based on the training sample set, the multiple first hierarchical feedforward neural networks are trained to form multiple trained first hierarchical feedforward neural networks.
3. The neural network-based expanded sample verification method according to claim 2, characterized in that: The step of determining the node number interval of the hidden layer of the first hierarchical feedforward neural network to be constructed based on the input number and the output number includes: performing a sum calculation on the input quantity and the output quantity to obtain a first parameter, and performing a square root operation on the target quantity to obtain a second parameter; The second parameter and a predetermined adjustment parameter are summed to obtain a node number interval of a hidden layer of a first hierarchical feedforward neural network to be constructed, wherein the adjustment parameter is a constant in the range of [0, 10].
4. The neural network-based expanded sample verification method according to claim 1, characterized in that: The steps of evaluating the plurality of trained first hierarchical feedforward neural networks based on the validation sample set to obtain a first evaluation result, and determining an optimal first hierarchical feedforward neural network among the plurality of trained first hierarchical feedforward neural networks based on the first evaluation result, include: For any trained first hierarchical feedforward neural network, using the trained first hierarchical feedforward neural network, predicting the input parameters included in each original experimental data in the validation sample set to obtain corresponding predicted output parameters, and, based on the predicted output parameters and the output parameters included in each original experimental data in the validation sample set, respectively calculating corresponding prediction errors and determination coefficients, wherein the determination coefficient is an evaluation parameter of the ability of the trained first hierarchical feedforward neural network to reproduce the original experimental data; Determining a first evaluation result corresponding to the trained first hierarchical feedforward neural network based on the prediction error and the determination coefficient; After determining the first evaluation result corresponding to each trained first hierarchical feedforward neural network, the trained first hierarchical feedforward neural network corresponding to the first evaluation result having the minimum value is determined as the optimal first hierarchical feedforward neural network.
5. The neural network-based expanded sample verification method according to claim 4, characterized in that: The steps of predicting, for any one of the trained first hierarchical feedforward neural networks, each input parameter included in the original experimental data in the validation sample set using the trained first hierarchical feedforward neural network to obtain a corresponding predicted output parameter, and respectively calculating a corresponding prediction error and a determination coefficient based on the predicted output parameter and the output parameter included in each of the original experimental data in the validation sample set include: For any trained first hierarchical feedforward neural network, using the trained first hierarchical feedforward neural network, predicting the input parameters included in each original experimental data in the verification sample set to obtain corresponding predicted output parameters; For each original experimental data in the validation sample set, determining a difference between an output parameter included in the original experimental data and a corresponding predicted output parameter, and calculating a ratio between the difference and the output parameter, and using an absolute value of the ratio as a local prediction error of the trained first hierarchical feedforward neural network relative to the original experimental data, and calculating a mean of the local prediction errors of the trained first hierarchical feedforward neural network relative to each original experimental data to obtain a corresponding prediction error; Determine the mean of the output parameters included in each original experimental data in the verification sample set, and, for each original experimental data in the verification sample set, determine the square value of the difference between the output parameter included in the original experimental data and the mean, to obtain a corresponding first square value, and determine the square value of the difference between the predicted output parameter corresponding to the original experimental data and the mean, to obtain a corresponding second square value, and determine the ratio between the sum of the second square values corresponding to each original experimental data in the verification sample set and the sum of the first square values corresponding to each original experimental data in the verification sample set, to obtain a corresponding determination coefficient.
6. The neural network-based expanded sample verification method according to claim 4, characterized in that: The step of determining a first evaluation result corresponding to the trained first hierarchical feedforward neural network based on the prediction error and the determination coefficient includes: Determining weighting coefficients corresponding to the prediction error and the determination coefficient respectively, wherein a sum of the weighting coefficients corresponding to the prediction error and the determination coefficient is equal to 1, and a value range of the weighting coefficients corresponding to the prediction error and the determination coefficient is [0, 1]; Based on the corresponding weighting coefficient, the prediction error and the determination coefficient are weighted and summed to obtain a first evaluation result corresponding to the trained first hierarchical feedforward neural network.
7. The neural network-based expanded sample verification method according to claim 1, characterized in that: The step of evaluating the plurality of trained second hierarchical feedforward neural networks based on the validation sample set to obtain a second evaluation result, and determining the validity of the expanded experimental data based on the second evaluation result and the first evaluation result, comprises: Based on the verification sample set, evaluating the plurality of trained second hierarchical feedforward neural networks to obtain a second evaluation result; The first evaluation result and the second evaluation result are compared in size, and when the first evaluation result is greater than the second evaluation result, the expanded experimental data is determined to be valid, and when the first evaluation result is less than the second evaluation result, the expanded experimental data is determined to be invalid, wherein the first evaluation result and the second evaluation result have a negative correlation with the prediction accuracy of the corresponding hierarchical feedforward neural network.
8. An expanded sample verification device based on a neural network, characterized in that: include: a sample set determination module, configured to determine a training sample set and a validation sample set based on a plurality of original experimental data generated by an orthogonal cutting experiment of a milling process, wherein the original experimental data included in the training sample set and the validation sample set are at least partially different, and the original experimental data include input parameters and output parameters, the input parameters include at least one parameter of a spindle speed, a feed rate, and a cutting depth, and the output parameter includes a cutting surface roughness; a first neural network training module, configured to train a plurality of pre-constructed first hierarchical feedforward neural networks based on the training sample set to form a plurality of trained first hierarchical feedforward neural networks, wherein during the training process, the first hierarchical feedforward neural networks output corresponding predicted output parameters based on input parameters, and update network parameters of the first hierarchical feedforward neural networks based on an error between the predicted output parameters and the output parameters; a neural network determination module, configured to evaluate the plurality of trained first hierarchical feedforward neural networks based on the validation sample set to obtain a first evaluation result, and determine an optimal first hierarchical feedforward neural network among the plurality of trained first hierarchical feedforward neural networks based on the first evaluation result; a sample set expansion module, configured to predict the constructed expanded input parameters using the optimal first hierarchical feedforward neural network, output corresponding expanded output parameters, combine the expanded input parameters and the expanded output parameters to form corresponding expanded experimental data, and merge the expanded experimental data with the training sample set to form a corresponding synthetic sample set, wherein the constructed expanded input parameters include multiple sets of different levels of spindle speed, feed rate, and cutting depth configured by the user; A second neural network training module is used to train a plurality of pre-constructed second hierarchical feedforward neural networks based on the synthetic sample set to form a plurality of trained second hierarchical feedforward neural networks; A sample validity determination module is used to evaluate the multiple trained second hierarchical feedforward neural networks based on the verification sample set to obtain a second evaluation result, and to determine the validity of the expanded experimental data based on the second evaluation result and the first evaluation result, wherein the first evaluation result and the second evaluation result are used to reflect the prediction accuracy of the corresponding hierarchical feedforward neural network.
9. An electronic device, characterized in that: include: memory for storing computer programs; A processor connected to the memory, configured to execute a computer program stored in the memory to implement the neural network-based expanded sample verification method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when running, executes the neural network-based sample expansion verification method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Model training method and device and content recommendation method and device
CN116720548A
Milling surface roughness prediction method considering tool wear
CN116765934A