CN109960775A - Method and device for calling proxy model - Google Patents

Method and device for calling proxy model Download PDF

Info

Publication number
CN109960775A
CN109960775A CN201711408897.1A CN201711408897A CN109960775A CN 109960775 A CN109960775 A CN 109960775A CN 201711408897 A CN201711408897 A CN 201711408897A CN 109960775 A CN109960775 A CN 109960775A
Authority
CN
China
Prior art keywords
matrix
order
vector
agent model
coefficient
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
CN201711408897.1A
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.)
Beijing Goldwind Science and Creation Windpower Equipment Co Ltd
Original Assignee
Beijing Goldwind Science and Creation Windpower Equipment 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 Beijing Goldwind Science and Creation Windpower Equipment Co Ltd filed Critical Beijing Goldwind Science and Creation Windpower Equipment Co Ltd
Priority to CN201711408897.1A priority Critical patent/CN109960775A/en
Publication of CN109960775A publication Critical patent/CN109960775A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization

Abstract

A method and apparatus for invoking a proxy model are provided. The method comprises the following steps: acquiring an order matrix of a multivariate polynomial base as a first order matrix, and acquiring a coefficient matrix of the multivariate polynomial base as a first coefficient matrix; taking the order matrix of the proxy model as a base mark, and generating a three-dimensional second matrix based on the first coefficient matrix; constructing an order matrix of variables as a second order matrix based on the first order matrix; performing vector multiplication on the second matrix and the second order matrix along the first dimension of the second matrix to obtain a third matrix; obtaining a multivariate polynomial vector based on the third matrix; and carrying out vector product on the coefficient matrix of the agent model and the multivariate polynomial vector to obtain the expansion of the agent model. The invention can improve the calculation efficiency of calling the proxy model while ensuring no loss of precision when calling the proxy model, and realizes the effective application of the proxy model.

Description

Call the method and device of agent model
Technical field
It is described below and is related to agent model field, more specifically to a kind of method and device for calling agent model.
Background technique
Agent model typically refers to alternative more complicated and time-consuming numerical analysis in analysis and process of optimization A kind of mathematical model, can be improved optimization design efficiency, reduce optimization difficulty.
Currently, mainly pass through two methods: one is the precision of loss model to protect in the method for calling agent model The calling efficiency of model of a syndrome, another kind are to guarantee to realize when the precision of model is called using complicated nested circulation.
However, finally obtaining call result using nested Multiple Cycle, computational efficiency is greatly reduced, if to protect Card computational efficiency then needs loss model precision.In addition, more to act on behalf of mould in the case where this high calculation amount of Optimized Iterative The calling feasibility of type reduces.
Summary of the invention
The technical issues of in order to solve low efficiency, poor feasibility existing for above-mentioned calling agent model, the present invention provide one Kind calls the method and device of agent model.
According to an aspect of the present invention, a kind of method for calling agent model is provided, comprising: obtain multivariable polynomial base The order matrix at bottom obtains the coefficient matrix of the multivariable polynomial substrate as the first system as the first order matrix Matrix number;It is marked the bottom of by of the order matrix of the agent model, is based on first coefficient matrix, generate the second three-dimensional square Battle array;Based on the first order matrix, the order matrix of variable is constructed as second-order matrix number;Along the of second matrix It is one-dimensional, second matrix and the second-order matrix number are done into vector product, obtain third matrix;Based on the third matrix Obtain multivariable polynomial vector;The coefficient matrix of the agent model is done vector with the multivariable polynomial vector to multiply Product, obtains the expansion of the agent model.
Preferably, the step of generating the second three-dimensional matrix can include: in the order matrix of the agent model Each order searches for row vector corresponding with each order, the member as second matrix in first coefficient matrix Element.
Being preferably based on the step of third matrix obtains multivariable polynomial vector includes: by the third matrix Each column in each item be multiplied, obtain each element of the multivariable polynomial vector.
According to another aspect of the present invention, a kind of device for calling agent model is provided, comprising: basis matrix obtains mould Block is configured as: being obtained the order matrix of multivariable polynomial substrate as the first order matrix, and is obtained the multivariable The coefficient matrix at polynomial basis bottom is as the first coefficient matrix;And computing module, it is configured as: with the rank of the agent model Matrix number is bottom mark, is based on first coefficient matrix, generates the second three-dimensional matrix;Based on the first order matrix, structure The order matrix of variable is built as second-order matrix number;Along second matrix first dimension, by second matrix with it is described Second-order matrix number does vector product, obtains third matrix;Multivariable polynomial vector is obtained based on the third matrix;By institute The coefficient matrix and the multivariable polynomial vector for stating agent model do vector product, obtain the expansion of the agent model Formula.
The computing module is also configured to: for each order in the order matrix of the agent model, in institute It states and searches for row vector corresponding with each order, the element as second matrix in the first coefficient matrix.
The computing module is also configured to: each item in each column of the third matrix being multiplied, is obtained To each element of the multivariable polynomial vector.
According to another aspect of the present invention, a kind of computer readable storage medium is provided.The computer-readable storage medium Matter is stored with the program instruction for making processor execute method as described above when being executed by a processor.
According to another aspect of the present invention, a kind of computing device is provided, comprising: processor;And memory, it is stored with and works as Processor is made to execute the program instruction of method as described above when being executed by processor.
The present invention, by constructing calculating matrix, can avoid complicated nested circulation, realize when calling agent model Agent model calls the vectorization calculated, is guaranteeing to improve the calculating effect for calling agent model while not losing precision Rate, to realize effective application of agent model.
Detailed description of the invention
Hereinafter reference will be made to the drawings is described in detail example embodiments of the present invention, wherein
Fig. 1 is the flow chart for showing the method for calling agent model of example embodiment according to the present invention;
Fig. 2 is the block diagram for showing the device of calling agent model of example embodiment according to the present invention.
Specific embodiment
The present invention can have various modifications and various embodiments, it should be appreciated that the present invention is not limited to these Examples, but wraps Include all deformations, equivalent and the replacement in the spirit and scope of the present invention.The art used in an exemplary embodiment of the invention Language is only used for description specific embodiment, rather than in order to limit example embodiment.Unless the context clearly indicates otherwise, otherwise Singular as used herein is also intended to include plural form.
Fig. 1 is the flow chart for showing the method for calling agent model of example embodiment according to the present invention.
Referring to Fig.1, according to the present invention example embodiment calling agent model method can include: obtain multivariable it is multinomial The order matrix of formula substrate obtains the coefficient matrix of multivariable polynomial substrate as the first system as the first order matrix Matrix number (step 101);It is marked the bottom of by of the order matrix of agent model, is based on the first coefficient matrix, generate the second three-dimensional square Battle array (step 103);Based on the first order matrix, the order matrix of variable is constructed as second-order matrix number (step 105);Along First dimension of two matrixes, does vector product for the second matrix and second-order matrix number, obtains third matrix (step 107);It is based on Third matrix obtains multivariable polynomial vector (step 109);By the coefficient matrix of agent model and multivariable polynomial vector Vector product is done, the expansion (step 111) of agent model is obtained.
Using agent model as polynomial chaos expression (PCE, polynomial chaos expansion), model is simultaneously below And multivariable polynomial substrate be Legendre (Legendre) for, to it is shown in FIG. 1 call agent model method it is each Step is described in detail.
According to example embodiment of the present invention, PCE model includes coefficient matrix S and order matrix α as follows.
The expansion for the PCE model that will be calculated is as shown in following equation 1:
In equation 1, SjFor j-th of element in the coefficient matrix S of PCE model, multivariable polynomialξ=[ξ1..., ξM], wherein M is the number of variable, NpFor the number of multivariable polynomial, ξ Indicate each variable, and each variable ξiIt can be scalar, or vector or multi-dimensional matrix.
Jth multivariable polynomialIt is to be obtained by M univariate polynomials multiplication.Root According to example embodiments of the present invention, univariate polynomialsIt indicates: with single argument ξiCorresponding αijRank Legendre multinomial.
Method according to figure 1 can obtain PCE shown in equation 1 from the coefficient matrix S and order matrix α of PCE model The expansion of model.Method shown in FIG. 1 is described in detail referring to the example that order is 4, however present inventive concept is without being limited thereto.
In a step 101, the order matrix O of multivariable polynomial substrate can be obtained according to following table 14As the first rank Matrix number, and the coefficient matrix L of multivariable polynomial substrate is obtained as the first coefficient matrix.
The univariate Legendre multinomial of table 1
First order matrix:First coefficient matrix:
In step 103, it is marked the bottom of by of the order matrix of agent model, is based on the first coefficient matrix, generate three-dimensional the Two matrix Lsα.Specifically, for agent model order matrix α in each order, in the first coefficient matrix L search with The corresponding row vector of each order, as the second matrix LαElement.
Assuming that the α in the order matrix α of agent model11For 3 ranks, then row vector corresponding with 3 ranks is searched in L, that is, the The fourth line of one coefficient matrix LFor with α11=3 corresponding row vectors.Then, the row vector searchedInstead of the α in the order matrix α of agent model11, that is, as the second matrix LαIn the first element.
The second matrix L is obtained by the above methodαIn each element, the second matrix LαFor three-dimensional matrix, and can quilt It is expressed as Lα=L [α :], dimension is 5 × M × Np
In step 105, it is based on the first order matrix O4, construct the order matrix of variableAs second-order matrix number.
Second-order matrix number:
In step 107, along the second matrix LαThe first dimension, by the second three-dimensional matrix LαWith two-dimensional second order square Battle arrayVector product is done, two-dimensional third matrix P as follows is obtained.
Third matrix:Its dimension is M × Np
In step 109, each item in each column of third matrix P is multiplied, is obtained as follows changeable Measure each element of polynomial vector Ψ (ξ).
For example, first element of multivariable polynomial vector Ψ (ξ)It can pass through third matrix P's Every be multiplied of first row obtains.
In step 111, as shown in equation 2, by the coefficient matrix S of agent model and multivariable polynomial vector Ψ (ξ) Vector product is done, the expansion of PCE agent model is obtained
The method shown in FIG. 1 for calling agent model is carried out by taking PCE model and Legendre multinomial as an example above Detailed description, however present inventive concept is without being limited thereto, other models (for example, Kriging model etc.) and other multinomial (examples Such as, lagrange polynomial etc.) it is equally applicable.
Fig. 2 is the block diagram for showing the device 200 of calling agent model of example embodiment according to the present invention.
Referring to Fig. 2, calling the device 200 of agent model may include that basis matrix obtains module 210 and computing module 230.
Basis matrix obtains module 210 and can be configured to: obtaining the order matrix of multivariable polynomial substrate as first Order matrix, and the coefficient matrix of multivariable polynomial substrate is obtained as the first coefficient matrix.Computing module 230 can be matched It is set to: being marked the bottom of by of the order matrix of agent model, be based on the first coefficient matrix, generate the second three-dimensional matrix;Based on first Order matrix constructs the order matrix of variable as second-order matrix number;Along the first dimension of the second matrix, by the second matrix and the Second order matrix number does vector product, obtains third matrix;Multivariable polynomial vector is obtained based on third matrix;By agent model Coefficient matrix and multivariable polynomial vector do vector product, obtain the expansion of agent model.
Computing module 230 is also configured to: for each order in the order matrix of agent model, in the first coefficient Row vector corresponding with each order, the element as the second matrix are searched in matrix.
Computing module 230 is also configured to each item in each column by third matrix and is multiplied, and obtains multivariable Each element of polynomial vector.
The step 103 as described in referring to Fig.1 can be performed to the operation of step 111 in computing module 230 shown in Fig. 2, is Simplicity, omits its detailed description herein.
The method of the calling agent model of Fig. 1 according to example embodiment of the present invention and the calling agent model of Fig. 2 Device when calling agent model to calculate, by constructing calculating matrix, complicated nested circulation can be avoided, realize generation It manages model and calls the vectorization calculated, guaranteeing to improve the computational efficiency for calling agent model while not losing precision, from And realize effective application of agent model.Inventive concept according to the present invention, when agent model is in wind-powered electricity generation field based on wind When type and wind parameter of machine etc. are established, the expansion for the agent model conceived according to the present invention can be used for, for example, wind-force The load of generating set is estimated, to design according to load Estimation Optimization, guarantees peace of the wind power generating set in actual motion Quan Xing;Or the power for wind power generating set is estimated, to realize effectively power supply control when grid-connected.
The example embodiment conceived according to the present invention, Fig. 1 description method each step and Fig. 2 description it is each Module and its operation can be written as program or software.It can be based in block diagram shown in the accompanying drawings and flow chart and specification Corresponding description, program or software are write using any programming language.In one example, program or software may include by one Or the machine code that multiple processors or computer directly execute, such as, the machine code generated by compiler.Show at another In example, program or software include the more advanced code for using interpreter to execute by one or more processors or computer.Program Or software can be recorded, stored or be fixed in one or more non-transitory computer-readable storage media.In an example In, program or software or one or more non-transitory computer-readable storage medias can be distributed in computer system.
The example embodiment conceived according to the present invention, Fig. 1 description method each step and Fig. 2 description it is each Module and its operation can be implemented on the computing device including processor and memory.Memory is stored with to be handled for control Device realizes the program instruction of the operation of each unit as described above.
Although specific example embodiments of the invention are described in detail above with reference to Fig. 1 to Fig. 2, do not departing from In the case where the spirit and scope of present inventive concept, it can modify in a variety of manners to the present invention.If the technology of description It is performed in a different order, and/or if the component in system, framework or the device described combines in different ways, And/or replaced or supplemented by other assemblies or their equivalent, then suitable result can be achieved.Therefore, the scope of the present disclosure Do not limited, be limited by the claims and their equivalents by specific embodiment, and in claim and All changes in the range of their equivalent are to be interpreted as being included in the present disclosure.

Claims (8)

1. a kind of method for calling agent model, which is characterized in that the described method includes:
The order matrix of multivariable polynomial substrate is obtained as the first order matrix, and obtains the multivariable polynomial base The coefficient matrix at bottom is as the first coefficient matrix;
It is marked the bottom of by of the order matrix of the agent model, is based on first coefficient matrix, generate the second three-dimensional matrix;
Based on the first order matrix, the order matrix of variable is constructed as second-order matrix number;
Along the first dimension of second matrix, second matrix and the second-order matrix number are done into vector product, obtain the Three matrixes;
Multivariable polynomial vector is obtained based on the third matrix;
The coefficient matrix of the agent model and the multivariable polynomial vector are done into vector product, obtain the agent model Expansion.
2. the method as described in claim 1, which is characterized in that the step of generating the second three-dimensional matrix include:
For each order in the order matrix of the agent model, search and each order in first coefficient matrix Corresponding row vector, the element as second matrix.
3. the method as described in claim 1, which is characterized in that obtain multivariable polynomial vector based on the third matrix Step includes:
Each item in each column of the third matrix is multiplied, each member of the multivariable polynomial vector is obtained Element.
4. a kind of device for calling agent model, which is characterized in that described device includes:
Basis matrix obtains module, is configured as: obtain the order matrix of multivariable polynomial substrate as the first order matrix, And the coefficient matrix of the multivariable polynomial substrate is obtained as the first coefficient matrix;
Computing module is configured as: it is marked the bottom of by of the order matrix of the agent model, is based on first coefficient matrix, it is raw At the second three-dimensional matrix;Based on the first order matrix, the order matrix of variable is constructed as second-order matrix number;Along institute The first dimension for stating the second matrix, does vector product for second matrix and the second-order matrix number, obtains third matrix;Base Multivariable polynomial vector is obtained in the third matrix;By the coefficient matrix of the agent model and the multivariable polynomial Vector does vector product, obtains the expansion of the agent model.
5. device as claimed in claim 4, which is characterized in that the computing module is also configured to act on behalf of mould for described Each order in the order matrix of type searches for row vector corresponding with each order in first coefficient matrix, as The element of second matrix.
6. device as claimed in claim 4, which is characterized in that the computing module is also configured to the third matrix Each column in each item be multiplied, obtain each element of the multivariable polynomial vector.
7. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has when processed Device makes the program instruction of method described in any one of processor perform claim requirement 1 to 3 when executing.
8. a kind of computing device characterized by comprising
Processor;
Memory is stored with and makes side described in any one of processor perform claim requirement 1 to 3 when being executed by a processor The program instruction of method.
CN201711408897.1A 2017-12-22 2017-12-22 Method and device for calling proxy model Pending CN109960775A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711408897.1A CN109960775A (en) 2017-12-22 2017-12-22 Method and device for calling proxy model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711408897.1A CN109960775A (en) 2017-12-22 2017-12-22 Method and device for calling proxy model

