A method, storage medium and terminal for predicting the use activity of urban parks

By using weighted random forest algorithm and k-nearest neighbor weights in the urban park usage activity prediction method, the problem that the existing technology is difficult to dynamically reveal the spatial and temporal changes in urban park usage characteristics is solved, and the accuracy of urban park usage activity is achieved Forecasting provides effective data support for park planning.

CN114611838BActive Publication Date: 2025-02-14SOUTHEAST UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210381980.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-12
Publication Date
2025-02-14
Estimated Expiration
2042-04-12

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively reveal the spatial and temporal characteristics of urban park use from a dynamic perspective, resulting in a lack of research on the activity of urban park use.

Method used

A method for predicting the use activity of urban parks is proposed. By using the environmental factor data of the park to be tested and the spatiotemporal feature data of the activity level as the sample data, and using the weighted random forest algorithm, the adjacency matrix based on the k neighbor weight is used to perform samples in the leaf nodes. Weighted, establish a weighted random forest model to predict park usage activity.

Benefits of technology

This method can accurately predict the spatiotemporal distribution characteristics of urban park user density and usage activity, and provide data support for park planning, design, transformation and upgrading and post-management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114611838B_ABST
    Figure CN114611838B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, storage medium and terminal for predicting the use activity of a city park, and belongs to the field of urban planning technology. A method for predicting the use activity of a city park comprises the following steps: acquisition and quantification of park environmental factor data; acquisition and quantification of spatiotemporal characteristic data of park use activity; forming sample data according to the park environmental factor data and the spatiotemporal characteristic data of park use activity; and establishing a random forest estimation model according to the sample data. When applying the random forest model, the present invention takes into account the heterogeneity and dependence of urban space, and combines the spatial correlation of urban parks to improve the prediction accuracy of the density of urban park users and the spatiotemporal distribution characteristics of use activity based on the urban park environmental factor indicators, thereby providing data support for its planning and design, transformation and improvement, and later management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of urban planning, and in particular to a method, storage medium and terminal for predicting the use activity of an urban park. Background Art

[0002] Urban parks not only have good ecological benefits, but are also the main places for residents to exercise and engage in outdoor leisure and entertainment activities. The focus on the use of urban parks is the response of urban planning disciplines to the current medical and health model that focuses on treating diseases to the social model that intervenes in the overall health level of residents. Based on the theoretical framework of time geography, activity can be defined as the dynamic distribution of the number or density of research objects within a certain time or space range. It reflects the accessibility and audience satisfaction of the evaluated media. Monitoring the activity of urban park use helps to understand the actual utility of parks, but research on the activity of park green spaces is still relatively scarce.

[0003] Existing literature on the use and evaluation of park green space using big data such as Weibo, WeChat, and POI is mostly based on static analysis of a certain time section. Open big data, with its non-discriminatory nature that is open to everyone, the readability of data that can be automatically recognized by machines, and the open authorization of users to access, obtain, use, process, and disseminate for free, enables researchers to break away from the static analysis of traditional big data based on a certain time section and describe people's spatial activities in a more convenient and accurate way. At present, some results of applying big data to study urban parks have been produced in China, but the overall number of studies that reveal the spatiotemporal change characteristics of urban park use from a dynamic perspective with the help of open big data is still relatively small. Therefore, a method for predicting the activeness of urban park use is proposed. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention proposes a method, storage medium and terminal for predicting the usage activity of a city park.

[0005] The purpose of the present invention can be achieved through the following technical solutions:

[0006] A method for predicting the use activity of an urban park, characterized by comprising:

[0007] The environmental factor data and spatiotemporal characteristic data of the park to be tested are used as sample data; the sample data are divided into a first training set and a first test set in proportion; the first test set is resampled by the Bootstrap method to generate a second training set;

[0008] Generate a corresponding decision tree based on the second training set, where before selecting an attribute on each non-leaf node, the decision tree randomly selects m attributes from all attributes as the split attribute set of the current node, and selects a split attribute from them as the node to split;

[0009] Select sample parks and calculate the spatial weights of the sample parks relative to the park to be tested, and train a decision tree based on the spatial weights and the target loss function;

[0010] The test set is trained using the trained decision tree, and the average of the training results is the predicted value of the usage activity of the park to be tested.

[0011] Furthermore, the segmentation attribute is selected based on random noise, and the specific steps are as follows:

[0012]

[0013] in, Indicates the importance of attribute i; represents the out-of-bag data error, It means randomly adding noise interference to the attribute i of all samples out of the bag.

[0014] Furthermore, the selecting of sample parks and calculating the spatial weights of the sample parks relative to the park to be tested, and training the decision tree based on the spatial weights and the target loss function include the following steps:

[0015] Calculate the Euclidean distance h between the park to be tested and the sample park p,j , where p represents the park to be tested and j represents each sample park;

[0016] The Euclidean distance h p,j Substitute into the establishment of the adjacency matrix based on the k-value nearest neighbor weight. For the k-value nearest neighbor space matrix, W pj is the interaction weight between the park to be tested p and the sample park j, and the calculation formula is:

[0017]

[0018] The weighted root mean square error function is used as the target loss function to train the decision tree:

[0019]

[0020]

[0021]

[0022]

[0023] λ represents the segmentation attribute or factor for building a decision tree, v represents the segmentation point for building the corresponding attribute of the decision tree, and ρ left and ρ right Represents the sample park value set contained in the left child node and the right child node respectively, ρ a and ρb Represents the sample values ​​in the left and right child node sets, N left and N right Represent the number of sample parks in the left child node and the right child node respectively.

[0024] Furthermore, the average value of the training results is calculated based on the minimum variance principle, which specifically includes the following steps:

[0025] For any partition feature F, the corresponding data sets D1 and D2 on both sides of any partition point S are divided. Find the feature and eigenvalue partition point that minimizes the sum of the mean square errors of D1 and D2 and the sum of the mean square errors of D1 and D2. The expression is:

[0026]

[0027] Among them, C1 is the sample output mean of the D1 data set, and C2 is the sample output mean of the D2 data set.

[0028] Furthermore, the coefficient of determination R 2 And mean square error MSE are indicators for model evaluation, including:

[0029]

[0030] Among them, y i is the actual value, For the model estimate, is the sample mean, and n is the number of samples.

[0031] Furthermore, the environmental factor data includes park basic information data, park accessibility data and park facility data.

[0032] Furthermore, the basic park information data include the park area, the distance between the park and the city center;

[0033] Park accessibility data include the distance from the park entrance to the nearest subway station, the area accessible by 15 minutes’ walk, the area accessible by 30 minutes’ walk, and the area accessible by 30 minutes’ drive;

[0034] Park facility data includes the number of catering facilities in the park, the number of commercial facilities in the park, and the number of sports and leisure facilities in the park.

[0035] Furthermore, the usage activity spatiotemporal feature data includes user density type spatiotemporal feature data and usage activity type spatiotemporal feature data of the park to be tested;

[0036] The spatial-temporal characteristic data of user density types include the average number of users per hectare of land in the park under test on weekends and the average number of users per hectare of land in the park under test on weekdays;

[0037] The spatiotemporal feature data using activity type include activity and stability.

[0038] In a second aspect, the present invention further provides a storage medium storing a plurality of programs, wherein the programs are used to be loaded and executed by a processor to implement any of the above-mentioned methods for predicting the use activity of a city park.

[0039] In a third aspect, the present invention also provides a city park usage activity prediction terminal, comprising a processor suitable for executing various programs, wherein the programs are loaded and executed by the processor to implement any of the above-mentioned city park usage activity prediction methods.

[0040] Beneficial effects of the present invention:

[0041] The present invention starts from the heterogeneity and dependence of urban space, combines the spatial correlation of urban parks, uses the weighted random forest algorithm, and weights the samples in the leaf nodes based on the adjacency matrix of the k nearest neighbor weights to establish a weighted random forest model. There is no need to test the assumptions such as normality and independence of attributes, nor to consider the collinearity problem of multiple attributes. The operation is efficient, the results are accurate, and there is a good tolerance for outliers and noise. It can more accurately predict the spatial and temporal distribution characteristics of the density of urban park users and the degree of use activity based on the environmental factor indicators of urban parks, thereby providing data support for its planning, design, transformation and improvement, and later management. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The present invention will be further described below in conjunction with the accompanying drawings.

[0043] Figure 1 This is a flowchart of the application;

[0044] Figure 2 This is a distribution diagram of usage activity types for this application;

[0045] Figure 3 This is a schematic diagram of the size distribution of parks for this application;

[0046] Figure 4 The distance distribution map to the city center for this application;

[0047] Figure 5 This is the distance distribution map to the nearest subway station for this application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] In the description of the present invention, it should be understood that the terms "opening", "upper", "lower", "thickness", "top", "middle", "length", "inside", "all around" and the like indicating orientation or positional relationship are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the components or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0050] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0051] A method for predicting the use activity of an urban park comprises the following steps:

