Ship data evolution sampling method based on levy distribution

CN116720443BActive Publication Date: 2026-10-23JIANGNAN UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310727000.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-19
Publication Date
2026-10-23
Estimated Expiration
2043-06-19

AI Technical Summary

Technical Problem

[0006]本发明旨在提供一种新颖的在马尔科夫蒙特卡洛基础上的基于Levy分布的演化采样方法,来解决现有船舶建模与子样设计存在物理实验数据来源少、实验成本高、采样困难等问题,进而为后续的代理模型设计提供充分且合理的数据支撑

Benefits of technology

[0045]本发明的有益效果:本发明引入了一种自适应Levy分布参数来完成演化采样任务。它通过设定参数α不同的取值,使得转移概率分布对应不同的对称分布,扩大搜索空间,增加了候选样本的多样性。在测试函数上与多种分布函数的演化采样进行了比较,结果表明,该方法能够提供准确可靠的采样结果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116720443B_ABST
    Figure CN116720443B_ABST
Patent Text Reader

Abstract

A Levy distribution based evolutionary sampling method for ship data. The algorithm proposes an adaptive Levy distribution transition probability function. Let each sample in the sample set generate two samples to be selected according to the parameter values of 1.0 and 2.0 of the Levy distribution, and update the two sample sets obtained by the rejection selection operation. Compare the standard deviations of the two sample sets to determine the final sample set. The adaptive Levy distribution makes the selection of parameters rely on the evolution process itself. Through a series of experiments on 15 test functions and actual ship data, the performance of four evolutionary sampling algorithms is compared. It is proved that the evolutionary sampling algorithm based on adaptive Levy distribution not only improves the convergence speed, but also increases the accuracy of the sample.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of sampling, specifically relating to a ship data evolution sampling method based on Levy distribution and Markov Monte Carlo model. Background Technology

[0002] Sampling is the process of obtaining a sample distribution from a target probability distribution. Representative samples allow for effective analysis and utilization of the target probability distribution. It plays a crucial role in computational and simulation problems across many machine learning fields.

[0003] For a machine learning problem that can be solved using a probabilistic framework, an effective sampling strategy to obtain representative samples of the target probability function is particularly important. Many types of sampling strategies have been proposed, including inverse transform, accept-rejection sampling, importance sampling, and Markov Chain Monte Carlo (MCMC) methods.

[0004] In machine learning, when solving problems such as the probability of random events, the expected value of random variables, and the analysis of posterior probability distributions in Bayesian inference, certain numerical features of random distributions may need to be solved through integration. However, some integrals may not have analytical solutions or are difficult to obtain, posing challenges to the analysis of specific problems. For such problems that can be solved using a probabilistic framework, transforming them into features of a certain random distribution for computation is a new approach. For uniform distributions, computers can easily sample them, but for more complex distributions, traditional computational methods often fail to solve the problem. The Monte Carlo (MC) method, as a numerical computational method based on probability and statistics, can effectively solve this problem. The core idea of ​​the MC method is to use random numbers to solve some complex computational problems. That is, by using random sampling, the probability of random events is estimated using their frequency, or the numerical features of random variables are estimated using the numerical features of samples, and these are used as solutions to the problem. Traditional rejection sampling and importance sampling strategies are both independent sampling, meaning that the samples are independent of each other. Since a large portion of the sampled data is invalid, the sampling efficiency is very low. Markov chain Monte Carlo (MCMC) methods rely on association sampling, where relationships exist between samples. This approach offers high sampling efficiency and almost perfectly meets the requirements for both efficiency and accuracy. Evolutionary sampling strategies, built upon MCMC, simulate biological evolution by combining evolutionary computation, function approximation, and rejection sampling. Furthermore, they apply a probabilistic framework to achieve the best approximation of a point-by-point computable probability density function, making them applicable to almost all machine learning problems that can be converted to computation using a probabilistic framework.

[0005] With the continuous advancement of fluid mechanics theory and the rapid development of computer technology, applying linear optimization design of ship hulls based on fluid mechanics theory to actual ship design has become mainstream. However, CFD technology also suffers from problems such as high computational load and high simulation cost. Therefore, how to design ship design and overall performance evaluation methods with lower computational load and higher efficiency based on ship physical experimental data and CFD simulation data is an urgent need to enhance the competitiveness of my country's shipbuilding industry in the international market and improve the shipbuilding capabilities of Chinese shipbuilding enterprises. Because the sources of physical experimental data required for ship modeling and sample design are limited, the experimental cost of acquiring data is high, and data collection is extremely difficult, much data on ship hull characteristics is hard to obtain. If the data on ship hull characteristics is insufficient or the quality of the supplementary data is low, it will affect the accuracy of subsequent proxy models and cause a series of problems such as difficulty in model optimization. The evolutionary sampling algorithm based on the Levy distribution can supplement the existing physical experimental data with a set of reasonable and reliable ship hull data, providing sufficient and reasonable data support for the subsequent model construction and optimization. Summary of the Invention

[0006] This invention aims to provide a novel evolutionary sampling method based on the Levy distribution, building upon Markov Monte Carlo methods, to address the problems of limited physical experimental data sources, high experimental costs, and sampling difficulties in existing ship modeling and sample design, thereby providing sufficient and reasonable data support for subsequent surrogate model design.

[0007] The technical solution of this invention:

[0008] The ship data evolution sampling method based on Levy distribution has the following specific steps:

[0009] (1) Based on existing ship data O m {x1, x2, ..., x m}, where m represents the number of data points, and each data point x has d features, represented as {x1, x2, ..., x...}. d}, where k represents the k-th iteration. During initialization, k = 0. N is initialized by multiplying the difference between the maximum and minimum values ​​of each data feature by a random number following a 0-1 distribution. S Group of ship data support samples, initial ship data sample set Represents the Nth ship in the initial ship data sample set. S Each data point in the initial ship data sample set contains d features.

[0010] (2) For ship data sample sets Each ship data sample Perform steps (3) to (6). Represents a sample set of ship data The i-th data in the k-th iteration.

[0011] (3) For each feature in each ship data, perform steps (3)-(4), and use the Levy distribution function as the transition probability function according to the value of α. Under different values, the characteristics of each ship data sample are determined according to... Generate a candidate value j = 1, 2, ..., d, and its candidate supporting samples are:

[0012] (4) Generate a uniform random number R in the range [0, 1]; if the following conditions are met... So accept Then proceed to step (5); otherwise, refuse. Then let It represents the j-th feature of the i-th data in the k-th iteration.

[0013] (5) Continue until all features have been updated. calculate Given the value of , generate another uniform random number R′ in the range [0, 1], if the following condition is met: Then successfully accepted Otherwise, reject it.

[0014] (6) If If it is successfully accepted, then let Otherwise

[0015] (7) Update the equation k = k + 1, and update the sample set for different values ​​of α = 1.0 in the Levy distribution function. Update the sample set when α = 2.0 and, And calculate the corresponding standard deviation. and like The sample set is Otherwise, the sample set is

[0016] (8) If the difference between two consecutive support sample sets is small or other termination conditions are met, then the sampling procedure ends; otherwise, proceed to step (2).

[0017] (9) Output the final support sample set and the corresponding p k (x).

[0018] Furthermore, in step (1), the existing ship data includes ship length, beam, draft, initial trim, initial metacentric height, waterline length, roll period, center of gravity height, block coefficient, bilge keel area, flood angle, wind pressure moment, measured projected area, measured projected center of gravity height, and displacement. Among these, ship length, beam, initial trim, waterline length, block coefficient, bilge keel area, flood angle, wind pressure moment, measured projected area, and side projected center of gravity height are all constant values. The roll period is calculated from other varying values, so it is not sampled. Draft, initial metacentric height, center of gravity height, and displacement are sampled.

[0019] Furthermore, in step (3), the specific details are as follows:

[0020] In ES, SSM uses kernel function density estimation (KDE) to represent the distribution of samples. In KDE, the probability density distribution of the sample set is represented by a weighted combination of a set of Gaussian density functions. The definition of SSM is shown in equation (2):

[0021]

[0022] in, These are sample data, i = 1…N S N S It is the number of samples, a i The weighting coefficient is set to 1 / N. S . The Gaussian kernel function K is defined as shown in equation (3):

[0023]

[0024] h i It is the bandwidth, i.e., the smoothing parameter of KDE. By processing the sample data through the Gaussian kernel function, SSM can be applied to the ES algorithm. Choosing the "thumb rule" to generate the optimal bandwidth parameter value can make the kernel function density estimation easily approximate. The Silverman thumb rule expression is shown in (4):

[0025]

[0026] Where, σ i Let be the sample variance, i = 1, 2, ..., d.

[0027] From equations (2) and (3), the probability density distribution of the target model and the probability density of the support sample set (SSM) can be obtained: The sample set in equation (2) Using existing ship dataset O mBy substituting the values, the probability distribution π(x) of the target model can be obtained, and the probability density p(x) of the support sample set SSM can be directly substituted into equations (2) and (3) to obtain the results.

[0028] Using the Levy distribution as the transition probability function This indicates that at the current k-th iteration, the current sample Generate candidate samples The probability of the current sample As the location parameter value of the distribution, the candidate samples are calculated from this distribution. The probability of is shown in equation (5):

[0029]

[0030] Here, γ is the scaling factor, satisfying γ > 0, and is set to 1. α controls the shape of the distribution, satisfying 0 < α < 2. q represents the integral letter; for α = 1, this integral can be reduced to a Cauchy distribution. As α → 2, the distribution is no longer a Levy distribution, but a Gaussian distribution. The parameter α controls the range of the distribution, causing the probability distribution to exhibit different shapes, especially in the tail region; the smaller the parameter α, the longer the tail.

[0031] Generate candidate samples that follow a Levy distribution. The formula is shown in equation (6):

[0032]

[0033] Where V is a uniformly distributed... The random numbers are given by w, which is a random number following an exponential distribution with a mean of 1, and μ represents the position parameter, which is set as follows. This represents the Levy distribution that selects candidate values ​​using the current feature value as the location parameter. X represents the different values ​​of α. The value; obtained through equation (6) Candidate support samples are Candidate samples are generated, and their probability values ​​of the transition function are calculated using equation (5). Used for subsequent calculations.

[0034] Furthermore, in step (4), The calculation process is as follows:

[0035]

[0036] Then, a second rejection is made using equation (8):

[0037]

[0038] It has a similar form to the classic Metropolis-Hasting rejection sampling, namely Satisfying the detail balance equation Unlike traditional rejection sampling strategies, This is the second rejection operation in the ES algorithm, which ensures... right The approximate effect. p k (x) is a support sample model used to estimate the probability density of the sample.

[0039] Furthermore, in step (7) and The calculation process is as follows:

[0040] The performance of the ES algorithm is commonly evaluated by convergence, standard deviation, and computation time. The normalization factor λ, calculated as shown in equation (9), can be used to evaluate the convergence of the algorithm.

[0041]

[0042] When λ converges to a stable value, the ES algorithm converges to an optimal stable solution. Therefore, the degree of change in the value of λ between two adjacent evolutionary sampling processes determines whether the ES learning process terminates. That is, if the change in λ is very small, it indicates that the ES algorithm ends the evolutionary process.

[0043]

[0044] in, This represents the standardized output, i.e. According to equation (10), the smaller the standard deviation J, the closer the obtained support sample set is to the true sample set of the target probability distribution, and the higher the accuracy of the sample.

[0045] The beneficial effects of this invention are as follows: This invention introduces an adaptive Levy distribution parameter to complete the evolutionary sampling task. By setting different values ​​of parameter α, the transition probability distribution corresponds to different symmetric distributions, expanding the search space and increasing the diversity of candidate samples. Comparisons were made with evolutionary sampling using various distribution functions on the test function, and the results show that this method can provide accurate and reliable sampling results. Attached Figure Description

[0046] Figure 1 A flowchart of the basic evolutionary sampling algorithm.

[0047] Figure 2 Plots of Levy probability distribution and symmetric exponential probability distribution with different parameters

[0048] Figure 3 "Fat-tailed" distributions of Levy probability distribution and symmetric exponential probability distribution with different parameters

[0049] Figure 4 Flowchart of the adaptive evolutionary sampling algorithm based on the Levy distribution

[0050] Figures 5(a) to 5(f) show the convergence and accuracy curves of the four evolutionary sampling algorithms on the unimodal function.

[0051] Figures 6(a) to 6(l) show the convergence and accuracy curves of the four evolutionary sampling algorithms on functions with slight local optima.

[0052] Figures 7(a) to 7(l) show the convergence and accuracy curves of the four evolutionary sampling algorithms on functions with obvious local optima.

[0053] Figure 8 This represents the number of candidate samples successfully accepted when the ES-ALPD algorithm is applied to the test function π14. The total number of successfully accepted samples should be summed to 100%.

[0054] Figure 9(a) shows the data distribution curves of the standard deviations obtained from the 15 test functions.

[0055] Figure 9(b) shows the data distribution curves of the normalization factors obtained from the 15 test functions.

[0056] Figure 10(a) shows the convergence of the algorithm on actual ship type data.

[0057] Figure 10(b) shows the accuracy curve of the algorithm on actual ship type data. Detailed Implementation

[0058] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0059] 1. Markov Monte Carlo

[0060] Markov Chain Monte Carlo (MCMC) is a Monte Carlo simulation method developed in the early 1950s. It is based on Bayesian theory and uses computer simulations. This method introduces Markov processes into Monte Carlo simulations, enabling dynamic simulations where the sampling distribution changes as the simulation progresses.

[0061] The advantage of Markov chain Monte Carlo simulation is its ability to solve complex probability distribution simulation problems that are difficult to address with the Monte Carlo method. Its disadvantages include challenges in selecting the Markov chain to ensure rapid convergence to a stationary distribution, determining when a stable state has been reached, and ensuring that the generated random numbers are independent. Although the Markov chain Monte Carlo method is not perfect, it remains a unique and effective solution for many complex and difficult problems.

[0062] There are various algorithms for Markov chain Monte Carlo (MCMC) algorithms. Before introducing the MCMC algorithm, we will first introduce the definitions of Markov chain invertibility and detail balance equations.

[0063] Definition 1.1: A stationary Markov chain with an initial distribution of π and a state space of S holds the following equation for all x, y∈S:

[0064] π(x)q(x,y)=π(y)q(y,x) (1)

[0065] If q(x, y) represents the one-step transition probability from x to y, then the Markov chain is said to be invertible. Different methods of constructing the transition probability function represent different MCMC methods. Below, we introduce two well-known MCMC algorithms: the Metropolis-Hastings algorithm and the Gibbs algorithm.

[0066] The Metropolis-Hastings algorithm works as follows:

[0067] First, a suitable state space S is selected based on the target distribution π(x), and the initial transition density function q(x) is chosen. i ,y), where x i ∈S, i = 0, 1, ..., n, the same below;

[0068] Secondly, select an appropriate initial value x0 for the Markov chain;

[0069] Third, according to the initial transfer density function q(x) i ,y), based on the random number x determined in the previous step i Generate a random number y;

[0070] Fourth, according to the following acceptance-rejection probability T i The expression (x, y) accepts the random number y generated in the previous step:

[0071]

[0072] If accepted, let x i+1 =y, otherwise, let x i+1 =x i ;

[0073] Fifth, repeat steps three and four above until a sufficient number of random numbers are generated.

[0074] The Gibbs algorithm works as follows:

[0075] Gibbs sampling is a simple and widely used algorithm often employed for sampling multidimensional random variables. The Gibbs algorithm is a special case of the Metropolis-Hastings sampling method. Let x be an n-dimensional random variable, whose probability distribution is represented by p(x) = p(x1, x2, ..., xn). n Let x \k =x1, ...x k-1 x k+1 ...x n The steps for sampling a random variable x using the Gibbs sampling method are as follows:

[0076] Step 1: Randomly initialize the Markov chain to obtain the initial state x0;

[0077] Step 2: Let t = 0, ..., n

[0078] (1) Utilizing conditional distribution For variables Perform sampling;

[0079] (2) Utilizing conditional distribution For variables Perform sampling;

[0080] …

[0081] (3) Utilizing conditional distribution For variables Perform sampling;

[0082] …

[0083] (4) Utilizing conditional distribution For variables Sampling

[0084] Step 3:

[0085] By cyclically sampling the random variable over a time interval t, a Markov chain x of the n-dimensional random variable x can be obtained. (1) ...x (n) .

[0086] When Gibbs' algorithm samples the random variable xk, it ensures that other variables remain constant. Let x... * For the generated candidate samples, then The Gibbs sampling algorithm can be seen as a special case of the Metropolis-Hastings sampling algorithm, where the acceptance probability function is always 1. Therefore, it utilizes the probability distribution... The samples obtained from sampling are always accepted as random variables. The sample.

[0087] As can be seen from the algorithm described above, the Gibbs sampling algorithm transforms a multidimensional sampling problem into a one-dimensional variable sampling problem. This is a key factor in the widespread application of the Gibbs sampling algorithm.

[0088] The above mainly discusses the most basic Metropolis-Hastings algorithm and its special case, the Gibbs algorithm. There are many generalized versions of the Metropolis-Hastings algorithm, which will not be described in detail here.

[0089] 2. Theoretical basis of evolutionary sampling algorithm

[0090] The goal of evolutionary sampling learning is to obtain the optimal SSM parameters to approximate a probability distribution. Generally, this problem can be represented within a probabilistic framework as follows:

[0091]

[0092] Among them, X s * It is the optimal combination of all possible supporting samples, where Mp(·) and π(·) represent the probability distributions of the SSM and the target model, respectively, ||·|| TV Let p(·) and G(x, y, θ) represent the total variable distance. For ease of description, let p(·) and G(x, y, θ) replace Mp(·) and K(x, y; θ), respectively. Equation (3) implies that the optimal support sample set can be obtained during the evolution process by minimizing the distance between the SSM and the target model.

[0093] The Elasticsearch (ES) algorithm, based on the core idea of ​​the rejection sampling strategy, designs a similar sampling procedure for each supporting sample. Therefore, ES has NS concurrent rejection sampling chains. For each sampling chain, a candidate sample is first generated, and then this candidate sample is accepted as a new sample with a certain probability. Typically, we let A... k (x, y) represents the probability of generating a new sample y from sample x in the k-th rejection sampling step. Let α k (x, y) represents the probability of receiving data y as a new sample. Therefore, if the current supporting sample data is x, then after performing the k-th rejection sampling step, the probability of receiving sample data y (y ≠ x) as a new sample is A. k (x, y) × α k(x, y), which is consistent with the traditional rejection sampling strategy. Therefore, A k (x, y) and α k The specific expression for (x, y) will completely determine the final sampling result. The following formula is used to solve equation (3).

[0094]

[0095]

[0096] Where, q k (x, y) represents the probability of generating a new candidate sample y directly from x. And it satisfies symmetry, i.e., q k (x, y) = q k (y, x). The transition probability function has multiple choices (such as symmetric exponential functions and Gaussian functions), which directly affect the search range and are the main determinant of the performance of evolutionary sampling algorithms. Different sampling problems often require different transition probability functions to achieve the desired goal.

[0097] 3. Method Overview

[0098] In Markov chains, parent samples generate child samples based on a certain transition probability function. A promising child sample can often accelerate the convergence of the Markov chain. Therefore, the choice of transition probability function is crucial. Many functions with finite second moments have been considered for the selection of transition probability functions, such as the normal distribution and the symmetric exponential distribution. We will introduce a function with infinite second moments and adjustable parameters, namely the Levy probability distribution, as the transition probability function for the design of the ES algorithm.

[0099] Consider a set of identically distributed random variables {Y} i A process denoted by} is considered stable if the sum of its random variables has the same probability distribution and can be considered as individual random variables. A typical example of a stable process is a Gaussian process. Similar to Gaussian processes with finite second moments, there is a class of probability distributions with infinite second moments that can also produce stable processes. This probability distribution is called the Levy probability distribution, and it has the following formula:

[0100]

[0101] The Levy distribution is symmetric about y=0 and has two parameters, γ and α. γ is a scaling factor satisfying γ>0, usually set to γ=1. α controls the shape of the distribution, satisfying 0<α<2. The analytical expression of this integral is unknown for ordinary α, but it can be obtained for some special cases. In particular, for α=1, this integral can be reduced to a Cauchy distribution. As α→2, the distribution is no longer a Levy distribution, but becomes a Gaussian distribution. The parameter α controls the range of the distribution, causing the probability distribution to exhibit different shapes, especially in the tail region; the smaller the parameter α, the longer the tail. For the general case of the Levy distribution, we can approximate the following analytical expression:

[0102]

[0103] Where X represents a random variable obtained from the Levy distribution, and w is a random variable with an exponential distribution and a mean of 1.

[0104] Due to the adjustable nature of the Levy distribution parameters, for each transition operation in each generation, we use two different parameters α (α = 1.0 and α = 2.0 respectively) to generate two child samples from a parent sample, and then select the better one as the candidate sample. Here, α = 1.0 and α = 2.0 are two special cases of the Levy distribution, namely the Cauchy distribution and the Gaussian distribution. Using this adaptive Levy distribution as the transition probability function allows the sampling algorithm to dynamically select the value of parameter α during the evolution process, determining which sample is closer to the standard sample, thus achieving a transition from global search to local fine-tuning. This transition probability function scheme is adaptive; the selection of parameter α does not need to be predefined but is determined by the specific evolution process.

[0105] 4. Experimental Dataset

[0106] (I) Existing ship type data, as shown in Table 1, includes a portion of the data:

[0107] Table 1 shows partial data from existing ship type data.

[0108]

[0109]

[0110] The steps of the ship data evolution sampling method based on Levy distribution are as follows:

[0111] (1) Based on existing ship type data O m {x1, x2, ..., x m}, where m represents the number of data points, and each data point x has d features, represented as {x1, x2, ..., x...}. d}, where k represents the k-th iteration. During initialization, k = 0. N is initialized by multiplying the difference between the maximum and minimum values ​​of each data feature by a random number following a 0-1 distribution. S Ship type data support samples, initial ship type data sample set Represents the Nth hull number in the initial ship type data sample set. S Each data point in the initial ship type data sample set also includes d features;

[0112] (2) For ship type data sample set Each ship type data sample Perform steps (3) to (6). Represents a sample set of ship type data The i-th data in the k-th iteration;

[0113] (3) For each feature in each ship type data, perform steps (3)-(4), and use the Levy distribution function as the transition probability function according to the value of α. Under different values, the characteristics of each ship type data sample are determined according to... Generate a candidate value j = 1, 2, ..., d, and its candidate supporting samples are:

[0114] (4) Generate a uniform random number R in the range [0, 1]; if the following conditions are met... So accept Then execute

[0115] Next step (5); otherwise refuse. Then let This represents the j-th feature of the i-th data in the k-th iteration;

[0116] (5) Continue until all features have been updated. calculate Given the value of , generate another uniform random number R′ in the range [0, 1], if the following condition is met: Then successfully accepted Otherwise, reject it;

[0117] (6) If If it is successfully accepted, then let Otherwise

[0118] (7) Update the equation k = k + 1, and update the sample set for different values ​​of α = 1.0 in the Levy distribution function. Update the sample set when α = 2.0 and, And calculate the corresponding standard deviation. and like The sample set is Otherwise, the sample set is

[0119] (8) If the difference between two consecutive support sample sets is small or other termination conditions are met, then the sampling procedure ends; otherwise, proceed to step (2).

[0120] (9) Output the final support sample set and the corresponding p k (x).

[0121] In Table 1, the ship's length, beam, initial trim, waterline length, block coefficient, bilge keel area, flooding angle, wind pressure moment, projected area, and side projected center height are all constant values. The roll period is calculated from other varying values, therefore it is not sampled. We sample the draft, initial metacentric height, center of gravity height, and displacement, and then initialize N. s Group support samples hour, The calculation of other feature values ​​is the same. Multiple random numbers u following a 0-1 distribution can be obtained to acquire multiple sets of values. If other feature values ​​change in the existing data and require sampling, such as the bilge keel area, the number of sampling features can be increased to supplement the sampling of the changed features. After initializing the sample set, we sample its features.

[0122] The goal of evolutionary sampling learning is to obtain the optimal SSM parameters to approximate a probability distribution. Generally, this problem can be expressed within a probabilistic framework as shown in equation (1):

[0123]

[0124] Where, x S * It is the optimal combination of all possible supporting samples, where Mp(.) and π(·) represent the probability distributions of the SSM and the target model, respectively, ||·|| TV Let p(·) and G(x, y, θ) represent the total variable distance. For ease of description, let p(·) and G(x, y, θ) replace Mp(·) and K(x, y; θ), respectively. Equation (1) means that the optimal support sample set can be obtained during the evolution process by minimizing the distance between the SSM and the target model.

[0125] In ES, a computational model called the Support Sample Model (SSM) is used to approximate the probability density of sample data. Therefore, the implementation of evolutionary sampling methods requires finding the optimal parameters of the SSM. Combining knowledge of rejection sampling strategies and evolutionary search, the ES method can theoretically converge to the optimal solution by minimizing the total variable distance, thus having high computational efficiency. The SSM uses kernel density estimation (KDE) to represent the distribution of samples. In KDE, the probability density distribution of the sample set is represented by a weighted combination of a set of Gaussian density functions. The definition of SSM is shown in equation (2).

[0126]

[0127] in, These are sample data, i = 1...N S N S It is the number of samples, a i The weighting coefficient is set to 1 / N. S ; The Gaussian kernel function K is defined as shown in equation (3):

[0128]

[0129] h i It is the bandwidth, i.e., the smoothing parameter of KDE; by processing the sample data through the Gaussian kernel function, SSM can be applied in the ES algorithm; by choosing the "thumb rule" to generate the optimal bandwidth parameter value, the kernel function density estimation can be easily approximated; the Silverman thumb rule expression is shown in (4):

[0130]

[0131] Where, σ i Let be the sample variance, i = 1, 2...d;

[0132] From equations (2) and (3), we can obtain the probability density distribution corresponding to the feature values ​​of the existing ship type data, that is, the probability distribution π(x) = π(x) of the target model we need. 吃水 x 初稳性高 x 重心高度 x 排水量 Alternatively, the probability density p(x) = p(x) of the corresponding support sample set (SSM) can be obtained. 吃水 x 初稳性高 x 重心高度 x 排水量 ), namely π(x) and p(x) mentioned in the following description.

[0133] Using the Levy distribution as the transition probability function This indicates that at the current k-th iteration, the current sample Generate candidate samples The probability of the current sample As the location parameter value of the distribution, the candidate samples are calculated from this distribution. The probability of is shown in equation (5):

[0134]

[0135] The Levy distribution has two parameters, γ and α. γ is a scaling factor satisfying γ > 0, usually set to γ ​​= 1. α controls the shape of the distribution, satisfying 0 < α < 2. The analytical expression of this integral is unknown for ordinary α, but it can be obtained for some special cases. In particular, for α = 1, this integral can be reduced to a Cauchy distribution. As α → 2, the distribution is no longer a Levy distribution, but becomes a Gaussian distribution. The parameter α controls the range of the distribution, causing the probability distribution to exhibit different shapes, especially in the tail region; the smaller the parameter α, the longer the tail.