Publications (1)

Publication Number Publication Date
CN109960775A true CN109960775A (en) 2019-07-02

Family

ID=67019708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711408897.1A Pending CN109960775A (en) 2017-12-22 2017-12-22 Method and device for calling proxy model

Country Status (1)

Country Link
CN (1) CN109960775A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347966A (en) * 2019-06-12 2019-10-18 南京博泰测控技术有限公司 A kind of method and device for calling agent model
US11204931B1 (en) * 2020-11-19 2021-12-21 International Business Machines Corporation Query continuous data based on batch fitting

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347966A (en) * 2019-06-12 2019-10-18 南京博泰测控技术有限公司 A kind of method and device for calling agent model
US11204931B1 (en) * 2020-11-19 2021-12-21 International Business Machines Corporation Query continuous data based on batch fitting

Similar Documents

Publication Publication Date Title
US11194549B2 (en) Matrix multiplication system, apparatus and method
US11449729B2 (en) Efficient convolutional neural networks
Bottin et al. Large-scale ab initio calculations based on three levels of parallelization
US20220019183A1 (en) Quadratic program solver for mpc using variable ordering
Novak et al. Fast finite width neural tangent kernel
Yang et al. Condensenet v2: Sparse feature reactivation for deep networks
Sabbaghi et al. Model transfer across additive manufacturing processes via mean effect equivalence of lurking variables
JP2021509747A (en) Hardware-based pooling system and method
JP2021140733A (en) Deep layer learning processor, method, device and storage medium
CN109416755B (en) Artificial intelligence parallel processing method and device, readable storage medium and terminal
Li et al. Faster tensor train decomposition for sparse data
CN109960775A (en) Method and device for calling proxy model
Khalfaoui-Hassani et al. Dilated convolution with learnable spacings
Konishi Parallel GPU implementation of null space based alternating optimization algorithm for large-scale matrix rank minimization
Torres et al. Output-error identification of large scale 1D-spatially varying interconnected systems
CN110347966A (en) A kind of method and device for calling agent model
KR101533929B1 (en) Subquadratic Space Complexity Parallel Multiplier for using shifted polynomial basis, method thereof, and recording medium using this
Alimo et al. Delaunay-based optimization in CFD leveraging multivariate adaptive polyharmonic splines (MAPS)
CN116128019A (en) Parallel training method and device for transducer model
CN113779498A (en) Discrete Fourier matrix reconstruction method, device, equipment and storage medium
Shekhawat et al. On the problem of low rank approximation of tensors
Gou et al. Re-training and parameter sharing with the Hash trick for compressing convolutional neural networks
Feng et al. Parametric model order reduction accelerated by subspace recycling
CN107578059A (en) Spectral clustering based on film Computational frame
Shi et al. Design method of PID-type model predictive iterative learning control based on the two-dimensional generalized predictive control scheme

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