[0052] Acquisition and quantification of environmental factor data of the park to be tested;

[0053] Acquisition and quantification of spatiotemporal characteristic data of the use activity of the park to be tested;

[0054] Sample data is formed based on the park's environmental factor data and spatiotemporal characteristic data of usage activity;

[0055] A weighted random forest estimation model is established based on the sample data.

[0056] Acquisition and Quantification of Park Environmental Factor Data

[0057] The park's environmental factor data include basic information data of the park, park accessibility data and park facility data; the park's basic information data include the park's area and the distance between the park and the city center; the park's accessibility data include the distance from the park entrance to the nearest subway station, the area accessible within 15 minutes' walk, the area accessible within 30 minutes' walk, and the area accessible within 30 minutes' drive; the park's facility data include the number of catering facilities in the park, the number of commercial facilities in the park, and the number of sports and leisure facilities in the park.

[0058] Park area: obtained from map software, such as Amap, Tencent Map, Google Map, etc. Taking Tencent Map API as an example, all urban parks in the study area are searched from Tencent Map API using polygon search interface, and their names, vertex coordinates and center point coordinates are obtained; using the obtained vertex coordinates, the vertex coordinates are A1(e1,f1), A2(e2,f2), ..., A n (e n ,f n );The park area S is calculated by the following formula:

[0059]

[0060] Distance from the park to the city center: Get the longitude and latitude coordinates of the city park center and the city center, defined as the city park center (Lat1, Lon1) and the city center (Lat2, Lon2); where Lat represents latitude and Lon represents longitude. Based on the following formula, get the distance between the two points:

[0061]

[0062] Among them, a=Lat1-Lat2 is the difference between the latitudes of the two points, b=Lon1-Lon2 is the difference between the longitudes of the two points, 6378.137 (km) is the radius of the earth, and d represents the distance from the park to the city center. The result is km.

[0063] Park facility environmental factor data: Use the POIinfo interface to obtain the park's boundary information; use the polygon search interface to search for POIs of a specified type within the park's boundary to obtain the number and location of park entrances and exits, the number of catering facilities in the park, the number of commercial facilities in the park, and the number of sports and leisure facilities in the park. Park accessibility environmental factor data;

[0064] Distance from the park to the nearest subway station: Use the polygon search interface to search for the coordinates of the subway station closest to the park, and then calculate the distance between the park and the nearest subway station;

[0065] 5-min / 30-min walking range: Use the path planning tool of the map software to calculate the walking range from the park within a certain period of time during non-peak hours on weekdays, and get the 15-min / 30-min walking range. The specific steps are as follows: For the walking range of a specific park, first, within a circle with the center coordinates of the park as the center and a radius of 3km, select control points (with different longitudes and latitudes) at intervals of 300m along the north-south and east-west directions, and then use the Tencent path planning interface to obtain the time distance from each control point to the park entrance;

[0066] For parks with less than 2 entrances, since these parks are generally open parks without fences, the method used is to first calculate the time from the control point to the center of the park, then assume that the park is circular and calculate its radius, and subtract the time to walk from the edge of the park to the center of the park from the time distance obtained previously, as the final time distance for the control point to reach the park.

[0067] For parks with two or more entrances, the time distance from each control point to each entrance of the park is calculated separately, and then the shortest time distance is taken as the final time distance from the control point to the park.

[0068] After obtaining the time distance from the control point to the park, the spatial position and time distance data of the control point are used to perform Cubic interpolation through the Matplotlib library and the Scipy.interpolate library to obtain a raster file describing the time distance to the park. The contour lines of the specific time (in minutes) in the raster file are then traced, and the area within the boundary is calculated to obtain the area that can be reached within 15 minutes / 30 minutes on foot.

[0069] 30-minute driving range: Use the path planning tool of the map software to calculate the walking range from the park within a certain period of time during non-peak hours on weekdays, and obtain the 30-minute driving range. In the selection of control points for calculating the motor vehicle accessible range, a layer-by-layer search method is adopted, that is, starting from the center of the park, with a radius gradient of 500m, the time distance from each control point on each concentric circle to the center of the park is searched from the inside to the outside. If the time distance of all control points on a circle is greater than 30 minutes, it is considered that the boundary of the park's accessible range has been searched, the search is stopped, and then the 30-minute motor vehicle accessible range is estimated using the interpolation method. Since the motor vehicle accessible range of the park is much larger than the park itself, the difference between the park entrance and the park center can be ignored in the calculation to simplify the calculation process.

[0070] Acquisition and quantification of spatiotemporal characteristic data of the park's usage activity

[0071] Spatiotemporal characteristics of usage activity: Spatiotemporal characteristics of usage activity include the spatiotemporal characteristics of user density and the spatiotemporal characteristics of usage activity type in the park under test; the spatiotemporal characteristics of user density include the average number of users per hectare of park land on weekends and the average number of users per hectare of park land on weekdays. Spatiotemporal characteristics of usage activity type include activity and stability

[0072] Spatiotemporal characteristics of user density type: The location big data interface of the map software is used to obtain the total number of positioning requests initiated through location services in the park within a certain period of time, and the number of park users is counted to obtain the average number of park users per hectare on weekends and the average number of park users per hectare on weekdays.

[0073] Spatiotemporal characteristics of usage activity type: By using the number of users in different time periods within the statistical time period, the usage activity of urban parks can be analyzed, and the average daily activity density of each park can be calculated. On this basis, the average daily activity density of all parks can be calculated. The activity is determined based on the relative height of the average daily activity density of each park and the average of the average daily activity density of all parks; the stability is determined based on the relative height of the standard deviation (standardized) of the daily activity of each park and the average of the standard deviation of the daily activity of all parks.

[0074] Sample data is generated based on the park's environmental factor data and spatiotemporal characteristic data of usage activity.

[0075] The spatiotemporal characteristics of the usage activity of the park to be tested that need to be calculated are stored in the sample as Y values, where the spatiotemporal characteristics of the usage activity as Y values ​​include: Y1 the average number of people using the park per hectare of land on weekends, Y2 the average number of people using the park per hectare of land on weekdays, Y3 activity, and Y4 stability.

[0076] The environmental factor data are stored in the sample as X values, including: X1 park area, X2 distance from the city center, X3 distance from the park entrance to the nearest subway station, X4 area reachable by walking in 15 minutes, X5 area reachable by walking in 30 minutes, X6 area reachable by driving in 30 minutes, X7 number of catering facilities in the park, X8 number of commercial facilities in the park, and X9 number of sports and leisure facilities in the park.

[0077] Establish a random forest estimation model based on sample data;

[0078] Data normalization: Since the selected evaluation values ​​have different dimensions and dimensional units, this situation will affect the final result. In order to eliminate this effect, the input sample data set needs to be normalized so that the sample feature distribution is close to the standard normal distribution to achieve better results. Here, MinMaxScaler is used to scale the features to a given minimum and maximum value, usually [0,1].

[0079]

[0080] Among them, x i is the measured sample value at this point, x min(axis=0) is the minimum sample, x max(axis=0)is the maximum sample, and max and min are the maximum and minimum values ​​of the given zoom range.

[0081] Sample training set and test set selection: Before modeling, the sample data set needs to be divided into training set D and test set E. When dividing the training set and test set, a trade-off needs to be made. The smaller the test set data, the less accurate the estimation of the generalization error of the model. Generally, in practical applications, based on the size of the entire data set, the ratio of training set data to test set data is 6:4, 7:3 or 8:2. For large data, 9:1 or even 99:1 can be used.

[0082] Weighted random forest model establishment:

[0083] The RF regression model is represented by {h(X,θk), k=1,…}, where X is the input vector and {θk} is an independent and identically distributed random vector. The specific steps are as follows:

[0084] For the above training set D = {(x1,y1),(x2,y2),…,(x n ,y n )}, for the sake of distinction, D1 is called the first training set;

[0085] Use the Bootstrap method to resample the first training set D1 and randomly generate T second training sets D 21 ,D 22 ,…,D 2T ;

[0086] Generate corresponding decision trees C1, C2, ..., C for each second training set T ; Before selecting an attribute on each non-leaf node, randomly select m (m<<M) attributes from all M attributes as the split attribute set of the current node, and select the best split attribute from them as the node for splitting; here m controls the degree of randomness introduced. If m=M, the construction of the base decision tree is the same as the traditional decision tree; if m=1, an attribute is randomly selected for splitting. Generally, m=log2m is recommended;

[0087] Calculate the spatial weight of the sample park: establish an adjacency matrix based on the k-nearest neighbor weights to solve the weight of the sample park;

[0088] Calculate the Euclidean distance between the park to be tested and each sample park: obtain the longitude and latitude coordinates of the park to be tested p {(Lat p, Lon p), p = 1, 2 ... p} and the longitude and latitude coordinates of each sample park {(Lat j, Lon j), j = 1, 2 ... j}, and refer to the calculation method of the distance between the city center and the city park center to obtain the distance h between the park to be tested and each sample park. p,j, where p represents the park to be tested, j represents each sample park, and h represents the distance between the park to be tested and the sample park.

[0089] Substitute the calculated Euclidean distance into the adjacency matrix based on the k-nearest neighbor weights. For the k-value nearest neighbor space matrix, W pj is the interaction weight between two objects i and j with a distance h, and the calculation formula is:

[0090]

[0091] Solve for h p,j That is, the spatial weight of each sample park relative to the park to be tested;

[0092] Training the weighted random forest model: For each decision tree of the weighted random forest, the weighted root mean square error function is used as the improved objective function to train the random forest regression model; for each decision tree, the improved objective loss function is used for training, and the formula is:

[0093]

[0094]

[0095]

[0096]

[0097] λ represents the segmentation attribute or factor for building a decision tree, v represents the segmentation point for building the corresponding attribute of the decision tree, and ρ left and ρ right Represents the sample park value set contained in the left child node and the right child node respectively, ρ a and ρ b Represents the sample values ​​in the left and right child node sets, N left and N right Represent the number of sample parks in the left child node and the right child node respectively. and The calculation is no longer a simple arithmetic mean, but a weighted average based on spatial weights, where the weights reflect the spatial autocorrelation characteristics of urban parks.

[0098] The multiple decision trees generated by the above process form a weighted random forest. For the test set E, each decision tree is used for training to obtain the prediction results C1(E), C2(E),…, C T (E);

[0099] Get the predicted value of the test set E: Use CART to build a regression tree. The principle adopted is minimum variance. That is, for any partition feature A, the corresponding data sets D1 and D2 on both sides of any partition point S are divided. Find the features and feature value partition points that make the sum of the mean square errors of D1 and D2 the smallest. At the same time, the sum of the mean square errors of D1 and D2 is the smallest. The expression is:

[0100]

[0101] Add random noise to the attributes of each decision tree to determine the attribute importance of the RF model, and then test the increase or decrease of the out-of-bag error. If the error increases, the attribute is more important, otherwise it is not important. The calculation method is:

[0102] in, Indicates the importance of attribute i; represents the out-of-bag (OOB) error, It means randomly adding noise interference to the attribute i of all samples of the out-of-bag data OOB, and recalculating the out-of-bag error.

[0103] Model evaluation: Model evaluation selection determination coefficient R 2 And mean square error MSE two indicators. Among them, R 2 Characterizes the extent to which the regression equation explains the changes in the dependent attributes, or how well the model fits the observed values:

[0104] Among them, y i is the actual value, For the model estimate, is the sample mean, and n is the number of samples.

[0105] In summary, compared with the prior art, the present invention has the following beneficial effects: When constructing a decision tree, the existing classic random forest regression algorithm calculates the predicted value by taking the average value of all sample observations in the leaf node. Since urban parks have a certain degree of spatial correlation, the present invention starts from the heterogeneity and dependence of urban space, and weights the samples in the leaf nodes based on the adjacency matrix of k nearest neighbor weights, so that the predicted park usage activity is more accurate. The weighted random forest model of the present invention tolerates unbalanced data sets and has accurate result output, which is also in line with the data missing conditions that may occur in applications, and is convenient for application.

[0106] The prediction method of the present invention can be built into a computer-readable storage medium in the form of instructions, and the control method described in the above example is implemented when the instructions are executed. More specifically, the instructions can be a computer-readable language. The above computer can be a general-purpose computer device or a special-purpose computer device. In a specific implementation, the computer can be a desktop computer, a portable computer, a network server, a handheld computer, a mobile phone, a tablet computer, a wireless terminal device, a communication device or an embedded device. The storage medium can be any available medium that can be accessed by the computer or a data storage device such as a server or a data center that includes one or more available media. For example, the storage medium is, for example, but not limited to, a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a digital versatile disk), or a semiconductor medium (for example, a solid-state hard disk). The terminal of the above example can be a machine, a device, or an intelligent agent; the intelligent agent can refer to an instrument, a controller, a control system, etc. with automatic or semi-automatic control capabilities. The automatic control or semi-automatic control capability comes from a built-in control module, a storage medium carrying a control program, an instruction or an algorithm, etc.