[0136] The formula for generating candidate samples y that follow a Levy distribution is shown in equation (6):

[0137]

[0138] Where V is a uniformly distributed... The random numbers, W, are random numbers that follow an exponential distribution with a mean of 1, and μ represents the position parameter, which is set as follows. This represents the Levy distribution that selects candidate values ​​using the current feature value as the position parameter; X represents the different values ​​of α. The value; obtained through equation (6) Candidate support samples are Candidate samples are generated, and their probability values ​​of the transition function are calculated using equation (5). Used for subsequent calculations.

[0139] The Elasticsearch (ES) algorithm, based on the core idea of ​​the rejection sampling strategy, designs a similar sampling procedure for each supporting sample. Therefore, ES has Ns concurrent rejection sampling chains. For each sampling chain, a candidate sample is first generated, and then this candidate sample is accepted as a new sample with a certain probability. Typically, we let A... k (x, y) represents the probability of generating a new sample y from sample x in the k-th rejection sampling step. Let α k(x, y) represents the probability of receiving data y as a new sample. Therefore, if the current supporting sample data is x, then after performing the k-th rejection sampling step, the probability of receiving sample data y (y ≠ x) as a new sample is A. k (x, y) × α k (x, y), which is consistent with the traditional rejection sampling strategy. Therefore, A k (x, y) (as shown in equation (7)) and α k The specific expression of (x, y) (as shown in equation (8)) will completely determine the final sampling result. The calculation process is as follows:

[0140]

[0141] Equation (7) can be expressed as follows:

[0142] When sampling draft characteristics:

[0143]

[0144] in,

[0145] When sampling high features of initial stability:

[0146]

[0147] in,

[0148] When sampling the center of gravity height feature:

[0149]

[0150] in,

[0151] When sampling the characteristics of drainage volume:

[0152]

[0153] in,

[0154] Then, a second rejection is made using equation (8):

[0155]

[0156] It has a similar form to the classic Metropolis-Hasting rejection sampling, namely Satisfying the detail balance equation Unlike traditional rejection sampling strategies, This is the second rejection operation in the ES algorithm, which ensures... right Approximate effect; p k (x) is a support sample model used to estimate the probability density of the sample.

[0157] The performance of the ES algorithm is commonly evaluated by convergence, standard deviation, and computation time. The normalization factor λ, calculated as shown in equation (9), can be used to evaluate the convergence of the algorithm.

[0158]

[0159] When λ converges to a stable value, the ES algorithm converges to an optimal stable solution. Therefore, the degree of change in the value of λ between two adjacent evolutionary sampling processes determines whether the ES learning process terminates. That is, if the change in λ is very small, it indicates that the ES algorithm ends the evolutionary process.

[0160] According to equation (10):

[0161]

[0162] in, This represents the standardized output, i.e. According to equation (10), the smaller the standard deviation J, the closer the obtained support sample set is to the true sample set of the target probability distribution, and the higher the accuracy of the sample.

[0163] (II) A total of 15 test functions were included, comprising 3 unimodal functions π1 to π3, 6 functions with slight local optima π4 to π9, and 6 functions with obvious local optima π. 10 ~π 15 .

[0164] The ship type data was sampled using the data in Table 1.

[0165] Table 2. Test functions and their ranges used in this paper's experiments.

[0166]

[0167]

[0168] Example

[0169] We use Python, which is well-known in the industry, to implement our code.

[0170] Experiment 1: The performance of the Evolutionary Sampling Algorithm with Adaptive Levy Distribution (ES-ALPD) is evaluated using 15 test functions. Similarly, it is compared with three other evolutionary sampling algorithms (ES-GPD, ES-CPD, and ES-SEPD) that use Gaussian, Cauchy, and symmetric exponential distributions as transition probability functions, respectively. Simulation experiments using these three types of test functions verify the performance of the ES-ALPD algorithm.

[0171] Experiment 2: Set the number of samples to 30 and the number of iterations to 100. Set the transition probability function to Lévy distribution, Gaussian distribution and Cauchy distribution respectively. Calculate the standard deviation J and standard factor λ respectively. Verify the performance of the ES-ALPD algorithm through practical application experiments.

[0172] Table 3 shows the standard deviation and normalization factor values ​​of the four evolutionary sampling algorithms in the last generation.

[0173]

[0174] 1.1 Unimodal Function

[0175] For the four evolutionary sampling algorithms, the accuracy of the algorithms is improved. Therefore, the ES-ALPD algorithm can achieve high accuracy while ensuring the convergence speed. For the ES-CPD algorithm, since π1 to π3 are unimodal functions, it can converge quickly in a short time. However, due to the large search step size of the Cauchy distribution, the number of successfully accepted candidate samples is not large, which often causes the evolutionary process to deviate from the optimal state when it is close to the optimal state, resulting in low accuracy of the samples. This phenomenon can be clearly seen in Figure 5(a). For the ES-SEPD algorithm, linear adjustment is performed to gradually change the search range from large to small, ensuring that the evolutionary algorithm realizes the transition from global search to local adjustment. From Table 3 and Figures 5(a) to 5(f), it can be seen that for different unimodal function types, the ES-SEPD algorithm often achieves slightly better approximation results than the ES-CPD algorithm, but slightly worse than the ES-ALPD algorithm. For the ES-GPD algorithm, a Gaussian function is used as its transition probability function, which has the smallest search range.

