A Classification Method for Metal Surface and Internal Defects Based on Magnetic Anomaly Signals

By optimizing hyperparameters using the LightGBM classification model and Bayesian optimization algorithm, the error problem in underwater detection of surface and internal defects of wind power foundations was solved, achieving efficient defect classification and adapting to the complexity of the marine environment.

CN115963171BActive Publication Date: 2026-03-13SHENGDONG RUDONG OFFSHORE WIND POWER CO LTD +3
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-09
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing technologies cannot rely on human visual judgment when inspecting the metal surface and internal defects of wind turbine foundations underwater, leading to errors in defect identification. Furthermore, existing non-destructive testing technologies have poor resistance to interference in marine environments, making it difficult to accurately classify surface and internal defects.

Method used

The LightGBM classification model was used to process the magnetic signals of defects. The hyperparameters were optimized by combining the Bayesian optimization algorithm and the k-fold cross-validation method. The magnetic signals of the front and back of the metal specimen were collected by a high-precision weak magnetic field detector to establish a classification model of defect type and location.

Benefits of technology

It improved the accuracy of defect classification, promoted the progress of defect classification analysis for wind power foundations, reduced judgment errors, and adapted to the complexity of the marine underwater environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115963171B_ABST
    Figure CN115963171B_ABST
Patent Text Reader

Abstract

This invention discloses a method for classifying surface and internal defects in metals based on magnetic anomaly signals. The method utilizes the natural geomagnetic field and employs a scanning device to scan the front and back surfaces of the test specimen. Front scanning is considered surface defects, while back scanning is considered internal defects. After acquiring the magnetic signals from the specimen surface, the characteristic information of the defects is extracted. An algorithm classification model is established, using the feature values ​​of weak magnetic signals as input and the defect location as output. A Bayesian optimization algorithm combined with a cross-validation method is used to optimize the hyperparameters in the LightGBM model. The optimized LightGBM model is then used to classify and predict the defect locations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of detection methods for surface and internal defects of underwater metal structures in offshore wind farms, and specifically relates to a method for classifying metal surface and internal defects based on magnetic anomaly signals. Background Technology

[0002] Against the backdrop of rapid economic development, energy shortages have increasingly attracted significant attention. Renewable energy is a strategic choice for addressing energy shortages, and wind power is one such energy source that simultaneously possesses advantages such as being renewable, clean, and having a mature industry. Due to high land costs and dwindling wind resources for onshore wind power, wind farms have shown a trend of expanding from land to nearshore areas. In recent years, offshore wind power, with its higher power generation efficiency and better stability, has become the main battleground for wind power generation. Wind turbine foundations are an important component of offshore wind turbine units. Under different operating conditions, foundations are subjected to the interaction of various dynamic loads such as waves, wind, earthquakes, and impacts, which can easily lead to defects distributed on or within the foundation surface. Regular non-destructive testing of wind turbine foundations is necessary. Radiographic testing can visually reflect the morphology of defects, but its feasibility for underwater testing of wind turbine foundations is low due to limitations such as the size of the tested component, high testing costs, and low efficiency.

[0003] Ultrasonic testing is suitable for underwater inspection, but the presence of its near-field region can easily lead to missed detection of minute surface defects. Eddy current testing, which has high sensitivity for detecting surface or near-surface defects, suffers from poor anti-interference capabilities and difficulties in analyzing defect magnetic signals, making it unsuitable for the highly volatile marine underwater environment. Under conditions of the same defect size and shape, defects located on the surface and internally of wind turbine foundations have different effects on the foundation's mechanical properties and hazard coefficients; therefore, classifying surface and internal defects of wind turbine foundations is a prerequisite for subsequent quantitative non-destructive testing (NDT) assessment. Given these needs, classifying and analyzing surface and internal defects in wind turbine foundations for NDT, and developing new NDT technologies to supplement existing NDT techniques, has significant socio-economic benefits.

[0004] Currently, while there has been research and development on the theoretical basis and hardware facilities for weak magnetic field testing, research on deriving defect characteristics from defect magnetic signals is still in its infancy. Compared to non-destructive testing in air, underwater testing lacks the initial visual assessment of surface and internal defects, making the determination of whether a defect is located on the surface or inside the workpiece entirely dependent on magnetic signal characteristics and algorithm processing. This makes the judgment results prone to errors. Therefore, effective solutions to these problems are urgently needed. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for classifying metal surface and internal defects based on magnetic anomaly signals, so as to solve the problem that underwater detection is prone to errors in defect judgment because it cannot be judged by human vision.