[0107] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.

Claims

1. A method for predicting the use activity of urban parks, characterized in that: include: The environmental factor data and spatiotemporal characteristic data of the park to be tested are used as sample data; Divide the sample data into a first training set and a first test set in proportion; resample the first test set using the Bootstrap method to generate a second training set; Generate a corresponding decision tree based on the second training set, where before selecting an attribute on each non-leaf node, the decision tree randomly selects m attributes from all attributes as the split attribute set of the current node, and selects a split attribute from them as the node to split; Select sample parks and calculate the spatial weights of the sample parks relative to the park to be tested, and train a decision tree based on the spatial weights and the target loss function; The test set is trained using the trained decision tree, and the average of the training results is the predicted value of the usage activity of the park to be tested; The selecting of sample parks and calculating the spatial weights of the sample parks relative to the park to be tested, and training the decision tree based on the spatial weights and the target loss function include the following steps: Calculate the Euclidean distance h between the park to be tested and the sample park p,j , where p represents the park to be tested and j represents each sample park; The Euclidean distance h p,j Substitute into the establishment of the adjacency matrix based on the k-value nearest neighbor weight. For the k-value nearest neighbor space matrix, W pj is the interaction weight between the park to be tested p and the sample park j, and the calculation formula is: The weighted root mean square error function is used as the target loss function to train the decision tree: λ represents the segmentation attribute or factor for building a decision tree, v represents the segmentation point for building the corresponding attribute of the decision tree, and ρ left and ρ right Represents the sample park value set contained in the left child node and the right child node respectively, ρ a and ρ b Represents the sample values ​​in the left and right child node sets, N left and N right Represent the number of sample parks in the left child node and the right child node respectively.

2. The method for predicting the use activity of urban parks according to claim 1, characterized in that: The segmentation attribute is selected based on random noise, and the specific steps are as follows: in, Indicates the importance of attribute i; represents the out-of-bag data error, It means randomly adding noise interference to the attribute i of all samples out of the bag.

3. The method for predicting the use activity of urban parks according to claim 1, characterized in that: The average value of the training results is calculated based on the minimum variance principle, which specifically includes the following steps: For any partition feature F, the corresponding data sets D1 and D2 on both sides of any partition point S are divided. Find the feature and eigenvalue partition point that minimizes the sum of the mean square errors of D1 and D2 and the sum of the mean square errors of D1 and D2. The expression is: Among them, C1 is the sample output mean of the D1 data set, and C2 is the sample output mean of the D2 data set.

4. The method for predicting the use activity of urban parks according to claim 1, characterized in that: Select the coefficient of determination R 2 And mean square error MSE are indicators for model evaluation, including: Among them, y i is the actual value, For the model estimate, is the sample mean, and n is the number of samples.

5. The method for predicting the use activity of urban parks according to claim 1, characterized in that: Environmental factor data include park basic information data, park accessibility data and park facility data.

6. The method for predicting the use activity of urban parks according to claim 4, characterized in that: The basic park information data include the park area, the distance between the park and the city center; Park accessibility data include the distance from the park entrance to the nearest subway station, the area accessible by 15 minutes’ walk, the area accessible by 30 minutes’ walk, and the area accessible by 30 minutes’ drive; Park facility data includes the number of catering facilities in the park, the number of commercial facilities in the park, and the number of sports and leisure facilities in the park.

7. The method for predicting the use activity of urban parks according to claim 1, characterized in that ,The usage activity spatiotemporal characteristic data includes the user density type spatiotemporal characteristic data and the usage activity type spatiotemporal characteristic data of the ,park to be tested; The spatial-temporal characteristic data of user density types include the average number of users per hectare of land in the park under test on weekends and the average number of users per hectare of land in the park under test on weekdays; The spatiotemporal feature data using activity type include activity and stability.

8. A storage medium storing a plurality of programs, characterized in that: The program is used to be loaded and executed by a processor to implement a method for predicting the use activity of a city park as described in any one of claims 1 to 7.

9. A city park usage activity prediction terminal, comprising a processor, adapted to execute various programs, characterized in that: The program is loaded and executed by a processor to implement any one of the urban park usage activity prediction methods of claims 1 to 7.

Citation Information

Patent Citations

  • Traffic accident time-space hotspot discrimination method based on random forest theory

    CN113392885A

  • Urban homestay site selection optimization method and system, computer equipment and storage medium

    CN113393149A