[0176] Figures 5(a) to 5(f) showing the curves of standard deviation and normalization factor, and the data in Table 3, both indicate that the ES-GPD algorithm has the slowest convergence speed. From the beginning of the evolution process, it gradually searches for a large number of acceptable candidate samples and only converges to the optimal state of the samples after a long period of time. Its approximation effect is often slightly worse than the three evolutionary sampling algorithms ES-CPD, ES-SEPD, and ES-ALPD.

[0177] 1.2 Functions with slight local optima

[0178] For functions with slight local optima, π4~π9, it can be observed from Figures 6(a) to 6(1) that the approximation effect produced by the ES-ALPD algorithm is similar to that produced by the ES-CPD algorithm, and is significantly better than the other two algorithms. Since these six test functions themselves have slight local optima, a larger search range is often beneficial for the algorithm to escape local optima and produce good approximation results. Although the approximation effects produced by the ES-ALPD algorithm and the ES-CPD algorithm are similar, in the later stages of the evolution process, the ES-ALPD algorithm can use the Gaussian distribution to perform a small-range search and obtain more excellent candidate samples, while the ES-CPD algorithm, which uses the Cauchy distribution to generate a large search step size, often finds it difficult to obtain more excellent candidate samples, resulting in the ES-ALPD algorithm having slightly higher accuracy than the ES-CPD algorithm. For the ES-SEPD algorithm, because the parameters need to be linearly adjusted for different problems, its search range may be larger than that of the Cauchy distribution, resulting in the fastest convergence speed (see Figure 6(c)). However, in the early stages of the evolutionary learning process, the number of successfully accepted candidate samples is insufficient, so the accuracy of the samples is not as good as that of the ES-CPD and ES-ALPD algorithms. Furthermore, adjusting the search range of the symmetric transition probability function may cause the algorithm to get stuck in local optima, affecting the accuracy of the final samples (see Figures 6(a), 6(i), and 6(k)). For the ES-GPD algorithm, acquiring sample data with a large number of accepted candidate samples and gradually converging at a slower speed, it is also prone to getting stuck in local optima, affecting the algorithm's approximation effect on the target probability function.

[0179] l.3 Functions with obvious local optima

[0180] For π 10 ~π 15 As can be seen from Figures 7(a) to 7(1), the ES-ALPD algorithm still produces a good approximation effect. Since all six functions have obvious local optima, the transition probability function with a large search step size will enable the evolutionary sampling algorithm to escape local optima. Therefore, compared with the ES-SEPD and ES-GPD algorithms, both the ES-ALPD and ES-CPD algorithms can achieve good approximation effects. Since the ES-ALPD algorithm mainly uses the Gaussian distribution as the transition probability function in the later stage of the evolutionary learning process, the sample accuracy obtained is slightly higher than that of the ES-CPD algorithm. For the ES-SEPD algorithm, by adjusting the search step size, the algorithm can achieve a good approximation effect as much as possible, but the effect is slightly worse than that of ES-ALPD and ES-CPD. The ES-GPD algorithm still enters the convergence state at a very slow speed, and the approximation effect of the target probability function is not ideal.

[0181] Table 3 presents the simulation results of ES-ALPD. It can be seen that among the four evolutionary sampling algorithms, the ES-ALPD algorithm achieves the highest sample accuracy for different types of test functions. This means that the design of the transition probability function scheme of the ES-ALPD algorithm, adaptively selecting α = 1.0 and α = 2.0, is effective for arbitrarily complex probability density functions.

[0182] To gain a clearer understanding of the evolution of the ES-ALPD algorithm, we will analyze the details of the evolution process using the test function π14 as an example. From... Figure 8 Two distinct trends can be observed: firstly, in the initial stage, the Cauchy distribution plays a crucial role in generating candidate samples; secondly, in the later stage, around the 100th stage, the Gaussian distribution gradually becomes the dominant transition probability function. Figure 8 The results are consistent with the standard deviation results in Figure 7(i). The entire algorithm first uses the Cauchy distribution to quickly converge to the optimal sample set, and then uses the Gaussian distribution to gradually improve the accuracy of the sample set. This corresponds one-to-one with the execution process of the evolutionary sampling algorithm. In the initial stage, the total variable distance between the initial sample set and the optimal sample set is large. At this time, the Cauchy distribution uses a large search step size to search the space and escape local optima. As the total variable distance decreases, the sample set gradually approaches the optimal sample set, and the Gaussian distribution mainly begins to play the role of generating candidate samples, searching within a small range, and improving the sample accuracy.

[0183] As shown in Figures 10(a) and 10(b), we can see that the sampling algorithms corresponding to the three transition distribution functions are as follows: the ES-ALPD algorithm has higher accuracy than the ES-CPD and ES-GPD algorithms, and is significantly better than the other two algorithms. This means that the design of the transition probability function scheme of the ES-ALPD algorithm, by adaptively selecting α=1.0 and α=2.0, is effective for the collection of ship type data and can obtain reliable and reasonable collected data.

Claims