[0006] To achieve the above objectives, the present invention employs the following technical solution:

[0007] A method for classifying metal surface and internal defects based on magnetic anomaly signals, comprising:

[0008] Collect and acquire defect magnetic signals of metal specimens;

[0009] The defect magnetic signal is processed by the LightGBM classification model to classify the defect and obtain the defect type; the optimal hyperparameter set in the LightGBM classification model is obtained by Bayesian optimization algorithm and k-fold cross-validation method.

[0010] Output the defect type of the metal specimen and the location of the defect in the metal specimen.

[0011] A further improvement of the present invention is that:

[0012] Preferably, the defect magnetic signal is obtained by scanning the front and back sides of the metal specimen, wherein the front side of the metal specimen is the defect surface and the side opposite the front side is the back side.

[0013] Preferably, the LightGBM classification model performs classification using one-sided gradient sampling, mutually exclusive feature merging, and histogram algorithms.

[0014] Preferably, the process of obtaining the LightGBM classification model is as follows:

[0015] Step 1: Prepare defective specimens and establish a material defect sample library;

[0016] Step 2: Scan the front and back of the defective specimen with a high-precision weak magnetic detector to obtain the original defect magnetic signal of the defective specimen as a sample set;

[0017] Step 3: Randomly divide the sample set into a training set and a test set;

[0018] Step 4: Train the LightGBM classification model with the optimal hyperparameter set using the training set, and validate the trained LightGBM classification model using the test set.

[0019] Preferably, after step 4, the LightGBM classification model is evaluated using the confusion matrix method.

[0020] Preferably, the process of obtaining the optimal hyperparameters through Bayesian optimization algorithm and k-fold cross-validation is as follows:

[0021] Step 1: Output multiple sets of hyperparameters with scores using the Bayesian optimization algorithm;

[0022] Step 2: Obtain the optimal hyperparameter set from multiple hyperparameter sets using the k-fold cross-validation method.

[0023] Preferably, in step 1, the Bayesian optimization algorithm first provides an objective function for optimization, and then iteratively updates the posterior distribution of the objective function by adding sample points to adjust the parameter combination, ultimately obtaining multiple sets of parameter combinations with scores.

[0024] Preferably, in step 2, the k-fold cross-validation method involves dividing the hyperparameter set into k parts, using one part as the test set each time, and using the remaining k-1 parts as the training set; pre-setting the optimization range of each parameter in each hyperparameter set, substituting it into the Bayesian optimization algorithm, and solving the Bayesian optimization algorithm to obtain the optimal parameter set.

[0025] Preferably, the hyperparameter set includes max_bin, max_depth, subsample, num_leaves, min_child_samples, and colsample_bytree.

[0026] Compared with the prior art, the present invention has the following beneficial effects:

[0027] This invention discloses a method for classifying surface and internal defects in metals based on magnetic anomaly signals. Test specimens are prepared using DH36 wind turbine foundation material. The specimens contain surface-opening, non-penetrating defects; the defective side is designated as the front, and the intact side as the back. Based on the natural geomagnetic field, a scanning device scans the front and back surfaces of the test specimen. Front scans are considered surface defects, and back scans are considered internal defects. After collecting magnetic signals from the specimen surface, defect feature information is extracted. An algorithm classification model is established, using weak magnetic signal defect feature values ​​as input and defect location as output. A Bayesian optimization algorithm combined with a cross-validation method is used to optimize the hyperparameters in the LightGBM model. The optimized LightGBM model is then used to classify and predict defect locations.

[0028] This invention acquires weak magnetic signals from the front and back sides of DH36 specimens containing non-penetrating surface defects under unexcited magnetic detection conditions, and then extracts features. A defect classification model is established using the feature values ​​of the defect magnetic signals as the input set and the defect type (surface or interior) as the output set. The default parameters of the LightGBM model are optimized using a Bayesian optimization algorithm combined with cross-validation, improving the defect classification accuracy and advancing the progress of defect classification analysis for wind power foundations. Attached Figure Description

