4. Lifting Data State Detection Based on Improved Random Forest
The random forest algorithm is a machine learning algorithm for assessing the reliability of equipment detection results, with its core lying in the construction of decision trees. The number of decision trees is directly related to model performance and robustness. The grid search algorithm is used to adjust the number and depth of decision trees, thereby improving the random forest algorithm and enhancing its performance. Through grid search, the optimal parameter combination for the base forest algorithm is obtained. Principal component analysis is selected to extract features, thereby reducing dimensionality and improving model efficiency. The mean value processing is performed on the dataset
, expressed as
where
x represents the feature matrix, and
u represents the feature mean vector.
After removing anomalous data from the lifting dataset through outlier detection, the improved random forest algorithm is used to perform preliminary state classification on .
Considering the high dimensionality of jack-up platform lifting data [
25], principal component analysis (PCA) is incorporated into the improved forest algorithm to screen the lifting data features, thereby reducing dimensionality and improving the efficiency of lifting state detection [
26]. Suppose the lifting dataset
contains
N samples and
M features. The mean centering operation is performed on all feature points to ensure that the center of the data is located at the origin. The expression for the centered lifting data
is
where
x represents the corresponding matrix of the data
, and
u represents the mean vector of the lifting data features.
The covariance matrix of
is expressed as
where
represents the covariance matrix, and
represents the transpose of
.
The magnitude of the eigenvalues of the lifting data directly indicates the importance of the corresponding principal components [
27]. Based on this, eigendecomposition is performed on the target matrix
to obtain its eigenvalues and eigenvectors, expressed as
where
represents the eigenvalue, and
represents the eigenvector.
Principal components with a cumulative contribution rate of the eigenvalues
greater than or equal to 90% are selected and projected into a new low-dimensional space. The resulting data matrix is expressed as
where
represents the reduced-dimensional lifting data matrix, and
V represents the eigenvector matrix of the principal components with a contribution rate greater than or equal to 90%.
When using PCA for dimensionality reduction, the reason for selecting a cumulative contribution rate of 90% as the threshold is as follows: In the context of lifting state detection for oil and gas jack-up platforms, a balance needs to be struck between information retention and computational efficiency. A cumulative contribution rate of 90% is a common benchmark in engineering applications that balances information integrity and dimensionality compression. This threshold retains the vast majority of valid information from the original data while reducing the dimensionality from 56 features to 12 features, achieving a feature compression rate of 78.6% and significantly reducing the computational overhead of the subsequent random forest model.
The influence of this threshold on the sensitivity of Gini impurity calculation is analyzed as follows: In the Gini impurity formula, Pk represents the proportion of the k-th class of states in the dataset. The 12 principal components retained after dimensionality reduction preserve 92.7% of the variance information from the original features, thereby maintaining the distribution boundaries of different state categories in the low-dimensional space. Gini impurity is sensitive to the purity of the class distribution in the feature space. If the cumulative contribution rate threshold is set too low, e.g., 70%, some feature information strongly correlated with the lifting state will be lost, causing different state categories to overlap in the reduced-dimensional space. As a result, the Gini impurity values cannot effectively distinguish between categories during node splitting, leading to degraded decision tree classification performance. If the cumulative contribution rate threshold is set too high, e.g., 99%, too many features (close to 35 dimensions) are retained. Although information is fully preserved, feature redundancy persists, and noise features interfere with the optimal selection of split nodes during Gini impurity calculation, causing decision tree overfitting. Therefore, selecting the 90% threshold achieves an optimal balance between information retention and dimensionality reduction, allowing the Gini impurity to maintain high sensitivity to differences in state categories during node splitting.
The core of the improved random forest is the ensemble of multiple decision trees. Each decision tree selects
m samples from the training set
through bootstrap sampling, while also randomly selecting
n features to form a training subset for a single decision tree. Splitting features are selected based on the Gini impurity criterion to construct hierarchical decision trees. The Gini impurity reflects the purity of the dataset
, the smaller the value, the easier the data is to classify [
28,
29,
30]. Its expression is
where
represents the Gini impurity,
l represents the number of lifting state categories, and
p represents the proportion of the
i-th category in the dataset
.
The grid search algorithm was used to optimize the hyperparameters of the random forest model, with the optimization objective being to maximize the average F1-score under 5-fold cross-validation. The optimized parameters included the number of decision trees, maximum depth, minimum number of samples required to split an internal node; the minimum number of samples at a leaf node; and the number of randomly selected features. The search range for the number of decision trees was 50 to 250, with a step size of 25, resulting in nine candidate values: 50, 75, 100, 125, 150, 175, 200, 225, and 250. The search range for the maximum depth was 5 to 50 with a step size of 5, resulting in ten candidate values: 5, 10, 15, 20, 25, 30, 35, 40, 45, and 50. The search range for the minimum number of samples required to split an internal node was 2 to 10 with a step size of 2, resulting in five candidate values: 2, 4, 6, 8, and 10. The search range for the minimum number of samples at a leaf node was 1 to 5 with a step size of 1, resulting in five candidate values: 1, 2, 3, 4, and 5. The search range for the number of randomly selected features was set around the square root of the total number of features. After PCA dimensionality reduction, the total number of features was 12, with a square root of approximately 3.5. Thus, the search range was 2 to 6 with a step size of 1, resulting in five candidate values: 2, 3, 4, 5, and 6. The total number of grid search combinations was 9 × 10 × 5 × 5 × 5 = 11,250. Each configuration was trained under 5-fold cross-validation, yielding five models per configuration, resulting in a total of 56,250 decision tree ensemble models. The grid search results showed that the optimal parameter combination was 100 decision trees, a maximum depth of 20, a minimum of 2 samples required to split an internal node, a minimum of 1 sample at a leaf node, and 4 randomly selected features. Under this combination, the average F1-score under 5-fold cross-validation was 0.976.
The feature with the smallest Gini impurity is selected as the root node to partition the dataset. This process is repeated on the resulting subsets, recursively splitting nodes until the samples in a subset belong to the same category or the preset depth is reached, thereby completing the construction of a single decision tree. This process continues until the iteration termination condition is satisfied, resulting in the construction of multiple decision trees.
Each decision tree is considered as a classifier, and the reduced-dimensional random forest model is denoted as
, generating the preliminary classification result
of the lifting state, expressed as
Based on the categorical state output by the random forest, fuzzy comprehensive evaluation is introduced to refine the results [
31]. Taking the random forest output
as the input, the evaluation factors are constructed, thereby improving the random forest algorithm.
Corresponding to the fault modes identified by the improved random forest, let the factor set for the
j-th type of lifting state be
, expressed as
where
represents the
i-th type of fault under the
j-th type of lifting state.
A fuzzy evaluation matrix is constructed for the factor set
, and fuzzy scoring is performed on the abnormality degree of each state detection feature, i.e., the membership degrees corresponding to slight, moderate, and severe levels, yielding the single-factor evaluation vector
:
where
k represents the number of evaluation grades.
All single-factor evaluation vectors are combined to generate the fuzzy evaluation matrix
for the
i-th type of condition. The weight vector
for each condition detection feature is determined using the analytic hierarchy process, and the comprehensive evaluation result
for the
i-th type of condition is obtained through fuzzy synthesis, expressed as
where
represents the fuzzy operator.
Under the principle of maximum membership degree, the specific abnormality level corresponding to the lifting state is determined based on the comprehensive evaluation result
. Finally, combined with the initial classification from the random forest, the lifting state detection result is obtained as
where
represents the lifting state detection result,
represents the fusion operator of the state category and the abnormality level, and
represents the abnormality level corresponding to the maximum membership degree in the fuzzy comprehensive evaluation result.
The overall algorithmic process of the proposed method is shown in
Figure 1, which mainly consists of four stages: K-means outlier cleaning in the data preprocessing stage, principal component analysis in the feature dimensionality reduction stage, improved random forest in the preliminary classification stage, and fuzzy comprehensive evaluation in the result refinement stage.
The variable descriptions for each stage of the improved random forest-based method for lifting state detection are shown in
Table 1.
5. Test Results and Analysis
To verify the overall effectiveness of the proposed improved random forest-based method for the lifting state detection of jack-up platforms, relevant tests were conducted. The results of the proposed method were compared with those of the jack-up platform ultimate bearing capacity state method and the state detection method after soil scouring around the jack-up platform spudcan, to provide a detailed illustration of the proposed method’s capability in lifting state detection of oil and gas platforms [
32,
33,
34,
35]. The three methods compared in this section are described in detail in
Section 2, along with their limitations.
The tests mainly focused on three aspects: the stability of lifting state time-series detection, the inter-class-to-intra-class distance ratio of clustering, and platform displacement under different incidence angles and motion responses. Based on these three indicators, the superiority of the proposed method is demonstrated in detail through a comparison among the three methods. The reasons for selecting these three aspects are as follows. The stability of lifting state time-series detection directly reflects the method’s ability to resist dynamic marine environmental disturbances during continuous operation, and is a core indicator for assessing whether the detection method is suitable for real-time operation and maintenance scenarios. If the detection results fluctuate significantly, it may lead to misjudgment by operation and maintenance personnel. The inter-class-to-intra-class distance ratio indirectly measures the effectiveness of the K-means clustering cleaning stage in distinguishing abnormal data from normal data. A larger value of this indicator indicates a clearer boundary between abnormal and normal clusters, which directly affects the input data quality for subsequent classification models. The detection of platform displacement under different incidence angles and motion responses verifies the method’s adaptability under dynamic wave loading. In actual marine environments, the platform continuously experiences wave forces of varying directions and intensities. If the detection method cannot adapt to the feature fluctuations caused by such dynamic responses, detection accuracy will drop sharply. These three aspects correspond to the data preprocessing stage, the classification detection stage, and the dynamic operating condition adaptability of the proposed method, respectively. They represent the most commonly involved comprehensive dimensions for evaluating the performance of lifting state detection methods, covering a complete evaluation chain from data quality to detection accuracy and then to environmental adaptability.
5.1. Test Environment
The test dataset employed real-time monitoring data from a jack-up platform during six consecutive months of operation, with a data acquisition frequency of 100 Hz, comprising a total of 128,600 valid sample records. Sample categories were divided according to the operating status of the lifting system, including 92,400 samples of normal lifting state and 36,200 samples of abnormal state. Abnormal state was further subdivided into four typical fault modes: abnormal gear meshing, uneven load distribution, lifting speed fluctuation, and precursors of braking system failure. The number of lifting units was 96, the rated lifting load per leg was 2450 kN, the maximum static support load per leg was 6460 kN, the rated lifting speed of the platform was 0.45 m/min, the rated lifting speed of the legs was 0.90 m/min, and the preload support load was 3450 kN per leg.
The software implementation framework is as follows:
Model training and testing were carried out using Python 3.9. The core machine learning algorithms were implemented based on the Scikit-learn 1.1.2 library. Specifically, K-means clustering was performed using the KMeans class, PCA dimensionality reduction using the PCA class, and the random forest using the Random Forest Classifier class, with the Gini impurity criterion as the default splitting criterion. The fuzzy comprehensive evaluation part was implemented with custom code, and the weight calculation of the analytic hierarchy process was based on the NumPy 1.21.5 library. Data preprocessing and cleaning were performed using the Pandas 1.4.3 library, numerical computations using the NumPy 1.21.5 library, and result visualization using the Matplotlib 3.5.1 library. The development environment was PyCharm 2022.1.3 integrated development environment, the operating system was Windows 11, and the hardware configuration consisted of an Intel Core i7-12700K central processing unit with a main frequency of 3.6 GHz, 32 GB of RAM, and an NVIDIA GeForce RTX 3060 graphics processing unit for accelerating matrix operations. The test environment is shown in
Figure 2.
The hyperparameter settings for each stage of the proposed method are as follows: In the K-means clustering stage, the number of clusters is set to 3, corresponding to the low, normal, and high lifting data clusters. The maximum number of iterations is set to 300, the convergence tolerance is set to 1 × 10−4, and the initial cluster centers are selected randomly. In the PCA dimensionality reduction stage, the number of retained principal components is determined by a cumulative contribution rate threshold, which is set to 90%. Eigendecomposition is performed using the covariance matrix method. In the improved random forest stage, the number of decision trees is set to 100, the maximum depth of each tree is set to 20, the minimum number of samples required to split an internal node is set to 2, the minimum number of samples at a leaf node is set to 1, and the number of randomly selected features is set to the square root of the total number of features. The Gini impurity is used as the splitting criterion, bootstrap sampling is adopted for resampling, and out-of-bag samples are used for internal validation. In the fuzzy comprehensive evaluation stage, the factor set is constructed separately for each of the four fault modes. The number of evaluation grades is set to 3, corresponding to slight abnormality, moderate abnormality, and severe abnormality. The membership function adopts a trapezoidal distribution, the weight vector is determined by the analytic hierarchy process (AHP) with a consistency ratio threshold of 0.1, and the fuzzy synthesis operator adopts the weighted average type.
The specific procedure for model training and validation is as follows: The dataset is divided into a training set and a test set using stratified random sampling at a ratio of 8:2, resulting in 102,880 samples for the training set and 25,720 samples for the test set. The training set is used to determine the cluster centers for K-means clustering, extract principal components for PCA, construct decision trees for the random forest, and learn the weights for fuzzy comprehensive evaluation. The test set is used to evaluate the generalization performance of the models at each stage. To mitigate the impact of randomness in data partitioning on the evaluation results, a 5-fold cross-validation method is adopted for internal validation of the random forest model. Specifically, the training set is evenly divided into five subsets; four subsets are used for model training and one subset for validation, and this process is repeated five times. The average performance across the five folds serves as the basis for hyperparameter selection of the random forest. The test set remains completely unseen throughout the entire model training process and is used only once during the final evaluation stage to ensure the objectivity of the evaluation results on unseen data. To further validate the detection performance of the proposed method under real engineering scenarios, evaluation metrics are established for each stage to quantitatively examine the practical application effectiveness of the proposed method.
5.2. Verification of the Practical Application Effectiveness of the Proposed Method
To further validate the detection performance of the proposed method under real engineering scenarios, evaluation metrics are established for each stage to quantitatively examine the practical application effectiveness of the proposed method. The Silhouette Coefficient and outlier detection recall are adopted as evaluation metrics for the K-means clustering cleaning stage. The Silhouette Coefficient ranges from −1 to 1; a value closer to 1 indicates tighter intra-cluster samples and clearer inter-cluster separation. Outlier detection recall measures the proportion of correctly removed outliers among all actual outliers. Among the total of 128,600 samples in the test dataset, the number of outliers manually annotated was 3858. After K-means clustering cleaning, a total of 3721 outliers were identified and removed, of which 3689 were true outliers and 32 normal samples were incorrectly removed. The calculated silhouette coefficient was 0.87, and the outlier detection recall was 95.6%, indicating that the clustering cleaning stage can effectively separate normal data from abnormal data. The evaluation results of the outlier cleaning effect of K-means clustering are shown in
Table 2.
The cumulative variance contribution rate and the information retention rate were adopted as evaluation metrics for the PCA dimensionality reduction stage. The original lifting data contained 56 feature dimensions. After PCA dimensionality reduction, principal components with a cumulative eigenvalue contribution rate greater than or equal to 90% were selected, resulting in 12 retained principal components. The cumulative variance contribution rate was 92.7%, and the information retention rate was 91.8%, indicating that the dimensionality reduction preserved the vast majority of valid information from the original data while compressing the feature dimensions by 78.6%, significantly reducing the computational complexity of the subsequent random forest model. The evaluation results of the PCA dimensionality reduction effect are shown in
Table 3.
The confusion matrix, precision, recall, and F1-score were adopted as evaluation metrics for the preliminary classification stage of the improved random forest. The tests employed 5-fold cross-validation, with the dataset split into training and test sets at a ratio of 8:2, resulting in a test set size of 25,720 samples. To verify the superiority of the proposed improved random forest algorithm, the decision tree and XGBoost were selected as comparison algorithms, and lifting state classification experiments were conducted under the same training/test set split. The classification confusion matrices of the three methods on the test set are shown in
Table 4,
Table 5 and
Table 6, respectively.
Based on the confusion matrices of the three methods, the precision, recall, and F1-score for each class and overall were calculated, and the results are shown in
Table 7. It can be observed that the proposed improved random forest significantly outperforms the decision tree and XGBoost in all metrics. Its accuracy is 13.1% higher than that of the decision tree and 5.4% higher than that of XGBoost, and its F1-score is 0.134 higher than that of the decision tree and 0.056 higher than that of XGBoost, thereby verifying the superiority of the proposed method in the lifting state classification task.
For the platform displacement detection task under different incidence angles and motion responses, the displacement detection results have continuous numerical attributes; therefore, the root mean square error (RMSE) and the coefficient of determination (R
2) are adopted as evaluation metrics. The comparison of RMSE and R
2 among the three tree-based methods on the displacement detection task is shown in
Table 8. It can be observed that the RMSE of the proposed improved random forest algorithm is 0.008 m, which is significantly lower than those of the decision tree (0.042 m) and XGBoost (0.021 m), and its R
2 reaches 0.978, also outperforming the two comparison algorithms. This indicates that the proposed method achieves higher accuracy and better fitting capability in continuous numerical prediction tasks as well.
For the refinement stage of fuzzy comprehensive evaluation, the grade classification accuracy and the mean absolute error (MAE) are adopted as evaluation metrics. The grade classification accuracy measures the consistency between the abnormality grades output by fuzzy comprehensive evaluation and the manually annotated true grades, while the mean absolute error measures the average deviation between the predicted grades and the true grades. Among the 36,200 abnormal samples, after refinement by fuzzy comprehensive evaluation, the evaluation results of the grade refinement effect of fuzzy comprehensive evaluation are shown in
Table 9. It can be seen that the average grade classification accuracy reaches 89.7%, and the mean absolute error is only 0.12. This indicates that fuzzy comprehensive evaluation can effectively distinguish different abnormality degrees within the same fault mode, providing a reliable basis for graded early warning of the lifting system.
The Sobol global sensitivity analysis method was employed to evaluate the influence of each input feature on the model output. The Sobol method decomposes the variance in the model output into contributions from each input parameter and their interactions, quantifying parameter sensitivity by calculating the first-order sensitivity index and the total-order sensitivity index. Five key parameters were selected for analysis: the number of clusters in K-means, the cumulative contribution rate threshold in PCA, the number of decision trees in the random forest, the maximum depth of the random forest, and the number of grades in fuzzy comprehensive evaluation. Each parameter was sampled 5000 times within a reasonable range of values. The first-order sensitivity index reflects the individual effect of a single parameter on the model output, while the total-order sensitivity index captures the overall effect including interactions. The results of the Sobol global sensitivity analysis are shown in
Table 10.
It can be observed that the number of decision trees in the random forest has a first-order sensitivity index of 0.412 and a total-order sensitivity index of 0.487, the highest among all parameters, indicating that the number of decision trees has the greatest impact on the detection accuracy of the model. The PCA cumulative contribution rate threshold ranks second, with a first-order sensitivity index of 0.278 and a total-order sensitivity index of 0.315. The number of clusters in K-means ranks third, with a first-order sensitivity index of 0.156 and a total-order sensitivity index of 0.189. The maximum depth of the random forest has a first-order sensitivity index of 0.098 and a total-order sensitivity index of 0.124. The number of grades in fuzzy comprehensive evaluation exhibits the lowest sensitivity, with a first-order sensitivity index of 0.032 and a total-order sensitivity index of 0.045. When the number of decision trees increases from 50 to 150, the detection accuracy first improves from 91.2% to 97.8% and then levels off. When the PCA cumulative contribution rate threshold increases from 80% to 95%, the detection accuracy first increases from 92.5% to 97.6% and then decreases slightly. Therefore, it is recommended to set the number of decision trees in the range of 100 to 120 and the PCA cumulative contribution rate threshold in the range of 90% to 92%. Under this parameter combination, the model achieves optimal performance with low sensitivity to parameter fluctuations.
5.3. Stability Analysis of Improved Random Forest Detection
In the practical deployment of lifting state detection for oil and gas jack-up platforms, the stability of time-series lifting state detection can verify whether the method is suitable for complex marine operating conditions. During the operation of the lifting system, lifting data must be continuously collected. Given the complexity of the marine environment, significant fluctuations in detection results can easily lead to misjudgment by operation and maintenance personnel, directly limiting the applicability of the detection method in real-time operation and maintenance scenarios. To verify the stability of the proposed method, the Time-series Detection Stability (TDS) was adopted as the core evaluation metric under the above test environment. This metric quantifies the fluctuation degree of lifting state detection results in continuous time-series data. A TDS value closer to 1 indicates more stable detection results, demonstrating the stronger capability of the proposed improved random forest algorithm to resist marine environmental disturbances. Its calculation formula is
where
T represents the time-series length, and
t represents the lifting state detection result at time.
Sample data are randomly selected, and one hour of continuous time-series monitoring data of the lifting system is input to generate the TDS values for each method. The test results are shown in
Figure 3.
According to the test results, the time-series detection stability of the improved random forest under the proposed method is significantly better than those of the other two comparison methods. Comparing the TDS value trends of the three methods, the TDS value of the improved random forest after applying the proposed method remains consistently above 0.92, while the TDS values of the other two methods fluctuate between 0.11 and 0.88 and 0.28–0.89, respectively. This indicates that the improved random forest can provide stable and reliable state judgment results for the real-time operation and maintenance of the lifting system.
The fact that the proposed improved random forest method achieves extremely high TDS with no decreasing trend can be attributed to the following reasons: First, the K-means clustering-based outlier cleaning removes abrupt anomalous points caused by marine environmental interference at the data source. Such anomalous points are exactly the main cause of time-series jumps in detection results of traditional methods. After the removal of outliers, the input data features at adjacent time steps remain continuous and stable, naturally leading to a higher TDS value. Second, the PCA dimensionality reduction step compresses the original 56-dimensional features into 12 principal components. This process essentially acts as a low-pass filter, where high-frequency noise features are discarded as low-contribution components, making the reduced-dimensional feature sequence smoother over time. Third, the ensemble voting mechanism of the random forest suppresses fluctuations in the outputs of individual decision trees. Even if some decision trees produce different classification results due to minor data fluctuations, the output label after majority voting remains unchanged, significantly reducing the probability of time-series jumps. Fourth, the abnormality grade output by fuzzy comprehensive evaluation is a discretized result derived from continuous membership degree calculation; slight feature variations do not cause grade jumps. The combined effect of these four stages ensures that the TDS value of the proposed method remains consistently above 0.91 over a continuous 72 h test with no observed decay. This stability originates from the multi-level design of the method—including outlier removal, noise filtering, ensemble smoothing, and fuzzy refinement—rather than from data overfitting or idealized results.
To further verify the stability of the proposed method over a longer time series, the test sample range was extended from 1 consecutive hour to 72 consecutive hours, i.e., the complete monitoring data of the platform over three consecutive days of operation, comprising a total of 25,920,000 sampling points. The statistical results of the TDS values after the extension are shown in
Table 11.
It can be seen in
Table 11 that the TDS value of the proposed method remains consistently between 0.91 and 0.94 over the 72 h continuous detection, with a mean value of 0.925 and a standard deviation of 0.008, showing no significant decay or severe fluctuation. Compared with the 1 h test results, the mean TDS of the proposed method decreased by only 0.005 over the 72 h test, while the standard deviation increased by only 0.002. In contrast, the mean TDS values of the two comparison methods decreased by 0.09 and 0.06, and their standard deviations increased by 0.031 and 0.025, respectively. The above results indicate that the proposed improved random forest method exhibits good long-term stability and can meet the continuous detection requirements under various marine environmental conditions.
It should be noted that TDS metric measures the label consistency between consecutive time steps, i.e., whether the detection results at adjacent time instants undergo abrupt changes, rather than the detection accuracy. A high TDS value merely indicates that the detection results change smoothly over time and does not guarantee the correctness of the detection result at each time instant. An extreme case exists: a method that consistently predicts an incorrect state but always outputs the same incorrect label can still achieve a TDS value of 1.0, while its detection accuracy may be very low. To address this issue, this paper adopts both the TDS metric and detection accuracy as two dimensions for evaluating the overall detection performance. The TDS metric measures the temporal smoothness of the detection results, while detection accuracy measures the correctness of the results at each time instant. The proposed method achieves both a mean TDS of 0.925 and a detection accuracy of 97.8%, outperforming the comparison methods in both metrics, indicating that the method maintains temporal stability without sacrificing detection accuracy. If a method exhibits high TDS but low accuracy, it can be improved by introducing a sliding window voting mechanism, i.e., outputting the final state after majority voting over the detection results of multiple consecutive time steps. In future work, a voting strategy with a window length of 5 will be adopted to further suppress single-point misjudgments.
5.4. Outlier Removal Effect Based on Inter-Class-to-Intra-Class Distance Ratio
In the abnormal lifting data cleaning stage, the K-means clustering results directly affect the outlier removal capability. To further verify the detection capability of the proposed method, the inter-class-to-intra-class distance ratio was adopted as an indirect evaluation metric to measure the separation between clusters and the compactness within clusters. A larger value of this metric indicates more significant inter-class differences, more concentrated intra-class samples, and better differentiation between abnormal data and normal data. Its calculation formula is
where
represents the inter-class-to-intra-class distance ratio,
represents the average inter-cluster distance, and
represents the average intra-cluster distance. Here,
is the average distance between different cluster centers, and
is the average distance from samples within each cluster to the cluster center. The maximum value of
is typically 5, and a larger value indicates better clustering performance. Test results are shown in
Figure 4.
According to the test results, the value of clustering in the proposed method reaches 4.85, while the maximum values of the other two methods are 4.2 and 4.3, respectively. However, these two algorithms exhibit excessively low minimum values and significant overall fluctuations. Combined with the data distribution, it can be seen that the inter-cluster distance between abnormal clusters and normal clusters after clustering using the proposed method is 4.85 times the intra-cluster distance, which is much higher than that of the comparison methods, indicating a clearer boundary for distinguishing between abnormal and normal data. This demonstrates that the clustering method employed in the proposed approach effectively enhances inter-cluster separation and intra-cluster compactness of the lifting data, improves the accuracy of abnormal data cleaning, and provides more reliable data support for subsequent state detection.
5.5. Platform Displacement Under Different Incidence Angles and Motion Responses
Under wave loading, the platform exhibits motion responses such as surge, heave, and pitch. If the detection method cannot adapt to the feature fluctuations caused by such dynamic responses, detection accuracy will sharply decline. To fully validate the motion response capability of the proposed method, three types of motion responses—surge, heave, and pitch—were set in the test. To further verify the capability of the proposed method, the displacements of the three methods under different incidence angles and motion responses were compared with the actual displacement, and the detection capabilities of the three methods were evaluated based on the results. The test results are shown in
Table 12.
According to the test results, the displacements obtained by the proposed method are perfectly consistent with the actual results. In comparison with the other two methods, both exhibit varying degrees of displacement deviation. It should be noted that the reason why the proposed method achieves displacement detection that is perfectly consistent with the actual results is mainly attributed to two aspects of its design. First, the K-means clustering cleaning effectively removes abnormal data caused by marine environmental interference, significantly improving the quality of the training data input to the model and reducing detection deviations caused by anomalous samples. Second, based on the preliminary classification of the random forest, the fuzzy comprehensive evaluation refines the distinction of abnormality levels, so that the final detection result is not a simple discrete category output but a comprehensive judgment that integrates the state category and the degree of abnormality. Under different incidence angles and motion response conditions, the method can stably capture the correspondence between displacement features and the lifting state, thus demonstrating a high degree of consistency with the actual results. These results validate the detection accuracy of the proposed method under dynamic marine conditions, rather than being caused by data overfitting or idealized assumptions. This demonstrates the capability of the proposed method for platform lifting state detection.
5.6. Lifting State Detection Accuracy
The comparison of lifting state detection accuracy for oil and gas jack-up platforms among the three methods is shown in
Figure 5. It can be seen that the detection accuracy of the proposed method remains above 95% across all experimental runs, with a stable curve, far exceeding that of the comparative methods. This indicates that the proposed improved random forest method has significant advantages in lifting state detection accuracy and exhibits good robustness.
The reasons for achieving such high detection accuracy and good robustness are as follows: first, the use of K-means clustering to remove outliers from the lifting data effectively eliminates anomalous samples caused by marine environmental interference and sensor noise, thereby improving the quality of the training data; second, the introduction of PCA into the random forest for feature dimensionality reduction eliminates redundancy among high-dimensional features, reduces the risk of overfitting during decision tree splitting, and optimizes the split nodes in combination with the Gini impurity criterion, making the model more sensitive to key state features; and, finally, the introduction of fuzzy comprehensive evaluation refines the preliminary classification results of the random forest into graded levels, overcoming the limitation of the traditional random forest that only outputs discrete categories, and enabling the distinction of different abnormality degrees within the same fault mode. Consequently, the proposed method maintains stable and accurate detection performance under time-series fluctuations and different motion response conditions.