1. A ship data evolution sampling method based on Levy distribution, characterized in that, The specific steps are as follows: (1) Based on existing ship data { }, where m represents the number of data entries, and each data entry... Each has d features, represented as { }, where k represents the k-th iteration. During initialization, k=0. The iteration is initialized by multiplying the difference between the maximum and minimum values ​​of each data feature by a random number following a 0-1 distribution. Group of ship data support samples, initial ship data sample set , Represents the first in the initial ship data sample set Each data point in the initial ship data sample set also includes d features; (2) For ship data sample set Each ship data sample Perform steps (3) to (6). Represents a sample set of ship data The i-th data in the k-th iteration; (3) For each feature in each ship data, perform steps (3)-(4), and use the Levy distribution function as the transition probability function according to the value of α. Under different values, the characteristics of each ship data sample are determined according to... Generate a candidate value , Its candidate supporting samples are ; Generate candidate samples that follow a Levy distribution. The formula is shown in equation (6): (6) Where V is a uniformly distributed... The random number W is a random number that follows an exponential distribution with a mean of 1. Indicates position parameters, setting , indicating that the Levy distribution selects candidate values ​​using the current feature value as the position parameter; Indicates different When retrieving values The value; obtained through equation (6) Candidate support samples are Candidate samples are generated, and their probability values ​​of the transition function are calculated using equation (5). This is used for subsequent calculations; (4) Generate a uniform random number R in the range [0,1]; if the following conditions are met... So accept Then proceed to step (5); otherwise, reject. Then let , This represents the j-th feature of the i-th data in the k-th iteration; (5) Continue until all features have been updated. ,calculate Given the value of , generate another uniform random number R' in the range [0,1], if the following condition is met: So, successfully accepting Otherwise, reject it; (6) If If it is successfully accepted, then let Otherwise, ; (7) Update the equation In the Levy distribution function, the sample set is updated under different values ​​of α=1.

0. Update the sample set when α=2.0 , and, And calculate the corresponding standard deviation. and ;like Then the sample set is Otherwise, the sample set is ; (8) If the difference between two consecutive support sample sets is small or other termination conditions are met, then the sampling procedure ends; otherwise, proceed to step (2). (9) Output the final support sample set and corresponding .

2. The ship data evolution sampling method based on Levy distribution according to claim 1, characterized in that, In step (1), the existing ship data includes ship length, beam, draft, initial trim, initial metacentric height, waterline length, roll period, center of gravity height, block coefficient, bilge keel area, flood angle, wind pressure moment, measured projected area, measured projected center of gravity height, and displacement. Among these, ship length, beam, initial trim, waterline length, block coefficient, bilge keel area, flood angle, wind pressure moment, measured projected area, and side projected center of gravity height are all constant values. The roll period is calculated from other varying values, so it is not sampled. Draft, initial metacentric height, center of gravity height, and displacement are sampled.

3. The ship data evolution sampling method based on Levy distribution according to claim 1, characterized in that, In step (3), the specific details are as follows: In ES, SSM uses kernel function density estimation (KDE) to represent the distribution of samples; in KDE, the probability density distribution of the sample set is represented by a weighted combination of a set of Gaussian density functions; SSM is defined as shown in equation (2): (2) in, These are sample data, i = 1…N S , It is the number of samples. The weight coefficients are set as follows: The Gaussian kernel function K is defined as shown in equation (3): (3) It is the bandwidth, i.e., the smoothing parameter of KDE; through the processing of sample data by the Gaussian kernel function, SSM can be applied in the ES algorithm; the "thumb rule" is selected to generate the optimal bandwidth parameter value, so that the kernel function density estimation can be easily approximated; the Silverman thumb rule expression is shown in (4): (4) in, Let be the sample variance, i = 1, 2…d; The probability density distribution of the target model and the probability density of the support sample set SSM are obtained from equations (2) and (3): the sample set in equation (2) Using existing ship datasets Substitution, that is, obtaining the probability distribution of the desired target model. Supports the probability density of the sample set SSM We can obtain the answer by directly substituting into equations (2) and (3); Using the Levy distribution as the transition probability function , indicating that at the current k-th iteration, the current sample Generate candidate samples The probability of the current sample As the location parameter value of the distribution, the candidate samples are calculated from this distribution. The probability of is shown in equation (5): (5) in, It is a scaling factor, satisfying ,Will The value is set to 1; Control the shape of the distribution to satisfy Indicates the integral letter; for This integral can be reduced to a Cauchy distribution; in At this time, the distribution is no longer a Levy distribution, but a Gaussian distribution; the parameter Controlling the range of the distribution allows the probability distribution to take on different shapes; for the tail region, the parameters... The smaller the size, the longer the tail.

4. The ship data evolution sampling method based on Levy distribution according to claim 1, characterized in that, In step (4) described above, The calculation process is as follows: (7) Then, a second rejection is made using equation (8): (8) It has a similar form to the classic Metropolis-Hasting rejection sampling, namely Satisfying the detailed balance equation ; Unlike traditional rejection sampling strategies, This is the second rejection operation in the ES algorithm, which ensures... right Approximate effect; It is a support sample model used to estimate the probability density of samples.

5. The ship data evolution sampling method based on Levy distribution according to claim 1, characterized in that, In step (7) and The calculation process is as follows: The performance of the ES algorithm is evaluated by convergence, standard deviation and computation time; the convergence of the algorithm is evaluated by the normalization factor λ calculated as shown in Equation (9); (9) When λ converges to a stable value, the ES algorithm converges to an optimal stable solution. Therefore, the degree of change in the value of λ between two adjacent evolutionary sampling processes determines whether the ES learning process terminates. That is, if the change in λ is very small, it means that the ES algorithm ends the evolutionary process. (10) Where p'( ) represents the normalized output, i.e., p'( )= According to equation (10), the smaller the standard deviation J, the closer the obtained support sample set is to the true sample set of the target probability distribution, and the higher the accuracy of the sample.

Citation Information

Patent Citations

  • Improved product key process quality prediction method under small sample data

    CN115906399A

  • Method and system for narrow passage path sampling based on levy flight

    US20230001920A1