[0029] Figure 1 This is a flowchart of the present invention. Detailed Implementation

[0030] The present invention will now be described in further detail with reference to the accompanying drawings:

[0031] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. The terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, unless otherwise explicitly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection or a detachable connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal connection of two elements. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0032] A method for classifying metal surface and internal defects based on magnetic anomaly signals includes the following steps:

[0033] Step 1: Scan the front and back of the metal specimen to acquire the defect magnetic signals of the metal specimen;

[0034] Step 2: Train the original LightGBM classification model using the optimal samples to obtain the trained LightGBM classification model. Then, process the defect signal using the trained LightGBM classification model to obtain the defect classification and thus the defect type.

[0035] Step 3: Output the defect type of the metal specimen and the location of the defect in the metal specimen.

[0036] One embodiment of the present invention discloses a method for obtaining optimal samples, specifically including the following steps:

[0037] S1. Design DH36 test pieces, and machine open and non-penetrating defects on the surface of each test piece to establish a defect sample library of DH36 material.

[0038] S2. Use a high-precision weak magnetic detector to scan the front and back surfaces of the specimen to obtain the original defect magnetic signals.

[0039] S3. Extract feature values ​​from the original defect magnetic signal;

[0040] S4. Use Bayesian optimization algorithm combined with cross-validation to optimize the hyperparameters in the LightGBM model;

[0041] S5. The optimized LightGBM model is used to classify and analyze the magnetic signals of defects and predict the location of defects on the specimen.

[0042] Further, step S4 includes the following steps:

[0043] The Bayesian optimization algorithm consists of two parts: one is to use a probabilistic surrogate model to determine the objective function, and the other is to use a sampling function to collect sampling points. The Bayesian optimization algorithm treats the impact of parameter combinations on model performance as a Gaussian process, where the parameter combinations conform to a multivariate Gaussian distribution. It adjusts the current parameter combinations by iteratively updating the posterior distribution of the objective function. For the signal characteristics and sample size of weak magnetic field detection defects, the following parameters are set in this invention: max_bin, max_depth, subsample, num_leaves, min_child_samples, and colsample_bytree. Several sets of these parameter combinations are obtained through optimization using the Bayesian optimization algorithm. Based on a given objective function, the Bayesian optimization algorithm adjusts the current parameter combinations by iteratively updating the posterior distribution of the objective function by adding sample points. Specifically, the objective function is the mean of k evaluation results in the k-fold cross-validation method. The Bayesian optimization algorithm can perform parameter optimization even when the gradient information of the objective function is unavailable or the objective function's value range is complex, finding the global optimum in the fastest way. Multiple sets of hyperparameters are obtained using a Bayesian optimization algorithm, and each set of output hyperparameters is evaluated using k-fold cross-validation.

[0044] The k-fold cross-validation method divides the hyperparameter set into k parts, using one part as the test set each time and the remaining k-1 parts as the training set. All data is utilized k times, making full use of the sample data; the final model does not heavily depend on any specific training set. Based on the sample feature analysis, the parameters to be optimized are determined, and the optimization range for each parameter is preset and substituted into the Bayesian optimization algorithm. After solving the Bayesian optimization algorithm function, the optimal parameters of the LightGBM classification algorithm are obtained.

[0045] The optimal parameters are set in the LightGBM classification model. The defect dataset is randomly divided into a training set and a test set. The training set is input into the LightGBM classification model with the optimal parameters to train the LightGBM classification model.

[0046] The test set data was input into the LightGBM classification model, and the model was validated using the confusion matrix method. The parameters with the highest prediction accuracy were selected as the model parameters.

[0047] Furthermore, the specific process of step 5 is as follows:

[0048] LightGBM is an adaptive gradient boosting algorithm, an efficient implementation of Gradient Boosting Decision Tree (GBDT) trees, widely used in financial risk prediction, medical diagnosis, and physical parameter prediction. Similar to Random Forest (RF), Decision Tree (DT), and Support Vector Machine (SVM), it primarily functions as a regression prediction and classification algorithm. In numerous research tests, LightGBM has demonstrated superior performance in regression prediction and classification models compared to the aforementioned algorithms. GBDT is essentially a process of continuously fitting residuals and minimizing the loss function (a value that measures the difference between predicted and actual values) through multiple iterations. As an "optimized" version of the Gradient Boosting Decision Tree (GBDT) algorithm, LightGBM has made significant improvements in many aspects. It uses the complexity of the decision tree as a regularization term in the loss function minimization process and employs a second-order Taylor expansion. To improve the algorithm's computational power and prediction accuracy with fewer samples, fewer features, and less memory, LightGBM mainly utilizes three techniques: One-sided Gradient Sampling (GOSS), Exclusive Feature Bundle (EFB), and Histogram algorithms. The GOSS algorithm aims to retain sample points that contribute more information gain and randomly sample points with less information gain, thereby improving computational efficiency. The EFB algorithm binds mutually exclusive features together, reducing feature dimensionality and thus reducing the cost of finding the optimal split point. The Histogram algorithm discretizes feature values ​​by binning, reducing computational cost during node splitting. Furthermore, LightGBM controls the tree growth through a leaf-wise (depth-constrained leaf growth) strategy, finding the leaf with the largest splitting gain from all current leaves and splitting it, repeating this process; this allows control over the tree depth during small-sample training to prevent overfitting.

[0049] This invention also discloses a surface and internal defect classification system based on magnetic anomaly signals of metal surfaces, the system comprising:

[0050] The acquisition unit acquires the defect magnetic signals of the metal specimen and determines its characteristic values;

[0051] The classification unit processes the defect magnetic signal using the LightGBM classification model to obtain the defect classification and defect type; the optimal hyperparameter set in the LightGBM classification model is obtained by optimizing the Bayesian optimization algorithm and the k-fold cross-validation method.

[0052] The output unit outputs the defect type of the metal specimen and the location of the defect in the metal specimen.

[0053] The following analysis, in conjunction with specific embodiments, provides further details.

[0054] Example 1

[0055] See Figure 1 The defect classification flowchart describes the process of collecting weak magnetic signals from the surface of DH36 steel using a high-precision magnetic sensor and extracting features from these signals. The extracted feature values ​​and their corresponding defect types are used as samples, with the feature values ​​as the input set and the defect types as the output set. A Bayesian optimization algorithm combined with cross-validation is employed to optimize the hyperparameters of the LightGBM model. The optimal parameters are then used to train the sample set data to obtain a classification model based on the LightGBM model. Finally, the model's classification accuracy is tested using a test set of samples.

[0056] Step 1: Design a DH36 surface-opening non-penetrating defect specimen and fabricate 16 artificial simulated groove defects. Front scan yields 16 surface defects, and back scan yields 16 internal defects, resulting in a total of 32 sets of defect magnetic signals. The artificial simulated groove defects are designed according to the arithmetic progression principle. The groove lengths are 8mm, 10mm, 12mm, and 14mm, the groove widths are 0.20mm, 0.25mm, 0.30mm, and 0.35mm, and the groove depth is 5mm, as shown in Table 1. The specimen material is DH36. Eight DH36 specimens (length * width * height) of 150mm × 100mm × 10mm were designed, with two defects fabricated on each specimen. To avoid edge effects and mutual interference between defects, the defects are designed at 50mm and 100mm in the length direction and 50mm in the width direction.

[0057] Table 1 Defect size parameters (depth 5mm)

[0058]

[0059] Step 2: In an environment free from strong magnetic interference, a high-precision weak magnetic field detector was used to scan the front and back sides of eight DH36 specimens. The front side is the surface with defects, and the opposite side is the back side. Magnetic signals in the vertical direction of the specimens were collected, totaling 32 defect magnetic signals. The horizontal axis represents the number of sampling points, and the vertical axis represents the magnetic induction intensity in the vertical direction of the specimen surface, in nT (nanotesla).

[0060] Step 3: Extract the amplitude, fill width, average magnetic induction intensity, and maximum magnetic induction intensity of the defect magnetic signal as feature values. Surface defects are represented by label '0', and internal defects are represented by label '1', which is convenient for use in subsequent processes.

[0061] This example proposes the LightGBM classification algorithm for defect classification, which employs Bayesian optimization to optimize hyperparameters and cross-validation to evaluate parameter combinations. Before training the model, the hyperparameters are optimized using Bayesian optimization, and the output parameters are evaluated through cross-validation. Finally, the best-performing set of parameters is selected to adjust the structure of the LightGBM classification algorithm. The goal is to establish a classification model with high accuracy in identifying defect types.

