CN112016040B - Method, device, equipment and storage medium for constructing weight matrix - Google Patents
Method, device, equipment and storage medium for constructing weight matrix Download PDFInfo
- Publication number
- CN112016040B CN112016040B CN202010081742.7A CN202010081742A CN112016040B CN 112016040 B CN112016040 B CN 112016040B CN 202010081742 A CN202010081742 A CN 202010081742A CN 112016040 B CN112016040 B CN 112016040B
- Authority
- CN
- China
- Prior art keywords
- weight matrix
- unit
- observation
- dimensional space
- target
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0639—Performance analysis of employees; Performance analysis of enterprise or organisation operations
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Resources & Organizations (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Strategic Management (AREA)
- Computational Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Pure & Applied Mathematics (AREA)
- Entrepreneurship & Innovation (AREA)
- Mathematical Optimization (AREA)
- Economics (AREA)
- Mathematical Analysis (AREA)
- Educational Administration (AREA)
- Development Economics (AREA)
- Game Theory and Decision Science (AREA)
- Computing Systems (AREA)
- General Business, Economics & Management (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- Operations Research (AREA)
- Algebra (AREA)
- Marketing (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the invention discloses a method, a device, equipment and a storage medium for constructing a weight matrix. The method comprises the following steps: taking each observation unit in the observed object as a target unit one by one; for each target unit, determining whether each observation unit in the observed object and the target unit meet a square adjacency relation or not; if the three-dimensional space weight matrix is satisfied, taking the observation unit as an adjacent unit, and assigning matrix elements corresponding to the target unit and the observation unit in the pre-constructed three-dimensional space weight matrix as a first numerical value; if the number of the target units and the number of the observation units do not meet the preset value, matrix elements corresponding to the target units and the observation units in the preset three-dimensional space weight matrix are assigned to be second numerical values, wherein the preset three-dimensional space weight matrix is a square matrix taking the number of the observation units as the number of rows and the number of columns. The embodiment of the invention solves the problem of larger error of the distance weight matrix, and improves the calculation accuracy of the space metering economic model.
Description
Technical Field
The embodiment of the invention relates to the technical field of space analysis, in particular to a method, a device, equipment and a storage medium for constructing a weight matrix.
Background
Geospatial observations all have some degree of spatial autocorrelation characteristics over the spatial distribution, and generally, correlation between closer observations is greater than that of farther observations. Space-metric economics developed based on this set of theory are just expressing this spatial autocorrelation by constructing a spatial weight matrix. Thus, the construction of the spatial weight matrix is the core step of the spatial metrology economic model.
The currently commonly used spatial weight matrix is mainly a weight matrix based on a distance relation, namely, the spatial relation is defined by measuring the distance between observers, and specifically comprises an inverse distance weight matrix, a threshold distance weight matrix, K nearest neighbor weight matrices and the like.
The weight matrix based on the distance relation is assumed to be isotropic, for example, the observer a and the observer B are located in the observation space 1, the observer C is located in the observation space 2, if the distances from the observer B and the observer C to the observer a are the same, the spatial dependence of the observer B and the observer C on the observer a is obtained by calculation using the weight matrix based on the distance relation to be identical, but since the observer a and the observer C are in different observation spaces, the correlation between the observer C and the observer a is also affected by the difference in the observation spaces, that is, the spatial dependence of the observer B and the observer C on the observer a is not practically identical. Therefore, the weight matrix based on the distance relation is not suitable for some anisotropic application scenes, and larger calculation errors are brought to the space metering economic model.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for constructing a weight matrix, so as to improve the calculation accuracy of a space metering economic model under a three-dimensional space condition.
In a first aspect, an embodiment of the present invention provides a method for constructing a weight matrix, where the method includes:
taking each observation unit in the observed object as a target unit one by one;
For each target unit, determining whether each observation unit in the observed object and the target unit meet a square adjacency relation or not;
If the three-dimensional space weight matrix is satisfied, taking the observation unit as an adjacent unit, and assigning matrix elements corresponding to the target unit and the observation unit in the pre-constructed three-dimensional space weight matrix as a first numerical value;
if the number of the target units and the number of the observation units do not meet the preset value, matrix elements corresponding to the target units and the observation units in the preset three-dimensional space weight matrix are assigned to be second numerical values, wherein the preset three-dimensional space weight matrix is a square matrix taking the number of the observation units as the number of rows and the number of columns.
In a second aspect, an embodiment of the present invention further provides a device for constructing a weight matrix, where the device includes:
The target unit determining module is used for taking each observation unit in the observed object as a target unit one by one;
The block adjacency determining module is used for determining whether each observing unit in the observed object and each target unit meet a block adjacency or not according to each target unit;
The first numerical value assignment module is used for taking the observation unit as an adjacent unit and assigning matrix elements corresponding to the target unit and the observation unit in a pre-constructed three-dimensional space weight matrix as first numerical values if the first numerical value assignment module meets the first numerical value assignment module;
and the second numerical value assignment module is used for assigning matrix elements corresponding to the target unit and the observation unit in a pre-constructed three-dimensional space weight matrix as a second numerical value if the number of the pre-constructed three-dimensional space weight matrix is not satisfied, wherein the pre-constructed three-dimensional space weight matrix is a square matrix with the number of the observation units as the number of rows and columns.
In a third aspect, an embodiment of the present invention further provides a terminal device, where the device includes:
One or more processors;
A memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of constructing a weight matrix of any of the above-mentioned concerns.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method of constructing a weight matrix as described in any of the above.
According to the embodiment of the invention, the three-dimensional space weight matrix is constructed through the block adjacent relation, so that the problem of larger error caused by the anisotropy of the space effect when the three-dimensional observation unit is defined by the weight matrix based on the distance relation is solved, and the calculation accuracy of the space metering economic model is improved.
Drawings
Fig. 1 is a flowchart of a method for constructing a weight matrix according to an embodiment of the present invention.
Fig. 2 is a flowchart of a method for constructing a weight matrix according to a second embodiment of the present invention.
FIG. 3 is a schematic diagram of a rook-type block adjacency according to a second embodiment of the present invention.
FIG. 4 is a schematic diagram of a queen-type block adjacency relationship according to a second embodiment of the present invention.
Fig. 5 is a flowchart of a method for constructing a weight matrix according to a third embodiment of the present invention
Fig. 6 is a schematic diagram of a device for constructing a weight matrix according to a fourth embodiment of the present invention.
Fig. 7 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a method for constructing a weight matrix according to an embodiment of the present invention, where the embodiment is applicable to a case of constructing a space-metering economic model, the method may be performed by a weight matrix constructing apparatus, and the apparatus may be implemented in a software and/or hardware manner. The method specifically comprises the following steps:
S110, taking each observation unit in the observed object as a target unit one by one.
Wherein, the observed object and the observation unit are both three-dimensional structures. The observed object may be a building, and the observation unit may be a main unit in each layer of building units or a room unit. In particular, the main body unit may be a residential unit, an office unit, or a theater unit according to the type of building. The observed object may be the entire building or a portion of the building, such as the observed object may be floors 4-19 of the building. The observed object and the observed unit are not limited herein.
In one embodiment, optionally, at least one observed object and at least one observed cell in each observed object are acquired. Specifically, when there is only one observed object, if the observed object includes 3 observation units, such as the observation unit 1, the observation unit 2, and the observation unit 3, then the subsequent steps may be performed with the observation unit 1 as the target unit; taking the observation unit 2 as a target unit, and executing the subsequent steps; the following steps are performed with the observation unit 3 as the target unit. When at least two observed objects exist, at least one observed unit in each observed object is sequentially used as a target unit one by one. The order in which the observation units are targeted is not limited herein.
S120, for each target unit, determining whether each observation unit and each target unit in the observed object meet the square adjacency relation, if so, executing S130, and if not, executing S140.
The patent applicant proposed a square adjacency relationship for a three-dimensional space, regarding both the observed object and the observation unit as square cubes stacked in the three-dimensional space. In one embodiment, the block adjacency optionally includes a rook block adjacency, and the rook block adjacency includes the existence of a common plane between the target unit and the observation unit.
Wherein, the common plane refers to the surface where the target unit and the observation unit are in close proximity. Specifically, when the observed unit includes 3 observation units, such as an observation unit 1, an observation unit 2, and an observation unit 3, and the observation unit 1 is used as the target unit, it is determined whether a common plane exists between the target unit and the observation unit 1, and between the observation unit 2 and the observation unit 3, respectively. In one embodiment, optionally, when the target unit and the observation unit are the same unit, it is determined that the target unit and the observation unit do not satisfy rook-style block adjacency. In the above illustration, since the observation unit 1 is the target unit, that is, the target unit is the same unit as the observation unit 1, it is determined that the target unit and the observation unit do not satisfy the rook-type square adjacency relationship.
In one embodiment, the block adjacency optionally includes a queen-type block adjacency that includes two layers where the target unit and the observation unit are located on the same layer or where the target unit and the observation unit are located one above the other.
Specifically, when the observed unit includes 3 observation units, such as the observation unit 1, the observation unit 2 and the observation unit 3, and the observation unit 1 is used as the target unit, it is respectively determined whether there are two layers located at the same layer or located adjacent to each other vertically between the observation unit 2 and the observation unit 3. In one embodiment, optionally, when the target unit and the observation unit are the same unit, it is determined that the target unit and the observation unit do not satisfy the queen-type block adjacency. In the above illustration, since the observation unit 1 is the target unit, that is, the target unit and the observation unit 1 are the same unit, it is determined that the target unit and the observation unit do not satisfy the queen-type block adjacency relationship.
S130, taking the observation unit as an adjacent unit, and assigning matrix elements corresponding to the target unit and the observation unit in a pre-constructed three-dimensional space weight matrix as a first numerical value.
Wherein the first value may be any value, and illustratively, the first value may be 1. Wherein the queen-type block adjacency generally defines more adjacency units than the rook-type block adjacency.
And S140, assigning matrix elements corresponding to the target units and the observation units in a pre-constructed three-dimensional space weight matrix as a second numerical value, wherein the pre-constructed three-dimensional space weight matrix is a square matrix with the number of the observation units as the number of rows and columns.
Wherein the second value may be any value, and illustratively, the second value may be 0.
The pre-constructed three-dimensional space weight matrix is a square matrix taking the number of the observation units as the number of rows and columns. Specifically, when there are n observation units, the pre-constructed three-dimensional space weight matrix includes an n×n square matrix, where n is a positive integer greater than or equal to 2. The pre-constructed three-dimensional space weight matrix satisfies the following formula:
Wherein the three-dimensional spatial weight matrix comprises n×n matrix elements. In one embodiment, optionally, the amplitude of the matrix element w ij satisfies the following condition:
The block adjacency may be rook block adjacency or queen block adjacency.
According to the technical scheme, the three-dimensional space weight matrix is constructed through the square adjacent relation, the problem that errors are large due to anisotropy of space effects when the three-dimensional observation unit is defined by the weight matrix based on the distance relation is solved, and the calculation accuracy of the space metering economic model under the three-dimensional space condition is improved.
Example two
Fig. 2 is a flowchart of a method for constructing a weight matrix according to a second embodiment of the present invention, and the technical solution of this embodiment is further refinement based on the foregoing embodiment. Optionally, the block adjacency includes a first order block adjacency and an n-order block adjacency; the n-level block adjacency comprises that an adjacency unit defined by a target unit and an n-1 level block adjacency satisfies rook-type block adjacency or a queen-type block adjacency, wherein n is a positive integer greater than or equal to 2.
S210, taking each observation unit in the observed object as a target unit one by one.
S220, determining whether the adjacent units defined by the adjacent relation between the target unit and the n-1 order square block meet or not or the adjacent relation of the n order square block according to each target unit, wherein n is a positive integer greater than or equal to 2. If so, S230 is performed, and if not, S240 is performed.
Wherein the block adjacency comprises one of rook block adjacency and queen block adjacency. The adjacent cells are n-1 level adjacent cells defined by n-1 level block adjacency.
S230, taking the target unit as an n-order adjacent unit, and assigning matrix elements corresponding to the target unit and the adjacent unit in the three-dimensional space weight matrix constructed based on the n-1 order square adjacent relation as a first numerical value.
Specifically, a rook-type block adjacency is taken as an example. The first-order rook square adjacency relationship takes an observation unit which has a public plane with a target unit as an adjacency unit; the second-order rook block adjacency uses the target unit with a common plane with the adjacent units defined by the first-order rook block adjacency as a second-order adjacent unit; the third-order rook-type block adjacency includes target units that have a common plane with the adjacency defined by the second-order rook-type block adjacency as third-order adjacency units, and so on.
FIG. 3 is a schematic diagram of a rook-type block adjacency according to a second embodiment of the present invention. As shown in fig. 3, the whole of the white square and the black square is an observed object, wherein the white square is an observation unit; black squares are used as the observation units of the target units; the gray squares are adjacent cells to the target cell. FIG. 3 shows a first-order rook block adjacency, a second-order rook block adjacency, and a third-order rook block adjacency. The observed object shown in fig. 3 may be a medium-high rise building, in which white squares, black squares, and gray squares each represent residential units in the building, by way of example.
Specifically, the queen-type block adjacency is taken as an example. The first-order queen type block adjacency relation takes an observation unit which is positioned on the same layer or two layers adjacent to the target unit up and down as an adjacency unit; the second-order queen type block adjacency relation takes a target unit, which is positioned on the same layer or two layers adjacent to each other above and below the adjacency unit defined by the first-order queen type block adjacency relation, as a second-order adjacency unit; the third-order queen-type block adjacency includes the target units, which are adjacent to the target units defined by the second-order queen-type block adjacency and located on the same layer or on two layers adjacent to the target units, as third-order adjacency units, and so on.
FIG. 4 is a schematic diagram of a queen-type block adjacency relationship according to a second embodiment of the present invention. As shown in fig. 4, the whole of white square and black square is the observed object, and fig. 4 shows the first-order, second-order, and third-order square adjacencies. Wherein, the white square is an observation unit; black squares are observation units that are targeted units; the gray squares are adjacent cells to the target cell. The observed object shown in fig. 4 may be a medium-high rise building, in which white squares, black squares, and gray squares each represent residential units in the building, by way of example.
S240, matrix elements corresponding to the target unit and the adjacent units in the three-dimensional space weight matrix constructed based on the n-1 order square adjacent relation are assigned to be second numerical values.
Wherein the second value may be any value, and illustratively, the second value may be 0.
According to the technical scheme, the three-dimensional space weight matrix is constructed through the n-order square adjacent relation, the problem that errors are large due to anisotropy of space effects when the three-dimensional observation units are defined by the weight matrix based on the distance relation is solved, the description of correlation among the observation units is further refined, and the calculation accuracy of the space metering economic model under the three-dimensional condition is further improved.
Example III
Fig. 5 is a flowchart of a method for constructing a weight matrix according to the third embodiment of the present invention, and the technical solution of this embodiment is further refinement based on the foregoing embodiment. Optionally, the method further comprises: constructing at least one space metering economic model corresponding to each three-dimensional space weight matrix according to the at least one three-dimensional space weight matrix, wherein the space metering economic model comprises a space characteristic price model; and evaluating the space metering economic models by adopting a log likelihood function value and/or a red pool information criterion to determine a target three-dimensional space weight matrix.
S310, taking each observation unit in the observed object as a target unit one by one.
S320, for each target unit, determining whether each observation unit and each target unit in the observed object meet the square adjacency relation. If so, S330 is performed, and if not, S340 is performed.
S330, taking the observation unit as an adjacent unit, and assigning matrix elements corresponding to the target unit and the observation unit in the pre-constructed three-dimensional space weight matrix as a first numerical value.
And S340, assigning matrix elements corresponding to the target unit and the observation unit in the pre-constructed three-dimensional space weight matrix as second numerical values.
S350, constructing at least one space metering economic model corresponding to each three-dimensional space weight matrix according to the at least one three-dimensional space weight matrix, wherein the space metering economic model comprises a space characteristic price model.
The three-dimensional space weight matrix is the three-dimensional space weight matrix after assignment is completed. Wherein the space-metering economy model is a model constructed based on space-metering economy, which is a space interaction of research economy units in cross-section or panel data, and space effects in space-metering economy include space lag effects and space error effects. Spatial metrology economic models include, but are not limited to, spatial lag models, spatial error models, spatial durian models, and more generalized spatial autoregressive models. The spatial feature price model selected in the embodiment is a price model constructed based on a more generalized spatial autoregressive model, wherein the more generalized spatial autoregressive model comprises a dependent variable space hysteresis effect and an error space hysteresis effect. The space feature price model (hedonic price model) is a multiple regression model, specifically referred to as a space feature price model in the real estate field. In one embodiment, optionally, the spatial feature price model satisfies the following formula:
P=α+ρWP+βX+ε;
ε=λWε+μ;
wherein P is the transaction price; w is a three-dimensional spatial weight matrix; WP is the trade price for the space lag; ρ is a coefficient of the trade price of the spatial lag; alpha is a constant; x represents an influencing factor; beta is the coefficient of the influencing factor; epsilon is a random error term; w epsilon is the error term of the spatial lag; λ is the coefficient of the spatially-lagged error term; μ is the independent error term.
Where, illustratively, the trade price P in the spatially-retarded trade price WP is a vector. The spatially-delayed trade price is no longer the trade price of the target unit, but the trade price after being influenced by the neighboring units. The influencing factor X is an independent variable, which can be, for example, a building feature, a location feature, a neighborhood feature, an environmental feature, and the like. The transaction price P is then a dependent variable. Wherein the three-dimensional space weight matrix W is used to represent the spatial dependency between the observation units.
In one embodiment, optionally, performing standardization processing on each three-dimensional space weight matrix to obtain at least one standard weight matrix, wherein the sum of matrix elements of each row of each standard weight matrix is equal to 1; and constructing a space metering economic model corresponding to each standard weight matrix based on each standard weight matrix. Wherein the sum of matrix elements of each standard weight matrix is equal to the number n of observation units.
S360, evaluating each space metering economic model by adopting a log likelihood function value and/or a red pool information criterion, and determining a target three-dimensional space weight matrix.
Wherein, each space metering economic model is the same type, and each space metering economic model is a space lag model or a space error model by way of example. And evaluating the same type of space metering economic model constructed based on different three-dimensional space weight matrixes. Log likelihood function values (Log likelihood) are also known as maximum likelihood estimates; wherein the red pool information criterion (Akaike information criterion) is a criterion for measuring the fitting preference of the statistical model, and the red pool information criterion comprises an AIC criterion and a BIC criterion. In one embodiment, optionally, the method further comprises: and evaluating each space metering economic model by using a Schwarz criterion (Schwarz Criterion, SC) to determine a target three-dimensional space weight matrix.
For example, real estate transaction data for a building in the Ling nan bay-side building in the Li Gulf region of Guangzhou is taken as the construction data. The bay of Ling nan is composed of 11 high-rise ocean houses, each floor has 4-6 households, namely, each floor has 4-6 observation units. 7 three-dimensional space weight matrixes are constructed by adopting a first-order rook type block adjacent relation, a second-order rook type block adjacent relation, a third-order rook type block adjacent relation, a first-order queen type block adjacent relation, a second-order queen type block adjacent relation, a third-order queen type block adjacent relation and a three-dimensional inverse distance relation, and a space feature price model is constructed by taking building features, regional features, adjacent features and environmental features as independent variables and the transaction price of each user as dependent variables. Wherein the three-dimensional-based inverse distance relation comprises assigning matrix elements corresponding to the target unit and the observation unit in a pre-constructed three-dimensional space matrix as distance values, wherein the distance values refer to the inverse of the spatial distance between the target unit and the observation unit. And evaluating the space feature price model by adopting a log likelihood function value, an AIC criterion and a BIC criterion.
Table 1 shows the evaluation results of each evaluation parameter on the space feature price model constructed based on rook block adjacency.
Table 2 shows the evaluation results of each evaluation parameter on the spatial feature price model constructed based on the queen-type square adjacency relationship and the three-dimensional inverse distance relationship.
In the evaluation of the space feature price model, the higher log likelihood function value considers that the weight matrix better reflects the space relation among the observation units, and the lower statistical values of the AIC criterion and the BIC criterion consider that the weight matrix better reflects the space relation among the observation units. Based on the evaluation criteria and the evaluation results, the evaluation results of the space feature price model constructed based on the technical scheme described in the embodiment are better than the evaluation results of the space feature price model constructed based on the three-dimensional inverse distance relation, and the three-dimensional space weight matrix constructed based on the second-order queen-type square adjacency relation is taken as the target three-dimensional space weight matrix.
According to the technical scheme, at least one space metering economic model is constructed based on the three-dimensional weight matrix constructed by the at least one square adjacent relation, the problem of large error caused by anisotropy of space effect when the three-dimensional observation unit is defined by the weight matrix based on the distance relation is solved, and the three-dimensional weight matrix most suitable for the space metering economic model is obtained by screening the result of the space metering economic model, so that the calculation accuracy of the space metering economic model is further improved.
Example IV
Fig. 6 is a schematic diagram of a device for constructing a weight matrix according to a fourth embodiment of the present invention. The embodiment can be applied to the situation of constructing a space metering economic model, the device can be realized in a software and/or hardware mode, and the construction device of the space weight matrix comprises: the target unit determination module 410, the block adjacency determination module 420, the first value assignment module 430, and the second value assignment module 440.
Wherein, the target unit determining module 410 is configured to take each observation unit in the observed object as a target unit one by one;
a block adjacency determining module 420, configured to determine, for each target unit, whether each observation unit and each target unit in the observed object satisfy a block adjacency;
A first value assignment module 430, for, if satisfied, the observation unit is taken as an adjoining unit, and assigning matrix elements corresponding to the target unit and the observation unit in a pre-constructed three-dimensional space weight matrix as a first numerical value;
And a second value assignment module 440, configured to assign matrix elements corresponding to the target unit and the observation unit in the pre-constructed three-dimensional space weight matrix to a second value if the number of the pre-constructed three-dimensional space weight matrix is not satisfied, where the pre-constructed three-dimensional space weight matrix is a square matrix with the number of the observation units as the number of rows and columns.
According to the technical scheme, the three-dimensional space weight matrix is constructed through the square adjacent relation, the problem that errors are large due to anisotropy of space effects when the three-dimensional observation unit is defined by the weight matrix based on the distance relation is solved, and the calculation accuracy of the space metering economic model under the three-dimensional space condition is improved.
Based on the above technical solution, optionally, the block adjacency relationship includes rook type block adjacency relationship, and the rook type block adjacency relationship includes that a common plane exists between the target unit and the observation unit.
Optionally, the square adjacency includes a queen square adjacency, where the queen square adjacency includes two layers where the target unit and the observation unit are located on the same layer or where the target unit and the observation unit are located on two adjacent layers.
Optionally, the block adjacency includes a first order block adjacency and an n-order block adjacency; the n-level block adjacency includes that the adjacency unit defined by the target unit and the n-1 level block adjacency satisfies rook-type block adjacency or the queen-type block adjacency, wherein n is a positive integer greater than or equal to 2.
Optionally, the apparatus further comprises:
The space metering economic model construction module is used for constructing at least one space metering economic model corresponding to each three-dimensional space weight matrix according to the at least one three-dimensional space weight matrix, wherein the space metering economic model comprises a space characteristic price model;
And the target three-dimensional space weight matrix determining module is used for evaluating each space metering economic model by adopting the log likelihood function value and/or the red pool information criterion to determine the target three-dimensional space weight matrix.
Optionally, the space feature price model satisfies the following formula:
P=α+ρWP+βX+ε
ε=λWε+μ
wherein P is the transaction price; w is a three-dimensional spatial weight matrix; WP is the trade price for the space lag; ρ is a coefficient of the trade price of the spatial lag; alpha is a constant; x represents an influencing factor; beta is the coefficient of the influencing factor; epsilon is a random error term; w epsilon is the error term of the spatial lag; λ is the coefficient of the spatially-lagged error term; μ is the independent error term.
Optionally, the space metering economic model building module is specifically configured to:
Carrying out standardization processing on each three-dimensional space weight matrix to obtain at least one standard weight matrix, wherein the sum of matrix elements of each row of each standard weight matrix is equal to 1; and constructing a space metering economic model corresponding to each standard weight matrix based on each standard weight matrix.
The device for constructing the weight matrix provided by the embodiment of the invention can be used for executing the method for constructing the weight matrix provided by the embodiment of the invention, and has the corresponding functions and beneficial effects of the executing method.
It should be noted that, in the embodiment of the apparatus for constructing a weight matrix, each unit and module included in the apparatus are only divided according to the functional logic, but not limited to the above division, so long as the corresponding function can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Example five
Fig. 7 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention, where the embodiment of the present invention provides services for implementing the method for constructing a weight matrix according to the foregoing embodiment of the present invention, and the apparatus for constructing a weight matrix according to the foregoing embodiment may be configured. Fig. 7 shows a block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention. The device 12 shown in fig. 7 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 7, device 12 is in the form of a general purpose computing device. Components of device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. Device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 7, commonly referred to as a "hard disk drive"). Although not shown in fig. 7, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
Device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with device 12, and/or any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, via network adapter 20. As shown in fig. 7, network adapter 20 communicates with other modules of device 12 over bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the construction method of the weight matrix provided by the embodiment of the present invention.
By the aid of the device, the problem that errors are large due to anisotropy of space effects when the three-dimensional observation units are defined by the weight matrix based on the distance relation is solved, and calculation accuracy of the space metering economic model is improved.
Example six
The sixth embodiment of the present invention also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for constructing a weight matrix, the method comprising:
taking each observation unit in the observed object as a target unit one by one;
for each target unit, determining whether each observation unit and each target unit in the observed object meet a square adjacent relation or not;
If the three-dimensional space weight matrix is satisfied, the observation unit is taken as an adjacent unit, and matrix elements corresponding to the target unit and the observation unit in the pre-constructed three-dimensional space weight matrix are assigned to be a first numerical value;
If the number of the target units and the number of the observation units do not meet the preset value, matrix elements corresponding to the target units and the observation units in the preset three-dimensional space weight matrix are assigned to be second numerical values, wherein the preset three-dimensional space weight matrix is a square matrix taking the number of the observation units as the number of rows and columns.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present invention is not limited to the above method operations, and may also perform the related operations in the method for constructing the weight matrix provided in any embodiment of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.
Claims (7)
1. The construction method of the weight matrix is characterized by comprising the following steps:
taking each observation unit in the observed object as a target unit one by one;
For each target unit, determining whether each observation unit in the observed object and the target unit meet a square adjacency relation or not;
If the three-dimensional space weight matrix is satisfied, taking the observation unit as an adjacent unit, and assigning matrix elements corresponding to the target unit and the observation unit in the pre-constructed three-dimensional space weight matrix as a first numerical value;
if the number of the target units and the number of the observation units do not meet the preset value, assigning matrix elements corresponding to the target units and the observation units in a preset three-dimensional space weight matrix as a second numerical value, wherein the preset three-dimensional space weight matrix is a square matrix taking the number of the observation units as the number of rows and the number of columns;
Constructing at least one space metering economic model corresponding to each three-dimensional space weight matrix according to the at least one three-dimensional space weight matrix, wherein the space metering economic model comprises a space characteristic price model;
evaluating each space metering economic model by adopting a log likelihood function value and/or a red pool information criterion to determine a target three-dimensional space weight matrix;
the space feature price model satisfies the following formula:
P=α+ρWP+βX+ε;
ε=λWε+μ;
Wherein P is the transaction price; w is a three-dimensional spatial weight matrix; WP is the trade price for the space lag; ρ is a coefficient of the trade price of the spatial lag; alpha is a constant; x represents an influencing factor; beta is the coefficient of the influencing factor; epsilon is a random error term; w epsilon is the error term of the spatial lag; λ is the coefficient of the spatially-lagged error term; μ is the independent error term;
constructing at least one space metering economic model corresponding to each three-dimensional space weight matrix according to the at least one three-dimensional space weight matrix, wherein the method comprises the following steps:
Carrying out standardization processing on each three-dimensional space weight matrix to obtain at least one standard weight matrix, wherein the sum of matrix elements of each row of each standard weight matrix is equal to 1;
And constructing a space metering economic model corresponding to each standard weight matrix based on each standard weight matrix.
2. The method of claim 1, wherein the block adjacency comprises a rook block adjacency, and wherein the rook block adjacency comprises a common plane between the target unit and the observation unit.
3. The method of claim 1, wherein the square adjacency comprises a queen square adjacency comprising the target unit and the observation unit being at the same layer or the target unit and the observation unit being at two layers that are adjacent one above the other, respectively.
4. A method according to claim 2 or 3, wherein the block adjacency comprises a first order block adjacency and an n-order block adjacency; the n-level block adjacency comprises that an adjacency unit defined by a target unit and an n-1 level block adjacency satisfies rook-type block adjacency or a queen-type block adjacency, wherein n is a positive integer greater than or equal to 2.
5. A device for constructing a weight matrix, wherein the method for constructing the weight matrix according to any one of claims 1 to 4 comprises:
The target unit determining module is used for taking each observation unit in the observed object as a target unit one by one;
The block adjacency determining module is used for determining whether each observing unit in the observed object and each target unit meet a block adjacency or not according to each target unit;
The first numerical value assignment module is used for taking the observation unit as an adjacent unit and assigning matrix elements corresponding to the target unit and the observation unit in a pre-constructed three-dimensional space weight matrix as first numerical values if the first numerical value assignment module meets the first numerical value assignment module;
and the second numerical value assignment module is used for assigning matrix elements corresponding to the target unit and the observation unit in a pre-constructed three-dimensional space weight matrix as a second numerical value if the number of the pre-constructed three-dimensional space weight matrix is not satisfied, wherein the pre-constructed three-dimensional space weight matrix is a square matrix with the number of the observation units as the number of rows and columns.
6. A terminal device, comprising:
One or more processors;
A memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method of constructing a weight matrix as claimed in any one of claims 1-4.
7. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the method of constructing a weight matrix according to any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010081742.7A CN112016040B (en) | 2020-02-06 | 2020-02-06 | Method, device, equipment and storage medium for constructing weight matrix |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010081742.7A CN112016040B (en) | 2020-02-06 | 2020-02-06 | Method, device, equipment and storage medium for constructing weight matrix |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112016040A CN112016040A (en) | 2020-12-01 |
CN112016040B true CN112016040B (en) | 2024-08-02 |
Family
ID=73506493
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010081742.7A Active CN112016040B (en) | 2020-02-06 | 2020-02-06 | Method, device, equipment and storage medium for constructing weight matrix |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112016040B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2499033A1 (en) * | 2004-03-02 | 2005-09-02 | Microsoft Corporation | A system and method for beamforming using a microphone array |
CN107239477A (en) * | 2016-07-27 | 2017-10-10 | 中国石油大学(华东) | A kind of geodata support vector regression method for merging spatial coherence |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070198504A1 (en) * | 2006-02-23 | 2007-08-23 | Microsoft Corporation | Calculating level-based importance of a web page |
WO2009038822A2 (en) * | 2007-05-25 | 2009-03-26 | The Research Foundation Of State University Of New York | Spectral clustering for multi-type relational data |
US10585944B2 (en) * | 2017-07-06 | 2020-03-10 | International Business Machines Corporation | Directed graph compression |
CN109840530A (en) * | 2017-11-24 | 2019-06-04 | 华为技术有限公司 | The method and apparatus of training multi-tag disaggregated model |
CN108804266A (en) * | 2018-05-22 | 2018-11-13 | 郑州云海信息技术有限公司 | A kind of performance of storage system test method, device and computer readable storage medium |
-
2020
- 2020-02-06 CN CN202010081742.7A patent/CN112016040B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2499033A1 (en) * | 2004-03-02 | 2005-09-02 | Microsoft Corporation | A system and method for beamforming using a microphone array |
CN107239477A (en) * | 2016-07-27 | 2017-10-10 | 中国石油大学(华东) | A kind of geodata support vector regression method for merging spatial coherence |
Also Published As
Publication number | Publication date |
---|---|
CN112016040A (en) | 2020-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20120198466A1 (en) | Determining an allocation of resources for a job | |
CN111898247B (en) | Landslide displacement prediction method, landslide displacement prediction equipment and storage medium | |
CN112232495A (en) | Prediction model training method, device, medium and computing equipment | |
CN117519946A (en) | Memory resource scheduling method, device, equipment and medium in deep learning network | |
CN112016040B (en) | Method, device, equipment and storage medium for constructing weight matrix | |
CN113988986A (en) | Credit evaluation method, credit evaluation device, electronic equipment and storage medium | |
CN111062604B (en) | Meteorological disaster-based power grid business risk assessment method, device and equipment | |
CN113238852A (en) | Task allocation method and device, electronic equipment and storage medium | |
Almomani et al. | Ordinal optimization with computing budget allocation for selecting an optimal subset | |
CN112801620B (en) | Engineering information processing method, device, equipment and storage medium | |
CN113379232B (en) | Evaluation method, device, medium and equipment of power communication system | |
CN116402354A (en) | Evaluation parameter determining method and device, medium and electronic equipment | |
CN114090451A (en) | Software quality evaluation method and device, electronic terminal and storage medium | |
CN111598390B (en) | Server high availability evaluation methods, devices, equipment and readable storage media | |
CN110601195B (en) | Power distribution network user power supply access method, system, server and storage medium | |
CN113887671A (en) | Automatic extraction method and system of architectural drawing information based on image recognition technology | |
CN114627416A (en) | Video processing method and device | |
CN114741822A (en) | Method, system and device for predicting power failure probability of power distribution network under natural disasters | |
CN118427262B (en) | Disaster-bearing body data rasterization method, device, equipment and medium | |
CN113901051A (en) | Method and device for generating WebGL data, storage medium and electronic equipment | |
CN118734414B (en) | A computational decision-making aid method and system for weather-adaptive building cavity design | |
Zamri et al. | Application of the ARIMA model in house price index in Malaysia | |
CN117407727B (en) | Vector similarity determining method and vector searching method | |
CN111563526B (en) | Embedded vector evaluation method and device and electronic equipment | |
CN113051470B (en) | Position accuracy evaluation method and device, electronic equipment and computer readable medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |