CN107844860A - A kind of optimal method and device - Google Patents

A kind of optimal method and device Download PDF

Info

Publication number
CN107844860A
CN107844860A CN201711056048.4A CN201711056048A CN107844860A CN 107844860 A CN107844860 A CN 107844860A CN 201711056048 A CN201711056048 A CN 201711056048A CN 107844860 A CN107844860 A CN 107844860A
Authority
CN
China
Prior art keywords
iteration
mrow
msub
function
gas
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711056048.4A
Other languages
Chinese (zh)
Inventor
李文奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Inspur Cloud Service Information Technology Co Ltd
Original Assignee
Shandong Inspur Cloud Service Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Inspur Cloud Service Information Technology Co Ltd filed Critical Shandong Inspur Cloud Service Information Technology Co Ltd
Priority to CN201711056048.4A priority Critical patent/CN107844860A/en
Publication of CN107844860A publication Critical patent/CN107844860A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Complex Calculations (AREA)

Abstract

The invention provides a kind of optimal method and device, this method, including:S1:The condition that the acquisition loss function and iteration terminate;S2:According to the loss function, the observation function of the loss function is determined;S3:According to observation function, the iteration function of parameter to be optimized is determined, it is synchronous vectorial that iteration function includes random perturbation;S4:Iteration function is initialized;S5:Determine the synchronous vector of random perturbation of kth time iteration;S6:According to k-th of parameter to be optimized of random perturbation synchronization vector sum of kth time iteration, the iteration function of kth time iteration is determined;S7:According to the iteration function of kth time iteration, the parameter to be optimized of kth+1 is determined;S8:Judge whether to meet the condition that iteration terminates, if it is, the output parameter to be optimized of kth+1, otherwise, it determines k=k+1, returns to S5, k is the integer more than or equal to 0.The invention provides can reach more preferable effect of optimization in limited operating cost.

Description