[0062] Step 4: Optimize the hyperparameters in the LightGBM classification algorithm using the Bayesian optimization algorithm;

[0063] Bayesian optimization is a global optimization method widely used to solve black-box function problems. Its objective function only needs to satisfy the local smoothness assumption, and the sampling function can obtain an approximation of the objective function with fewer evaluations. Hyperparameters include max_bin, max_depth, subsample, num_leaves, min_child_samples, and colsample_bytree. The steps of the Bayesian optimization algorithm are as follows:

[0064] 1) Define the domain of the objective function and the hyperparameter space;

[0065] 2) Determine the number of iterations n, where n is a finite value, and solve for the objective function observations corresponding to the n hyperparameter spaces;

[0066] 3) Based on the observed values ​​of the objective function obtained in 2), make assumptions about the function distribution using a probabilistic surrogate model, and derive the target value of the assumed distribution;

[0067] 4) Define the acquisition function and determine the next observation point to be calculated.

[0068] The Bayesian algorithm can output multiple sets of hyperparameters with scores at once.

[0069] Step 5: After obtaining the hyperparameters with scores using the Bayesian algorithm, the optimal hyperparameter set is obtained using the k-fold cross-validation method.

[0070] In training small-sample models, cross-validation can effectively avoid overlearning and underlearning. The purpose of introducing cross-validation into this model is to comprehensively evaluate the F1 score and reduce errors caused by specific training and test sets. Specifically, it involves repeatedly training and testing with the same set of hyperparameters output by the Bayesian optimization algorithm, thereby enhancing the generalization ability of the LightGBM model. The specific steps for k-fold cross-validation to comprehensively evaluate the F1 score are as follows:

[0071] (1) Divide all hyperparameter sets into k subsets;

[0072] (2) Each time, one subset is selected as the test set, and the remaining k-1 subsets are used as the training set. All samples are trained and tested k times.

[0073] (3) Using the same set of hyperparameters output by the Bayesian optimization algorithm, input the model in 2) to obtain k comprehensive evaluation results F1 corresponding to the set of hyperparameters;

[0074] (4) Calculate the average of k F1 values ​​and use it as the evaluation index of the hyperparameters of the group, denoted as 'target'. The larger the 'target' value, the higher the prediction accuracy of the model.

[0075] Obtain the optimal set of hyperparameters.

[0076] Step 6: Classify defects using the LightGBM model.

[0077] All samples are randomly divided into training and test sets according to a certain ratio, and the optimal parameters are substituted into them. Then, the LightGBM model is trained using the training set data.

[0078] The hyperparameter set is input into the LightGBM model. The core algorithm of the LightGBM model is the GBDT algorithm. GBDT is actually a process of continuously fitting the residuals and minimizing the loss function (a value that measures the difference between the predicted value and the actual value) through multiple iterations. The sample data obtained in step 1 is randomly divided into training set and test set. The specific steps of the GBDT algorithm are as follows:

[0079] 1) Input training set: Data = {(x1,y1),(x2,y2),…,(x N ,y N )}, i = 1, 2, ..., N; N is the number of samples;

[0080] 2) Initialize the loss function h0(x i Let t be the initial predicted value, and assume there are T decision trees with t = 1.

[0081] 3) Calculate the negative gradient

[0082] 4) Obtain the base learner by fitting the residuals w t is the optimal parameter in the t-th decision tree;

[0083] 5) Calculate the weights of the base learners

[0084] 6) Update the loss function F t (x) = F t-1 (x) + α t h t (x i ; w t );

[0085] 7) If t < T, then t = t + 1, return to 3) to continue iteration. If t = T, terminate the iteration.

[0086] Obtain the classification result. <op

[0087] Step 7, Model evaluation metrics

[0088] The confusion matrix method is one of the methods for evaluating binary classification models. The ratios derived from the confusion matrix, such as the ratio of the actual and predicted positives to the total actual positives, the ratio of correct predictions to the total samples, etc. The confusion matrix is shown in Table 2.

[0089] Table 2 Confusion matrix

[0090]

[0091] TP represents that the actual value is positive and the predicted value is also positive. TN represents that the actual value is negative and the predicted value is also negative. FP represents that the actual value is negative and the predicted value is positive. FN represents that the actual value is positive and the predicted value is negative. Define precision Recall Model evaluation metrics The higher the model accuracy, the larger the F1 value.