Optimization method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an optimization method and apparatus.
Background
In various production processes, many complex optimization problems are often encountered, and certain randomness is often carried out, and how to solve the optimization problems is increasingly emphasized.
In the prior art, there are many schemes for realizing optimization, however, these schemes generally require higher operation cost to achieve better effect, and the optimization effect within the limited operation cost is poor.
Disclosure of Invention
The embodiment of the invention provides an optimization method and device, which can achieve better optimization effect within limited operation cost.
In one aspect, an embodiment of the present invention provides an optimization method, including:
s1: obtaining a loss function and a condition for finishing iteration;
s2: determining an observation function of the loss function according to the loss function;
s3: determining an iteration function of parameters to be optimized according to the observation function, wherein the iteration function comprises a random disturbance synchronous vector;
s4: initializing the iterative function;
s5: determining a random disturbance synchronous vector of the kth iteration;
s6: determining an iteration function of the kth iteration according to the random disturbance synchronous vector of the kth iteration and the kth parameter to be optimized;
s7: determining a (k + 1) th parameter to be optimized according to an iteration function of the kth iteration;
s8: and judging whether the iteration end condition is met, if so, outputting the (k + 1) th parameter to be optimized, otherwise, determining that k is k +1, and returning to the step S5, wherein k is an integer greater than or equal to 0.
Further, the air conditioner is provided with a fan,
the iteration function is:
wherein,the kth parameter to be optimized, y (θ) is the observation function, ΔkRandom perturbation synchronous vector, Δ, for the kth iterationk=[Δk1k2,...,Δkn]T,ΔkiIs ΔkThe (i) th element of (a),a is a first preset coefficient, α is a second preset coefficient, a is a third preset coefficient,c is a fourth predetermined coefficient, and gamma is a fifth predetermined coefficient.
Further, the air conditioner is provided with a fan,
each element in the random disturbance synchronization vector is independently and equally distributed and is subject to subsection uniform distribution U [ -1.4908, -0.4902- ∪ [0.4902, 1.4908 ].
Further, the air conditioner is provided with a fan,
the conditions for the end of the iteration include: the running time of the iterative process is greater than or equal to a preset time threshold;
the judging whether the iteration ending condition is met includes:
and judging whether the running time of the iterative process is greater than or equal to the time threshold.
Further, the air conditioner is provided with a fan,
the observation function is the sum of the loss function and noise.
Further, the air conditioner is provided with a fan,
the initializing the iterative function includes:
and acquiring a preset initial value of the parameter to be optimized.
Further, the air conditioner is provided with a fan,
the conditions for the end of the iteration include: k is equal to a preset iteration step number threshold;
the judging whether the iteration ending condition is met includes:
and judging whether k is equal to the iteration step number threshold value or not.
Further, the air conditioner is provided with a fan,
α is 0.602.
Further, the air conditioner is provided with a fan,
γ is 0.101.
Further, the air conditioner is provided with a fan,
a satisfiesWherein s is the minimum quantity of the parameters to be optimized which need to be changed in each preset iteration, and g is the minimum quantity after the preset times of simulationThe average value of (a), wherein,
further, the air conditioner is provided with a fan,
A=0.1×k。
further, the air conditioner is provided with a fan,
the observation function comprises: noise;
c is the standard deviation of the noise.
In another aspect, an embodiment of the present invention provides an optimization apparatus, including:
an obtaining unit, configured to obtain a loss function and a condition for ending iteration;
a first determining unit, configured to determine an observation function of the loss function according to the loss function;
the second determining unit is used for determining an iteration function of the parameter to be optimized according to the observation function, wherein the iteration function comprises a random disturbance synchronous vector;
an iteration unit for performing:
s4: initializing the iterative function;
s5: determining a random disturbance synchronous vector of the kth iteration;
s6: determining an iteration function of the kth iteration according to the random disturbance synchronous vector of the kth iteration and the kth parameter to be optimized;
s7: determining a (k + 1) th parameter to be optimized according to an iteration function of the kth iteration;
s8: and judging whether the iteration end condition is met, if so, outputting the (k + 1) th parameter to be optimized, otherwise, determining that k is k +1, and returning to the step S5, wherein k is an integer greater than or equal to 0.
Further, the air conditioner is provided with a fan,
the iteration function is:
wherein,the kth parameter to be optimized, y (θ) is the observation function, ΔkRandom perturbation synchronous vector, Δ, for the kth iterationk=[Δk1k2,...,Δkn]T,ΔkiIs ΔkThe (i) th element of (a),a is a first preset coefficient, α is a second preset coefficient, a is a third preset coefficient,c is a fourth predetermined coefficient, and gamma is a fifth predetermined coefficient.
Further, the air conditioner is provided with a fan,
each element in the random disturbance synchronization vector is independently and equally distributed and is subject to subsection uniform distribution U [ -1.4908, -0.4902- ∪ [0.4902, 1.4908 ].
Further, the air conditioner is provided with a fan,
the conditions for the end of the iteration include: the running time of the iterative process is greater than or equal to a preset time threshold;
and the iteration unit is used for judging whether the running time of the iteration process is greater than or equal to the time threshold.
Further, the air conditioner is provided with a fan,
the observation function is the sum of the loss function and noise.
Further, the air conditioner is provided with a fan,
and the iteration unit is used for acquiring a preset initial value of the parameter to be optimized.
Further, the air conditioner is provided with a fan,
the conditions for the end of the iteration include: k is equal to a preset iteration step number threshold;
and the iteration unit is used for judging whether k is equal to the iteration step number threshold value.
Further, the air conditioner is provided with a fan,
α is 0.602.
Further, the air conditioner is provided with a fan,
γ is 0.101.
Further, the air conditioner is provided with a fan,
a satisfiesWherein s is the minimum quantity of the parameters to be optimized which need to be changed in each preset iteration, and g is the minimum quantity after the preset times of simulationThe average value of (a), wherein,
further, the air conditioner is provided with a fan,
A=0.1×k。
further, the air conditioner is provided with a fan,
the observation function comprises: noise;
c is the standard deviation of the noise.
In the embodiment of the invention, the random disturbance synchronous vector is arranged in the iteration function, the random disturbance synchronous vector is randomly generated during each iteration, the parameter to be optimized can obtain a better optimization effect as soon as possible through the random disturbance synchronous vector, and when the condition of finishing the iteration is met, the better optimization effect is achieved within the limited operation cost.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of an optimization method provided by an embodiment of the present invention;
FIG. 2 is a flow chart of another optimization method provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of an optimization apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another optimization apparatus provided in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides an optimization method, which may include the steps of:
step 101: obtaining a loss function and a condition for finishing iteration;
step 102: determining an observation function of the loss function according to the loss function;
step 103: determining an iteration function of parameters to be optimized according to the observation function, wherein the iteration function comprises a random disturbance synchronous vector;
step 104: initializing the iterative function;
step 105: determining a random disturbance synchronous vector of the kth iteration;
step 106: determining an iteration function of the kth iteration according to the random disturbance synchronous vector of the kth iteration and the kth parameter to be optimized;
step 107: determining a kth parameter to be optimized according to an iteration function of the kth iteration;
step 108: judging whether the iteration ending condition is met, if so, executing step 109, otherwise, executing step 110;
step 109: outputting the (k + 1) th parameter to be optimized;
step 110: determining k to k +1, and returning to the step 105;
wherein k is an integer of 0 or more.
In the embodiment of the invention, the random disturbance synchronous vector is arranged in the iteration function, the random disturbance synchronous vector is randomly generated during each iteration, the parameter to be optimized can obtain a better optimization effect as soon as possible through the random disturbance synchronous vector, and when the condition of finishing the iteration is met, the better optimization effect is achieved within the limited operation cost.
One purpose of the embodiments of the present invention is to obtain a parameter to be optimized of a minimum value of a loss function, so that the loss function can be optimized to reach a smaller value when an iteration step number threshold is reached. That is, embodiments of the present invention are provided to realizeWhere L (θ) is a loss function.
Specifically, the loss function may be constructed as needed, and may be constructed according to the associated traffic. The corresponding optimization problem is solved by the constructed loss function.
The embodiment of the invention solves the problem of random optimization of reducing the loss function to the minimum value.
In an embodiment of the present invention, the iteration function is:
wherein,the kth parameter to be optimized, y (θ) is the observation function, ΔkRandom perturbation synchronous vector, Δ, for the kth iterationk=[Δk1k2,...,Δkn]T,ΔkiIs ΔkThe (i) th element of (a),a is a first preset coefficient, α is a second preset coefficient, a is a third preset coefficient,c is a fourth predetermined coefficient, and gamma is a fifth predetermined coefficient.
In the examples of the present invention, akIs a parameter that varies with k, ckAlso a parameter that varies with k. In thatIn the known case, y (θ) also varies with k. After determining ΔkAfter, can be according to ΔkAnddetermining an iterative function, and substituting the iterative function into the value of k to obtain the value
in an embodiment of the present invention, each element in the random perturbation synchronization vector is independently and identically distributed, and each element is subject to segmentation uniform distribution U [ -1.4908, -0.4902] ∪ [0.4902, 1.4908 ].
in the embodiment of the invention, when each element in the random disturbance synchronization vector is independently and uniformly distributed and is subject to subsection uniform distribution U [ -1.4908, -0.4902] ∪ [0.4902, 1.4908], a parameter to be optimized can obtain a better value as soon as possible, and further a loss function can obtain a smaller value when the parameter to be optimized in the loss function is set to be the better value, so that the optimization effect is achieved.
in one embodiment of the present invention, α is 0.602.
In one embodiment of the present invention, γ is 0.101.
In an embodiment of the present invention, a is 0.1 × k.
In an embodiment of the present invention, the observation function includes: noise;
c is the standard deviation of the noise.
In an embodiment of the present invention, the noise may be white noise.
In an embodiment of the present invention, the observation function is a sum of the loss function and noise.
Specifically, y (θ) ═ L (θ) + ∈, where L (θ) is the loss function and ∈ is noise.
In one embodiment of the present invention, a satisfiesWherein s is the minimum quantity of the parameters to be optimized which need to be changed in each preset iteration, and g is the minimum quantity after the preset times of simulationThe average value of (a), wherein,
in an embodiment of the present invention, the initializing the iterative function includes:
and acquiring a preset initial value of the parameter to be optimized.
Specifically, determining May be set empirically.
In an embodiment of the present invention, the condition for ending the iteration includes: the running time of the iterative process is greater than or equal to a preset time threshold;
the judging whether the iteration ending condition is met includes:
and judging whether the running time of the iterative process is greater than or equal to the time threshold.
In the embodiment of the invention, when the running time of the iterative process is greater than or equal to the time threshold, the condition of ending the iteration is determined to be met, and when the running time of the iterative process is less than the time threshold, the condition of ending the iteration is determined not to be met.
In an embodiment of the present invention, the condition for ending the iteration includes: k is equal to a preset iteration step number threshold;
the judging whether the iteration ending condition is met includes:
and judging whether k is equal to the iteration step number threshold value or not.
In the embodiment of the invention, when k is equal to the iteration step number threshold value, the condition of ending the iteration is determined to be met, and when k is smaller than the iteration step number threshold value, the condition of ending the iteration is determined not to be met.
And when k is equal to the threshold of the iteration steps, outputting the (k + 1) th parameter to be optimized, ending the current flow and ending the iteration process.
In an embodiment of the present invention, the condition for ending the iteration includes: k is equal to a preset iteration step number threshold, or the running time of the iteration process is greater than or equal to a preset time threshold;
the judging whether the iteration ending condition is met includes:
judging whether the following conditions are met: k is equal to a preset iteration step number threshold, or the running time of the iteration process is greater than or equal to a preset time threshold.
Specifically, as long as k is equal to a preset iteration step number threshold, and any one of the running time of the iteration process which is greater than or equal to the preset time threshold is met, outputting the (k + 1) th parameter to be optimized, and when k is equal to the preset iteration step number threshold and the running time of the iteration process which is greater than or equal to the preset time threshold is not met, determining that k is k +1, and continuing the iteration.
As shown in fig. 2, the embodiment of the present invention provides an optimization method, which is implemented by the embodiment of the present inventionThe method may comprise the steps of:
step 201: and acquiring a loss function, an iteration step number threshold and noise.
Specifically, L (θ) is the loss function and ε is the noise.
The noise here may be white noise.
The conditions for the end of the iteration here include: k is equal to a preset iteration step number threshold.
Step 202: and determining an observation function of the loss function according to the loss function and the noise.
Specifically, y (θ) ═ L (θ) + ∈, and y (θ) is an observation function.
In practice, since an observed value contains a certain noise due to its randomness, iteration is performed by an observation function.
Step 203: and determining an iteration function of the parameter to be optimized according to the observation function, wherein the iteration function comprises a random disturbance synchronous vector.
Specifically, the iteration function is:
wherein,the kth parameter to be optimized, y (θ) is the observation function, ΔkRandom perturbation synchronous vector, Δ, for the kth iterationk=[Δk1k2,...,Δkn]T,ΔkiIs ΔkThe (i) th element of (a),a is a first preset coefficient, α is a second preset coefficient, a is a third preset coefficient,c is a fourth predetermined coefficient, and gamma is a fifth predetermined coefficient.
each element in the random disturbance synchronization vector is independently and equally distributed and is subject to subsection uniform distribution U [ -1.4908, -0.4902] < U [0.4902, 1.4908 ].
wherein α is 0.602, gamma is 0.101, and A is 0.1 xk.
a satisfiesWherein s is the minimum quantity of the parameters to be optimized which need to be changed in each preset iteration, and g is the minimum quantity after the preset times of simulationThe average value of (a), wherein,
step 204: and acquiring a preset initial value of the parameter to be optimized.
Specifically, determiningThe value of (c).
Step 205: and determining the random perturbation synchronization vector of the kth iteration.
each element in the random disturbance synchronization vector is independently and equally distributed and is subject to subsection uniform distribution U [ -1.4908, -0.4902] < U [0.4902, 1.4908 ].
During each iteration, each element in the random perturbation synchronization vector is random.
Step 206: and determining an iteration function of the kth iteration according to the random disturbance synchronous vector of the kth iteration and the kth parameter to be optimized.
Specifically, A, a, c are generated from k, U [ -1.4908, -0.4902 are evenly distributed on a segment basis]∪[0.4902,1.4908]Randomly generating each element in the random disturbance synchronous vector, and further generating a random disturbance synchronous vector sum
Step 207: and determining the (k + 1) th parameter to be optimized according to the iteration function of the kth iteration.
Specifically, k is substituted into the iteration function of the kth iteration, and the (k + 1) th parameter to be optimized can be obtained.
Step 208: it is determined whether k is equal to the iteration step number threshold, if so, step 209 is performed, otherwise, step 210 is performed.
For example: the threshold value of the iteration step number is 100, and when k reaches 100, the iteration is stopped.
Step 209: and outputting the (k + 1) th parameter to be optimized.
The parameter to be optimized of the (k + 1) th iteration is an optimal value within the iteration range of the iteration step number threshold number, so that L (theta) reaches a minimum value.
The k +1 th parameter to be optimized is
Step 210: and k +1 is determined, and the process returns to step 205.
Specifically, the next iteration process is performed according to the new k.
In the embodiment of the present invention, the parameter to be optimized may be a vector, which may include a plurality of elements. That is, the loss function is affected by a number of parameters, which make up the vector.
The embodiment of the invention can accurately find the optimal parameter to be optimized, which enables the loss function to reach the minimum value, and can efficiently determine the optimal parameter to be optimized within the limited operation cost.
The loss function in embodiments of the present invention may be a complex nonlinear loss function.
For any complicated nonlinear random optimization problem, sometimes the operation cost has to be limited due to the large dimension of the problem parameter and the like. When the operation cost is limited to be lower in the optimization process, the numerical solution of the optimization problem can be found more quickly and accurately through the embodiment of the invention, the randomness and the complexity of the optimization problem can be kept, the operation cost can be saved, and the accuracy of the operation result is improved.
Specifically, the embodiment of the invention can realize image denoising, classification, target extraction, target loss reduction and the like by constructing a proper loss function.
For example: the loss function is set as the function of the noise of the image, the optimal solution of the parameters to be optimized in the loss function can be obtained through the embodiment of the invention, so that the function of the noise of the image obtains the minimum value, and the denoising processing of the image is further realized.
For example: the energy consumption of the factory is reduced, the loss function is set as the function of the energy consumption of the factory, wherein the loss function is influenced by a plurality of related parameters, the embodiment of the invention can obtain the optimal solution of the parameters to be optimized in the loss function, so that the energy consumption of the factory is the minimum value, and further, the energy conservation of the factory is realized.
As shown in fig. 3 and 4, the embodiment of the present invention provides an optimization apparatus. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. From a hardware level, as shown in fig. 3, a hardware structure diagram of a device in which an optimization apparatus according to an embodiment of the present invention is located is provided, where in addition to the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 3, the device in which the apparatus is located may generally include other hardware, such as a forwarding chip responsible for processing a packet, and the like. Taking a software implementation as an example, as shown in fig. 4, as a logical apparatus, the apparatus is formed by reading a corresponding computer program instruction in a non-volatile memory into a memory by a CPU of a device in which the apparatus is located and running the computer program instruction. The present embodiment provides an optimization apparatus, including:
an obtaining unit 401, configured to obtain a loss function and a condition for ending iteration;
a first determining unit 402, configured to determine an observation function of the loss function according to the loss function;
a second determining unit 403, configured to determine an iterative function of a parameter to be optimized according to the observation function, where the iterative function includes a random disturbance synchronization vector;
an iteration unit 404 configured to perform:
s4: initializing the iterative function;
s5: determining a random disturbance synchronous vector of the kth iteration;
s6: determining an iteration function of the kth iteration according to the random disturbance synchronous vector of the kth iteration and the kth parameter to be optimized;
s7: determining a (k + 1) th parameter to be optimized according to an iteration function of the kth iteration;
s8: and judging whether the iteration end condition is met, if so, outputting the (k + 1) th parameter to be optimized, otherwise, determining that k is k +1, and returning to the step S5, wherein k is an integer greater than or equal to 0.
In an embodiment of the present invention, the iteration function is:
wherein,the kth parameter to be optimized, y (θ) is the observation function, ΔkRandom perturbation synchronous vector, Δ, for the kth iterationk=[Δk1k2,...,Δkn]T,ΔkiIs ΔkThe (i) th element of (a),a is a first preset coefficient, α is a second preset coefficient, a is a third preset coefficient,c is a fourth predetermined coefficient, and gamma is a fifth predetermined coefficient.
in an embodiment of the present invention, each element in the random perturbation synchronization vector is independently and identically distributed, and each element is subject to segmentation uniform distribution U [ -1.4908, -0.4902] ∪ [0.4902, 1.4908 ].
In an embodiment of the present invention, the condition for ending the iteration includes: the running time of the iterative process is greater than or equal to a preset time threshold;
and the iteration unit is used for judging whether the running time of the iteration process is greater than or equal to the time threshold.
In an embodiment of the present invention, the condition for ending the iteration includes: k is equal to a preset iteration step number threshold;
and the iteration unit is used for judging whether k is equal to the iteration step number threshold value.
In an embodiment of the present invention, the condition for ending the iteration includes: k is equal to a preset iteration step number threshold, or the running time of the iteration process is greater than or equal to a preset time threshold;
the iteration unit is used for judging whether the following conditions are met: k is equal to a preset iteration step number threshold, or the running time of the iteration process is greater than or equal to a preset time threshold.
In an embodiment of the present invention, the observation function is a sum of the loss function and noise.
In an embodiment of the present invention, the iteration unit is configured to obtain a preset initial value of the parameter to be optimized.
in one embodiment of the present invention, α is 0.602.
In one embodiment of the present invention, γ is 0.101.
In one embodiment of the present invention, a satisfiesWherein s is the minimum quantity of the parameters to be optimized which need to be changed in each preset iteration, and g is the minimum quantity after the preset times of simulationThe average value of (a), wherein,
in an embodiment of the present invention, a is 0.1 × k.
In an embodiment of the present invention, the observation function includes: noise;
c is the standard deviation of the noise.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
Embodiments of the present invention provide a readable medium, which includes an execution instruction, and when a processor of a storage controller executes the execution instruction, the storage controller executes any one of the optimization methods provided by embodiments of the present invention.
An embodiment of the present invention provides a storage controller, including: a processor, a memory, and a bus;
the memory is used for storing execution instructions, the processor is connected with the memory through the bus, and when the storage controller runs, the processor executes the execution instructions stored by the memory so as to enable the storage controller to execute any one optimization method provided by the embodiment of the invention.
The embodiments of the invention have at least the following beneficial effects:
1. in the embodiment of the invention, the random disturbance synchronous vector is arranged in the iteration function, the random disturbance synchronous vector is randomly generated during each iteration, the parameter to be optimized can obtain a better optimization effect as soon as possible through the random disturbance synchronous vector, and when the condition of finishing the iteration is met, the better optimization effect is achieved within the limited operation cost.
2. The embodiment of the invention can accurately find the optimal parameter to be optimized, which enables the loss function to reach the minimum value, and can efficiently determine the optimal parameter to be optimized within the limited operation cost.
3. For any complicated nonlinear random optimization problem, sometimes the operation cost has to be limited due to the large dimension of the problem parameter and the like. When the operation cost is limited to be lower in the optimization process, the numerical solution of the optimization problem can be found more quickly and accurately through the embodiment of the invention, the randomness and the complexity of the optimization problem can be kept, the operation cost can be saved, and the accuracy of the operation result is improved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. An optimization method, comprising:
s1: obtaining a loss function and a condition for finishing iteration;
s2: determining an observation function of the loss function according to the loss function;
s3: determining an iteration function of parameters to be optimized according to the observation function, wherein the iteration function comprises a random disturbance synchronous vector;
s4: initializing the iterative function;
s5: determining a random disturbance synchronous vector of the kth iteration;
s6: determining an iteration function of the kth iteration according to the random disturbance synchronous vector of the kth iteration and the kth parameter to be optimized;
s7: determining a (k + 1) th parameter to be optimized according to an iteration function of the kth iteration;
s8: and judging whether the iteration end condition is met, if so, outputting the (k + 1) th parameter to be optimized, otherwise, determining that k is k +1, and returning to the step S5, wherein k is an integer greater than or equal to 0.
2. The method of claim 1,
the iteration function is:
<mrow> <msub> <mover> <mi>&amp;theta;</mi> <mo>^</mo> </mover> <mrow> <mi>k</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> <mo>=</mo> <mover> <mi>&amp;theta;</mi> <mo>^</mo> </mover> <mo>+</mo> <msub> <mi>a</mi> <mi>k</mi> </msub> <mfrac> <mrow> <mi>y</mi> <mrow> <mo>(</mo> <msub> <mover> <mi>&amp;theta;</mi> <mo>^</mo> </mover> <mi>k</mi> </msub> <mo>+</mo> <msub> <mi>c</mi> <mi>k</mi> </msub> <msub> <mi>&amp;Delta;</mi> <mi>k</mi> </msub> <mo>)</mo> </mrow> <mo>+</mo> <mi>y</mi> <mrow> <mo>(</mo> <msub> <mover> <mi>&amp;theta;</mi> <mo>^</mo> </mover> <mi>k</mi> </msub> <mo>-</mo> <msub> <mi>c</mi> <mi>k</mi> </msub> <msub> <mi>&amp;Delta;</mi> <mi>k</mi> </msub> <mo>)</mo> </mrow> </mrow> <mrow> <mn>2</mn> <msub> <mi>c</mi> <mi>k</mi> </msub> </mrow> </mfrac> <mo>&amp;times;</mo> <msup> <mrow> <mo>&amp;lsqb;</mo> <msubsup> <mi>&amp;Delta;</mi> <mrow> <mi>k</mi> <mn>1</mn> </mrow> <mrow> <mo>-</mo> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>&amp;Delta;</mi> <mrow> <mi>k</mi> <mn>2</mn> </mrow> <mrow> <mo>-</mo> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <mn>...</mn> <mo>,</mo> <msubsup> <mi>&amp;Delta;</mi> <mrow> <mi>k</mi> <mi>n</mi> </mrow> <mrow> <mo>-</mo> <mn>1</mn> </mrow> </msubsup> <mo>&amp;rsqb;</mo> </mrow> <mi>T</mi> </msup> <mo>;</mo> </mrow>
wherein,the kth parameter to be optimized, y (θ) is the observation function, ΔkRandom perturbation synchronous vector, Δ, for the kth iterationk=[Δk1k2,...,Δkn]T,ΔkiIs ΔkThe (i) th element of (a),a is a first preset coefficient, α is a second preset coefficient, a is a third preset coefficient,c is a fourth predetermined coefficient, and gamma is a fifth predetermined coefficient.
3. The method of claim 1,
each element in the random disturbance synchronization vector is independently and uniformly distributed and is subject to subsection uniform distribution U [ -1.4908, -0.4902] ∪ [0.4902, 1.4908 ];
and/or the presence of a gas in the gas,
the conditions for the end of the iteration include: the running time of the iterative process is greater than or equal to a preset time threshold;
the judging whether the iteration ending condition is met includes:
and judging whether the running time of the iterative process is greater than or equal to the time threshold.
4. The method of claim 1,
the observation function is the sum of the loss function and noise;
and/or the presence of a gas in the gas,
the initializing the iterative function includes:
acquiring a preset initial value of the parameter to be optimized;
and/or the presence of a gas in the gas,
the conditions for the end of the iteration include: k is equal to a preset iteration step number threshold;
the judging whether the iteration ending condition is met includes:
and judging whether k is equal to the iteration step number threshold value or not.
5. The method of claim 2,
α is 0.602;
and/or the presence of a gas in the gas,
gamma is 0.101;
and/or the presence of a gas in the gas,
a satisfiesWherein s is the minimum quantity of the parameters to be optimized which need to be changed in each preset iteration, and g is the minimum quantity after the preset times of simulationThe average value of (a), wherein,
and/or the presence of a gas in the gas,
A=0.1×k;
and/or the presence of a gas in the gas,
the observation function comprises: noise;
c is the standard deviation of the noise.
6. An optimization device, comprising:
an obtaining unit, configured to obtain a loss function and a condition for ending iteration;
a first determining unit, configured to determine an observation function of the loss function according to the loss function;
the second determining unit is used for determining an iteration function of the parameter to be optimized according to the observation function, wherein the iteration function comprises a random disturbance synchronous vector;
an iteration unit for performing:
s4: initializing the iterative function;
s5: determining a random disturbance synchronous vector of the kth iteration;
s6: determining an iteration function of the kth iteration according to the random disturbance synchronous vector of the kth iteration and the kth parameter to be optimized;
s7: determining a (k + 1) th parameter to be optimized according to an iteration function of the kth iteration;
s8: and judging whether the iteration end condition is met, if so, outputting the (k + 1) th parameter to be optimized, otherwise, determining that k is k +1, and returning to the step S5, wherein k is an integer greater than or equal to 0.
7. The apparatus of claim 6,
the iteration function is:
<mrow> <msub> <mover> <mi>&amp;theta;</mi> <mo>^</mo> </mover> <mrow> <mi>k</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> <mo>=</mo> <msub> <mover> <mi>&amp;theta;</mi> <mo>^</mo> </mover> <mi>k</mi> </msub> <mo>+</mo> <msub> <mi>a</mi> <mi>k</mi> </msub> <mfrac> <mrow> <mi>y</mi> <mrow> <mo>(</mo> <msub> <mover> <mi>&amp;theta;</mi> <mo>^</mo> </mover> <mi>k</mi> </msub> <mo>+</mo> <msub> <mi>c</mi> <mi>k</mi> </msub> <msub> <mi>&amp;Delta;</mi> <mi>k</mi> </msub> <mo>)</mo> </mrow> <mo>+</mo> <mi>y</mi> <mrow> <mo>(</mo> <msub> <mover> <mi>&amp;theta;</mi> <mo>^</mo> </mover> <mi>k</mi> </msub> <mo>-</mo> <msub> <mi>c</mi> <mi>k</mi> </msub> <msub> <mi>&amp;Delta;</mi> <mi>k</mi> </msub> <mo>)</mo> </mrow> </mrow> <mrow> <mn>2</mn> <msub> <mi>c</mi> <mi>k</mi> </msub> </mrow> </mfrac> <mo>&amp;times;</mo> <msup> <mrow> <mo>&amp;lsqb;</mo> <msubsup> <mi>&amp;Delta;</mi> <mrow> <mi>k</mi> <mn>1</mn> </mrow> <mrow> <mo>-</mo> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>&amp;Delta;</mi> <mrow> <mi>k</mi> <mn>2</mn> </mrow> <mrow> <mo>-</mo> <mn>1</mn> </mrow> </msubsup> <mo>,</mo> <mn>...</mn> <mo>,</mo> <msubsup> <mi>&amp;Delta;</mi> <mrow> <mi>k</mi> <mi>n</mi> </mrow> <mrow> <mo>-</mo> <mn>1</mn> </mrow> </msubsup> <mo>&amp;rsqb;</mo> </mrow> <mi>T</mi> </msup> <mo>;</mo> </mrow>
wherein,the kth parameter to be optimized, y (θ) is the observation function, ΔkRandom perturbation synchronous vector, Δ, for the kth iterationk=[Δk1k2,...,Δkn]T,ΔkiIs ΔkThe (i) th element of (a),a is a first preset coefficient, α is a second preset coefficient, a is a third preset coefficient,c is a fourth predetermined coefficient, and gamma is a fifth predetermined coefficient.
8. The apparatus of claim 6,
each element in the random disturbance synchronization vector is independently and uniformly distributed and is subject to subsection uniform distribution U [ -1.4908, -0.4902] ∪ [0.4902, 1.4908 ];
and/or the presence of a gas in the gas,
the conditions for the end of the iteration include: the running time of the iterative process is greater than or equal to a preset time threshold;
and the iteration unit is used for judging whether the running time of the iteration process is greater than or equal to the time threshold.
9. The apparatus of claim 6,
the observation function is the sum of the loss function and noise;
and/or the presence of a gas in the gas,
the iteration unit is used for acquiring a preset initial value of the parameter to be optimized;
and/or the presence of a gas in the gas,
the conditions for the end of the iteration include: k is equal to a preset iteration step number threshold;
and the iteration unit is used for judging whether k is equal to the iteration step number threshold value.
10. The apparatus of claim 7,
α is 0.602;
and/or the presence of a gas in the gas,
gamma is 0.101;
and/or the presence of a gas in the gas,
a satisfiesWherein s is the minimum quantity of the parameters to be optimized which need to be changed in each preset iteration, and g is the minimum quantity after the preset times of simulationThe average value of (a), wherein,
and/or the presence of a gas in the gas,
A=0.1×k;
and/or the presence of a gas in the gas,
the observation function comprises: noise;
c is the standard deviation of the noise.
CN201711056048.4A 2017-11-01 2017-11-01 A kind of optimal method and device Pending CN107844860A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711056048.4A CN107844860A (en) 2017-11-01 2017-11-01 A kind of optimal method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711056048.4A CN107844860A (en) 2017-11-01 2017-11-01 A kind of optimal method and device

Publications (1)

Publication Number Publication Date
CN107844860A true CN107844860A (en) 2018-03-27

Family

ID=61681187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711056048.4A Pending CN107844860A (en) 2017-11-01 2017-11-01 A kind of optimal method and device

Country Status (1)

Country Link
CN (1) CN107844860A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113158138A (en) * 2021-01-28 2021-07-23 浙江工业大学 Method for rapidly detecting contrast sensitivity threshold
CN114626635A (en) * 2022-04-02 2022-06-14 北京乐智科技有限公司 Steel logistics cost prediction method and system based on hybrid neural network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113158138A (en) * 2021-01-28 2021-07-23 浙江工业大学 Method for rapidly detecting contrast sensitivity threshold
CN114626635A (en) * 2022-04-02 2022-06-14 北京乐智科技有限公司 Steel logistics cost prediction method and system based on hybrid neural network

Similar Documents

Publication Publication Date Title
EP2991004B1 (en) Method and apparatus for labeling training samples
Lin et al. Minimizing makespan in a blocking flowshop using a revised artificial immune system algorithm
CN105761206A (en) Point cloud splicing method and system
Dehghannasiri et al. Efficient experimental design for uncertainty reduction in gene regulatory networks
CN109086291B (en) Parallel anomaly detection method and system based on MapReduce
US10635078B2 (en) Simulation system, simulation method, and simulation program
CN107844860A (en) A kind of optimal method and device
CN109766435A (en) The recognition methods of barrage classification, device, equipment and storage medium
CN106845990A (en) A kind of rules process method and equipment
Guzelsoy et al. Restrict-and-relax search for 0-1 mixed-integer programs
KR101700030B1 (en) Method for visual object localization using privileged information and apparatus for performing the same
CN105988855B (en) Just-In-Time parameter optimization method and device
CN105678844A (en) Contour construction algorithm on the basis of point by point increasing of ground object scattered points
CN106855825A (en) A kind of task processing method and its device
Sun et al. Efficient control synthesis for augmented finite transition systems with an application to switching protocols
El Ghaoui et al. Safe feature elimination for the LASSO
Mascia et al. Tuning algorithms for tackling large instances: an experimental protocol
Pan et al. Self-weighted quasi-maximum exponential likelihood estimator for ARFIMA-GARCH models
WO2019028710A1 (en) Method for calculating support of candidate item set on basis of graphic structure data, and application thereof
Cano et al. On the computation of the minimal siphons of S 4 PR nets from a generating family of siphons
CN106815858A (en) A kind of Extracting of Moving Object and device
CN109990431B (en) Data analysis method and device for air conditioner and computer readable storage medium
CN113993343A (en) Energy-saving control method and device for refrigeration equipment, terminal and storage medium
CN108038863B (en) Image segmentation method and device
Dell’Acqua et al. Accelerated multigrid for graph Laplacian operators

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180327