[0092] In this example, the hyperparameters to be tuned are: colsample_bytree, min_child_samples, num_leaves, subsample, max_depth, max_bin. Iterate 30 times, and set the number of cross-validation folds k to 8. The optimization results are shown in Table 3.

[0093] Table 3 Hyperparameter optimization results

[0094] ​​​​​As shown in the table, the hyperparameter combinations output in iterations 14, 25, 28, and 29 have the highest prediction accuracy. In this study, the parameters obtained in iteration 14 were selected to optimize the LightGBM model. 22 sets of samples were divided into a training set and 10 sets of samples were divided into a test set. The prediction results of the test set are shown in Table 4.

[0097] Table 4 Comparison of predicted and actual values ​​for the test set samples

[0098]

[0099]

[0100] Table 4 shows the defect type labels for 10 samples in the test set. Comparing the predicted and actual values, 9 groups were correctly predicted, while the remaining 1 group was predicted to be a surface defect when it was actually an internal defect, with 1 = 0.909.

[0101] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for classifying surface and internal defects of a metal based on magnetic anomaly signals, characterized by, The method comprises the following steps: acquiring a defect magnetic signal of a metal test piece; the defect magnetic signal is a magnetic signal defect characteristic value, which includes an amplitude, a width, a magnetic induction average value and a maximum magnetic induction value; the defect magnetic signal is obtained by scanning the front and back surfaces of the metal test piece, the front surface of the metal test piece is a defect surface, and the surface opposite to the front surface is the back surface, the front surface is scanned as a surface defect, and the back surface is scanned as an internal defect; the defect is classified by processing the defect magnetic signal through a LightGBM classification model to obtain a defect type; the optimal hyperparameter group in the LightGBM classification model is obtained through a Bayesian optimization algorithm and a k-fold cross-validation method; the process of obtaining the LightGBM classification model comprises the following steps: Step 1, preparing a defect test piece and establishing a material defect sample library; Step 2, scanning the front and back surfaces of the defect test piece through a high-precision weak magnetic detector to obtain original defect magnetic signals of the defect test piece as a sample set; Step 3, randomly dividing the sample set into a training set and a test set; Step 4, training the LightGBM classification model provided with the optimal hyperparameter group through the training set, and verifying the trained LightGBM classification model through the test set; the process of obtaining the optimal hyperparameter through the Bayesian optimization algorithm and the k-fold cross-validation method comprises the following steps: Step 1, outputting multiple hyperparameter groups with scores through the Bayesian optimization algorithm; Step 2, obtaining the optimal hyperparameter group from the multiple hyperparameter groups through the k-fold cross-validation method; the process of the k-fold cross-validation method comprises the following steps: dividing the hyperparameter group into k parts, taking one part as a test set each time, and taking the remaining k-1 parts as a training set; presetting the optimization range of each parameter in each hyperparameter group, substituting the Bayesian optimization algorithm, obtaining the optimal parameter group after the Bayesian optimization algorithm, and outputting the optimal parameter group; outputting the defect type of the metal test piece and the position of the defect in the metal test piece, wherein the defect type is a surface defect or an internal defect.

2. The method of claim 1, wherein the method is characterized by: The LightGBM classification model is classified through single-side gradient sampling, mutually exclusive feature merging and histogram algorithm.

3. The method of claim 1, wherein the method is characterized by: After Step 4, the LightGBM classification model is evaluated through a confusion matrix method.

4. The method of claim 1, wherein the method is characterized by: In Step 1, the Bayesian optimization algorithm firstly gives an optimization objective function, constantly iterates and updates the posterior distribution of the objective function by increasing sample points to adjust the parameter combination, and finally obtains multiple parameter combinations with scores.

5. The method of classifying metal surface and internal defects based on magnetic anomaly signals according to any one of claims 1-4, characterized in that, The hyperparameter group includes max_bin, max_depth, subsample, num_leaves, min_child_samples and colsample_bytree.

Citation Information

Patent Citations

  • Failure prediction and control method of ring welding joint of bimetal composite pipe for oil and gas gathering and transferring

    CN110116254A

  • LightGBM fault diagnosis method based on improved Bayesian optimization

    CN110413494A