CN116911903B - Method and device for analyzing automatic parameter adjustment of user model - Google Patents

Method and device for analyzing automatic parameter adjustment of user model Download PDF

Info

Publication number
CN116911903B
CN116911903B CN202311171313.9A CN202311171313A CN116911903B CN 116911903 B CN116911903 B CN 116911903B CN 202311171313 A CN202311171313 A CN 202311171313A CN 116911903 B CN116911903 B CN 116911903B
Authority
CN
China
Prior art keywords
crow
model
parameter
adjusted
tracked
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
Application number
CN202311171313.9A
Other languages
Chinese (zh)
Other versions
CN116911903A (en
Inventor
周应鹤
陈华栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Funo Mobile Communication Technology Co ltd
Original Assignee
Fujian Funo Mobile Communication Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Funo Mobile Communication Technology Co ltd filed Critical Fujian Funo Mobile Communication Technology Co ltd
Priority to CN202311171313.9A priority Critical patent/CN116911903B/en
Publication of CN116911903A publication Critical patent/CN116911903A/en
Application granted granted Critical
Publication of CN116911903B publication Critical patent/CN116911903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/10Machine learning using kernel methods, e.g. support vector machines [SVM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]

Abstract

The invention relates to a method and a device for automatically adjusting parameters of a model of an analysis user, wherein the method takes the number of parameters to be adjusted of the model of the analysis user to be adjusted as dimensions to construct a search space, all start values, end values and intermediate values of all parameters to be adjusted are combined in a full arrangement mode, the total number of the combination of the full arrangement mode is taken as the initial number of the crow of a CSA algorithm, vector coordinates of each group of combination are taken as the initial position of the crow to initialize the CSA algorithm, the crow is evenly and discretely distributed in the search space, and the parameters to be adjusted are automatically adjusted, so that the adjusted parameter model is obtained to analyze the user. Therefore, the method and the device uniformly and discretely distribute the crow in the search space, avoid the premature sinking into the local optimal solution when optimizing the parameters to be adjusted, consider all parameter combinations, ensure the more comprehensive search range in the crow iterative search process, and improve the accuracy of automatic parameter adjustment of the model, thereby improving the accuracy of user analysis.

Description

Method and device for analyzing automatic parameter adjustment of user model
Technical Field
The invention relates to the technical field of communication, in particular to a method and a device for automatically adjusting parameters of a model of an analysis user.
Background
In the communication field, a basic operator has a huge number of user groups, in order to avoid wasting resources and excessively disturbing users, service promotion or customer maintenance is generally required to be carried out on a target user group meeting a certain specific condition, along with development of information technology, the delineation of the target user is gradually changed from manual definition to the analysis of big data by using a model, historical service use condition and consumption preference of the user are analyzed by the model, so that various package contents are made to meet different refined consumption groups, parameter adjustment of the model is an essential important link, and efficient automatic parameter adjustment of the model is rapid in analysis of the user, thereby carrying out precondition and guarantee of market promotion.
At present, automatic adjustment of model parameters mainly simulates cooperation and competition behaviors in a crow group through a CSA (Crow Search Algorithm, crow search) algorithm to find an optimal solution or approximate optimal solution for automatic parameter adjustment, but when the method is used for initializing the group, distribution of crow positions is randomly carried out, so that the crow group is easily concentrated in a certain part of a search space, a result obtained is not a globally optimal solution and is easily trapped in a locally optimal solution, the crow position distribution affects the crow search iteration process, the conditions of low search precision, slow convergence speed and small search range are easily caused, the accuracy of model parameter adjustment is affected, and finally the accuracy of user analysis is low.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: the invention provides a method and a device for automatically adjusting parameters of a model of an analysis user, which improve the accuracy of the analysis of the user.
In order to solve the technical problems, the invention adopts the following technical scheme:
in a first aspect, the present invention provides a method for analyzing automatic model parameters of a user, including:
acquiring a parameter to be adjusted model of an analysis user;
acquiring parameters to be adjusted of the parameter to be adjusted model, and constructing a search space by taking the number of the parameters to be adjusted as dimensions;
acquiring a start value, a termination value and a step length of each parameter to be adjusted, selecting an intermediate value every other step length in the range of the start value and the termination value, and performing full permutation and combination on the start value, the termination value and the intermediate value of all the parameters to be adjusted to obtain the total number of combinations of the full permutation and combination and the coordinate vector of each group of combinations;
initializing the CSA algorithm by taking the total number of combinations as the initial number of the crow in the CSA algorithm and the coordinate vector as the initial position of the crow to obtain an improved CSA algorithm, and optimizing all parameters to be adjusted by uniformly and discretely distributing the crow in the search space based on the improved CSA algorithm to obtain an optimal parameter combination;
and automatically adjusting parameters to be adjusted based on the optimal parameter combination to obtain an adjusted parameter model, and analyzing a user according to the adjusted parameter model to obtain an analysis result.
The invention has the beneficial effects that: the method comprises the steps of carrying out full-permutation combination on a start value, a termination value and an intermediate value of each parameter to be adjusted of an analysis user to obtain a total combination number and coordinate vectors of each combination, taking the total combination number as the initial quantity of the crow in a CSA algorithm, and taking the coordinate vectors as the initial positions of the crow, so that the initial positions of the crow are more in line with the actual condition of the parameter to be adjusted, and all parameter combinations are taken into consideration, the search range of the obtained improved CSA algorithm in the crow iterative search process is ensured to be more comprehensive, crow is uniformly and discretely distributed in a search space, premature sinking into local optimal solution when optimizing the parameter to be adjusted is avoided, the accuracy of automatic model parameter adjustment is improved, and further the user analysis accuracy is improved through the adjusted parameter model.
Optionally, the using the total combined number as the initial number of the crow in the CSA algorithm, and the coordinate vector as the initial position of the crow initializes the CSA algorithm, so as to obtain an improved CSA algorithm, which includes:
initializing the population perception probability of the crow population according to the population preset value in the perception probability range;
and randomly initializing individual perception probability of each crow in the crow group in a perception probability range.
According to the description, the population sensing probability of the crow population and the individual sensing probability of each crow are both in the range of the sensing probability, so that the rationality and objectivity of the crow iterative search process are ensured, the population sensing probability is set according to the preset value of the population, the flexibility of the population sensing probability is ensured, the individual sensing probability of the crow is randomly generated, and the randomness and unpredictability of the individual sensing probability are ensured.
Optionally, the optimizing all parameters to be adjusted based on the improved CSA algorithm to uniformly and discretely distribute the crow in the search space includes:
traversing all the crows, randomly selecting one crow as a tracked crow, and tracking the tracked crow through the tracked crow based on the improved CSA algorithm;
when the individual perception probability of the tracked crow is larger than the population perception probability of the tracked crow, the tracked crow randomly generates a false food position and transmits the false food position to the tracked crow, and the tracked crow moves to the false food position and updates the current position of the tracked crow;
when the individual perception probability of the tracked crow is smaller than or equal to the population perception probability of the tracked crow, the tracked crow acquires the actual food position of the most tracked crow;
acquiring the current position of the tracking crow, adaptively evaluating the actual food position and the current position, if the evaluation result of the current position is higher than the evaluation result of the actual food position, the tracking crow does not move to the actual food position, otherwise, the tracking crow moves to the actual food position and updates the current position of the tracking crow;
repeating iteration of all the crow to track until a preset condition is reached, stopping tracking, obtaining parameter combinations corresponding to the current positions with the maximum crow number, and taking the parameter combinations as optimal parameter combinations.
According to the description, when the individual perception probability of the tracked crow is smaller than or equal to the population perception probability of the tracked crow, namely the tracked crow is not found to be tracked by the tracked crow, at the moment, the tracked crow carries out adaptive evaluation on the current position and the actual food position of the tracked crow, and moves only when the evaluation result of the actual food position is higher than the evaluation result of the current position, the difference is that the traditional CSA algorithm carries out movement first and then carries out evaluation, namely the comparison logic of global search is increased, the search distance is enlarged, and the movement of the crow is promoted to keep the global optimum to avoid the local optimum.
Optionally, the tracking the tracked crow through the tracking crow based on the modified CSA algorithm includes:
obtaining a step length of a parameter to be adjusted corresponding to each dimension in the search space, taking the step length as a single maximum movement distance of the crow in the dimension, taking the single maximum movement distance as a constraint condition of the crow movement, and tracking the tracked crow through the tracking crow under the condition that the constraint condition is met based on the improved CSA algorithm.
According to the description, the single maximum movement distance of the crow in different dimensions is different, and the step length of the parameter to be adjusted corresponding to the dimension is used as the constraint condition of the crow movement, so that the comprehensiveness and the accuracy of the crow iterative search process are ensured.
Optionally, repeatedly iterating all the crows to track until reaching a preset condition to stop tracking includes:
repeating iteration of all the crow to track, and stopping tracking when the iteration number reaches a frequency threshold;
or repeatedly iterating all the crows to track, and stopping tracking when the current positions of all the crows are the same;
or repeatedly iterating all the crows to track, and stopping tracking when the current position of one of the crows reaches a preset position.
According to the description, when the iteration times reach the time threshold, the tracking is stopped, the comprehensiveness of the crow iteration is ensured, and when the current positions of all the crows are the same or a certain crow position reaches a preset position, the tracking is stopped, and the efficiency of the crow iteration searching process is improved.
Optionally, the obtaining the current position of the tracking crow, and the adaptively evaluating the actual food position and the current position includes:
and acquiring a current parameter combination of the current position and an actual parameter combination of the actual food position, respectively inputting the current parameter combination and the actual parameter combination into a fitness function to carry out fitness evaluation, and taking the accuracy as an evaluation result of the fitness evaluation.
From the above description, it is known that the accuracy is used as the evaluation result of the adaptability evaluation, so that the crow is guided to move to the position where the accuracy is high.
Optionally, the parameter to be adjusted model comprises a decision tree model, a support vector machine model and a random forest algorithm model.
From the above description, the model to be tuned includes decision tree model, support vector machine model and random forest algorithm model, so that tuning of a plurality of different models is supported.
Optionally, the number of times threshold is 1000.
According to the description, the frequency threshold is set to 1000, so that the sufficiency of the frequency of the iterative search of the crow is ensured.
Optionally, the range of perception probabilities is [0,1], and the population perception probability is 0.65.
According to the description, the range of the sensing probability is [0,1], and the closer the population sensing probability is to 1, the more frequent the global movement of the crow is, the more beneficial to the adjustment in the global range, and the population sensing probability is set to 0.65, so that the frequency of the global movement of the crow is ensured, and the efficiency of iterative search is also ensured.
In a second aspect, an apparatus for analyzing model auto-tuning of a user is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing a method for analyzing model auto-tuning of a user according to the first aspect when the computer program is executed.
The second aspect provides a device for analyzing automatic model parameter tuning of a user, and the corresponding technical effects refer to the related description of the method for analyzing automatic model parameter tuning of the user provided by the first aspect.
Drawings
FIG. 1 is a flowchart of a method for analyzing model auto-tuning of a user according to an embodiment of the present invention;
FIG. 2 is a schematic overall flow chart of a method for analyzing automatic parameter adjustment of a user model according to an embodiment of the present invention;
fig. 3 is a schematic view of a range of a conventional CSA algorithm crow iterative search according to an embodiment of the present invention;
fig. 4 is a schematic view of a range of the improved CSA algorithm crow iterative search according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device for analyzing automatic parameter adjustment of a user model according to an embodiment of the present invention.
Reference numerals illustrate:
1. an automatic parameter adjusting device for analyzing a model of a user;
2. a processor;
3. a memory.
Detailed Description
In order that the above-described aspects may be better understood, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Example 1
The method and the device are suitable for application scenes in which big data are analyzed by using the model, particularly suitable for application scenes in which the big data of a user are analyzed by using the parameter automatic adjustment of the model, the parameter automatic adjustment of the model plays a vital role in the result of the user analysis, and at present, the parameter of the model is automatically adjusted mainly by simulating cooperation and competition behaviors of a crow group through a CSA algorithm, but when the group is initialized, the distribution of the crow positions is randomly carried out by the CSA algorithm, so that the conditions of low searching precision, slow convergence speed and small searching range are easy to occur in the searching iterative process of the crow, the parameter adjustment accuracy of the model is influenced, and finally the user analysis accuracy is low.
Referring to fig. 1 to 4, the present invention provides a method for analyzing automatic model parameter adjustment of a user, comprising the steps of:
s1: acquiring a parameter to be adjusted model of an analysis user;
in this embodiment, the model to be tuned includes, but is not limited to, a decision tree model, a support vector machine model, and a random forest algorithm model.
S2, obtaining parameters to be adjusted of the parameter to be adjusted model, and constructing a search space by taking the number of the parameters to be adjusted as dimensions;
in this embodiment, when the parameter to be tuned model is a decision tree model, the parameters to be tuned include, but are not limited to: criterion (calculation method of the non-purity), max_depth (maximum depth of tree), min_samples_split (minimum sample size required for branching), and min_samples_leaf (minimum sample size required for one leaf node to exist); when the model to be tuned is a support vector machine model, the parameters to be tuned include, but are not limited to: kernel and C (penalty coefficients for relaxation coefficients); when the model to be tuned is a random forest algorithm model, parameters to be tuned include, but are not limited to: criterion (calculation method of no purity), max_features (maximum feature number used by a single tree), max_depth (maximum depth of tree), min_samples_split (minimum sample size required for branching), min_samples_leaf (minimum sample size required for one leaf node to exist), and random_state (random number seed of random forest to data set division), and the number of parameters to be tuned of the parameter model to be tuned is taken as the dimension of the search space, such as: the parameter to be adjusted model is a decision tree model, and 4 parameters to be adjusted are 4, so that a 4-dimensional search space is constructed.
S3, acquiring a start value, a termination value and a step length of each parameter to be adjusted, selecting an intermediate value every other step length in the range of the start value and the termination value, and performing full permutation and combination on the start value, the termination value and the intermediate value of all the parameters to be adjusted to obtain the total number of combinations and the coordinate vector of each group of combinations;
in this embodiment, as shown in fig. 2, in the range of the start value and the end value of each parameter to be adjusted, an intermediate value is selected every other step, for example, the start value of the parameter to be adjusted max_depth (the maximum depth of the tree) is 0, the end value is 5, the step is 1, and the intermediate value is: 1.2, 3 and 4, and taking the condition that the parameter to be adjusted is a discrete value into consideration, when the parameter to be adjusted is the discrete value, directly taking the numerical value of the discrete value, if the parameter to be adjusted is the discrete value 0 or 1, directly taking the numerical values of the parameter to be adjusted as 0 and 1.
S4, initializing the CSA algorithm by taking the total number of combinations as the initial number of the crow in the CSA algorithm and taking the coordinate vector as the initial position of the crow to obtain an improved CSA algorithm, and optimizing all parameters to be adjusted by uniformly and discretely distributing the crow in the search space based on the improved CSA algorithm to obtain an optimal parameter combination;
in this embodiment, as shown in fig. 2, the total number of combinations obtained in step S2 is used as the initial number of crows in the CSA algorithm, and the coordinate vector of each group of combinations is used as the initial position of crows in the CSA algorithm and is also used as the initial position of food, so as to obtain an improved CSA algorithm, thereby uniformly and discretely distributing crows in the search space.
In a specific embodiment, the parameters to be adjusted are x and y, x is equal to or greater than 0 and equal to or less than 10, y is equal to or less than 0 and equal to or less than 10, the initial number of the crow is 10, 10 crows are randomly distributed in the search space by the traditional CSA algorithm, as shown in fig. 3, the range of the iterative search of the crow by the traditional CSA algorithm is the circle formed by the line segments in the graph, so that the search range is smaller, and 10 crows are evenly and discretely distributed in the search space by the improved CSA algorithm, as shown in fig. 4, the range of the iterative search of the crow by the improved CSA algorithm is the circle formed by the line segments in the graph, so that the search range is enlarged, and the locality of the iterative search of the crow is avoided.
At this time, in step S4, the total number of combinations is used as the initial number of crow in the CSA algorithm, the coordinate vector is used as the initial position of crow to initialize the CSA algorithm, and the improved CSA algorithm includes:
s41, initializing the population perception probability of the crow population according to a population preset value in the perception probability range;
s42, randomly initializing individual perception probability of each crow in the crow group in a perception probability range.
In this embodiment, the range of the sensing probability is [0,1], the preset population value is 0.65, that is, the sensing probability of the population is 0.65, and the individual sensing probability of each crow is randomly generated within the range of [0,1], that is, the individual sensing probability e [0,1], wherein the preset population value can be adjusted according to practical situations.
At this time, in step S4, the performing optimization on all the parameters to be adjusted by uniformly and discretely distributing the crow in the search space based on the improved CSA algorithm includes:
s43, traversing all the crows, randomly selecting one crow as a tracked crow, and tracking the tracked crow through the tracked crow based on the improved CSA algorithm;
at this time, the tracking the tracked crow by the tracking crow based on the modified CSA algorithm in step S43 includes:
s431, obtaining a step length of a parameter to be adjusted corresponding to each dimension in the search space, taking the step length as a single maximum movement distance of the crow in the dimension, taking the single maximum movement distance as a constraint condition of the crow movement, and tracking the tracked crow through the tracking crow under the condition that the constraint condition is met based on the improved CSA algorithm.
In this embodiment, as shown in fig. 2, the single maximum movement distances of the crow in different dimensions in the search space are different, and the single maximum movement distances of the crow in corresponding dimensions are set according to the step sizes of the corresponding parameters to be adjusted.
In a specific embodiment, the parameter to be adjusted corresponding to the dimension where the crow is located in the search space is max_depth (maximum depth of tree), where the start value of max_depth (maximum depth of tree) is 3, the end value is 10, the step size is 1, that is, the single maximum movement distance is 1, and the value after each movement is: 3. 4, 5, 6, 7, 8, 9, 10.
S44, when the individual perception probability of the tracked crow is larger than the population perception probability of the tracked crow, randomly generating false food positions by the tracked crow and transmitting the false food positions to the tracked crow, and moving the tracked crow to the false food positions and updating the current positions of the tracked crow;
in this embodiment, as shown in fig. 2, when the individual perception probability of the tracked crow > the population perception probability of the tracked crow, the tracked crow can find that the tracked crow is tracking itself, so that a position is randomly generated as a false food position and transmitted to the tracked crow.
S45, when the individual perception probability of the tracked crow is smaller than or equal to the population perception probability of the tracked crow, the tracked crow acquires the actual food position of the most tracked crow;
s46, acquiring the current position of the tracking crow, adaptively evaluating the actual food position and the current position, if the evaluation result of the current position is higher than the evaluation result of the actual food position, the tracking crow does not move to the actual food position, otherwise, the tracking crow moves to the actual food position and updates the current position of the tracking crow;
in this embodiment, as shown in fig. 2, when the individual perception probability of the tracked crow is less than or equal to the population perception probability of the tracked crow, the tracked crow cannot find that the tracked crow is being tracked, so that the tracked crow can obtain the actual food position of the tracked crow, at this time, the tracked crow does not move, the actual food position and the current position are adaptively evaluated, if the evaluation result of the actual food position is higher than the evaluation result of the current position, the tracked crow moves to the actual food position, and meanwhile the actual food position is used as the current position after the tracked crow moves to update the current position, otherwise, the tracked crow does not move.
At this time, in step S46, the obtaining the current position of the tracking crow, and performing the adaptive evaluation on the actual food position and the current position includes:
s461, acquiring a current parameter combination of the current position and an actual parameter combination of the actual food position, and respectively inputting the current parameter combination and the actual parameter combination into a fitness function to carry out fitness evaluation, wherein the accuracy is used as an evaluation result of the fitness evaluation.
In this embodiment, the current parameter combination of the current position and the actual parameter combination of the actual food position are respectively input into the Fitness Function, and the accuracy is used as the evaluation result of the Fitness evaluation of the Fitness Function.
S47, repeatedly iterating all the crow to track until a preset condition is reached, stopping tracking, obtaining parameter combinations corresponding to the current positions with the maximum crow number, and taking the parameter combinations as optimal parameter combinations.
At this time, the repeatedly iterating all the crows to trace in step S47 until reaching the preset condition includes:
s471, repeatedly iterating all the crow to track, and stopping tracking when the iteration times reach the time threshold;
in this embodiment, the number of times threshold is 1000, that is, when the number of iterations reaches 1000 times, tracking is stopped, where the number of times threshold may be adjusted according to the actual situation.
S472, or repeatedly iterating all the crows to track, and stopping tracking when the current positions of all the crows are the same;
s473, or repeatedly iterating all the crows to track, and stopping tracking when the current position of one of the crows reaches the preset position.
And S5, automatically adjusting parameters to be adjusted based on the optimal parameter combination to obtain an adjusted parameter model, and analyzing a user according to the adjusted parameter model to obtain an analysis result.
In this embodiment, the parameter to be adjusted is automatically adjusted by using the coordinate values corresponding to the optimal parameter combination, so as to obtain an adjusted parameter model, and the user is analyzed by the adjusted parameter model to obtain an analysis result, where the analysis result includes consumption preferences of the user such as: conversation consumption preference, flow consumption preference, short message consumption preference and the like, so that the consumption preference of the user is known according to the analysis result, package content conforming to the user is customized, and consumption needs of different users are met.
Comparing the parameter tuning result of the parameter to be tuned of the traditional CSA algorithm with the parameter tuning result of the parameter to be tuned of the improved CSA algorithm, as shown in tables 1-3, wherein table 1 is the parameter tuning result of the decision tree model, as can be seen from table 1, the parameter tuning result is 8 in the traditional CSA algorithm, the parameter tuning result is 11 in the improved CSA algorithm, the max_depth (the maximum depth of the tree) obtained by the improved CSA algorithm is larger than that of the traditional CSA algorithm, when the decision tree model is under-fitted, the value is increased, so that the max_depth (the maximum depth of the tree) obtained by the improved CSA algorithm is better than that of the traditional CSA algorithm, the min_samples_split (the minimum sample size required by the branches) is 7 in the traditional CSA algorithm, the parameter tuning result is 13 in the improved CSA algorithm, the min_samples (the minimum sample size required by a leaf node), the max_depth (the maximum sample size required by the leaf node) obtained by the improved CSA algorithm is 9 in the traditional CSA algorithm, the maximum sample size required by the improved CSA algorithm is calculated when the leaf_split (the best sample size required by the traditional CSA algorithm) is more than that of the traditional CSA model is required by the leaf_split, and the best sample size required by the improved CSA algorithm is calculated when the best-fit of the improved CSA algorithm is calculated, and the best sample size is calculated compared with the best sample size required by the best-fit of the improved model is calculated.
TABLE 1 parameter tuning results comparison Table for decision Tree model
Parameters to be adjusted Range (parameter adjusting Range) Parameter tuning of traditional CSA algorithm Results Parameter adjusting method of improved CSA algorithm Results
Criterion (calculation method of non-purity) ['entropy', 'gini'] Gini (coefficient of keni) Entropy (information gain)
max_depth (maximum depth of tree) range(3,16) 8 11
min_samples_split (minimum sample size required for branching) range(2,15) 7 13
min_samples_leaf (there is a leaf node that has the most needed Small sample size range(2,15) 9 10
Table 2 is a comparison table of the tuning results of the support vector machine model, and it is known from Table 2 that C (penalty factor of the relaxation factor) is 1005 in the conventional CSA algorithm, 1010 in the modified CSA algorithm, and the modified CSA algorithm is larger than the conventional CSA algorithm in terms of the tuning result, and the larger C (penalty factor of the relaxation factor) is, the smaller the experience risk is, so that the modified CSA algorithm is superior to the conventional CSA algorithm in terms of the tuning result.
TABLE 2 parameter tuning results comparison Table for support vector machine model
Parameters to be adjusted range (parameter adjusting range) Traditional CSA algorithm Parameter adjusting result Improved CSA algorithm Parameter adjusting result
Kernel (Kernel function) [ 'linear' (linear kernel), 'poly' (polynomial kernel), 'sigmoid' (S-type growth curve) Line), 'rbf' (gaussian radial basis kernel)] rbf rbf
C (punishment of relaxation coefficient) Penalty term coefficient range(1,2000,10) 1005 1010
Table 3 is a comparison table of the tuning results of the random forest algorithm model, and as can be seen from Table 3, the tuning result is 9 in the conventional CSA algorithm, the tuning result is 13 in the modified CSA algorithm, the max_features (the maximum features used by the single tree) obtained by the modified CSA algorithm is greater than the conventional CSA algorithm, when the random forest algorithm model is not fit, the value needs to be increased, the min_samples_leaf (the minimum sample size needed by one leaf node) is needed to be increased, the tuning result is 6 in the conventional CSA algorithm, the tuning result is 2 in the modified CSA algorithm, the min_samples_leaf (the minimum sample size needed by one leaf node) obtained by the modified CSA algorithm is smaller than the conventional CSA algorithm, and when the random forest algorithm model is fit, the optimal tuning combination calculated by the modified CSA needs to be reduced, so that the fitting of the conventional CSA algorithm to the random forest algorithm model is avoided more effectively than the random forest algorithm model.
TABLE 3 parameter tuning results comparison table of random forest algorithm model
The model effects of the model to be called after the traditional CSA algorithm is used for tuning and after the improved CSA algorithm is used for tuning are compared, as shown in tables 4-6, table 4 is a decision tree model effect comparison table, as can be seen from table 4, when the accuracy of the support vector machine model before the tuning is 75.16, the recall rate is 78.16, F1 is 75.79, the AUC is 74.17, the accuracy after the traditional CSA algorithm is used for tuning is 75.96, the recall rate is 79.24, F1 is 76.63, the AUC is 75.98, the accuracy after the improved CSA algorithm is used for tuning is 75.99, the recall rate is 77.19, F1 is 76.18, and the AUC is 76.00, when the decision tree model is evaluated by the accuracy and the preset accuracy is 75.95, the optimal parameter combination is calculated for tuning the decision tree model by using the traditional CSA algorithm, the improved CSA algorithm is only needs to be calculated for 430 times, the improved CSA algorithm is used for 328 times, the improved CSA algorithm is used for improving the accuracy after the improved CSA algorithm is used for tuning the traditional CSA algorithm.
TABLE 4 comparison of model effects before and after parameter adjustment for decision Tree model
Table 5 is a comparison table of model effects before and after tuning of the support vector machine model, as shown in table 5, the accuracy of the support vector machine model before tuning is 74.48, the recall rate is 79.93, F1 is 75.7, auc is 74.5, after tuning by using the conventional CSA algorithm, the accuracy is 74.48, the recall rate is 79.93, F1 is 75.7, auc is 74.5, after tuning by using the improved CSA algorithm, the accuracy is 75.99, the recall rate is 77.19, F1 is 76.18, and auc is 76.00, when the support vector machine model is evaluated by the accuracy and the preset accuracy is 74.48, the optimal parameter combination is calculated by using the conventional CSA algorithm, 643 times the improved CSA algorithm only needs to be calculated for 167 times, the improved CSA algorithm is improved in convergence speed, and the accuracy of the model after tuning the support vector machine model by using the improved CSA algorithm is higher than that of the conventional CSA algorithm.
TABLE 5 comparison table of model effects before and after model parameter adjustment of support vector machine
Table 6 is a comparison table of model effects before and after the random forest algorithm model is called, as shown in table 6, the accuracy of the random forest algorithm model before the parameter adjustment is 76.33, the recall rate is 75.83, F1 is 70.01, auc is 70.73, after the parameter adjustment by using the conventional CSA algorithm, the accuracy is 80.46, the recall rate is 84.1, F1 is 81.07, auc is 80.48, after the parameter adjustment by using the improved CSA algorithm, the accuracy is 81.26, the recall rate is 84.95, F1 is 81.75, auc is 81.45, when the random forest algorithm model is evaluated by the accuracy and the preset accuracy is 80.45, the optimal parameter combination is calculated by using the conventional CSA algorithm to calculate 2765 times for the parameter adjustment of the random forest algorithm model, the improved CSA algorithm only needs to calculate 213 times, the improved CSA algorithm is improved in convergence speed, and the accuracy of the model after the parameter adjustment by using the improved CSA algorithm is higher than that of the conventional CSA algorithm.
TABLE 6 comparison of model effects of random forest algorithm model before and after parameter adjustment
Example two
Referring to fig. 5, an apparatus 1 for analyzing model auto-tuning of a user includes a memory 3, a processor 2, and a computer program stored in the memory 3 and executable on the processor 2, wherein the processor 2 implements the steps of the first embodiment when executing the computer program.
Since the system/device described in the foregoing embodiments of the present invention is a system/device used for implementing the method of the foregoing embodiments of the present invention, those skilled in the art will be able to understand the specific structure and modification of the system/device based on the method of the foregoing embodiments of the present invention, and thus will not be described in detail herein. All systems/devices used in the methods of the above embodiments of the present invention are within the scope of the present invention.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the terms first, second, third, etc. are for convenience of description only and do not denote any order. These terms may be understood as part of the component name.
Furthermore, it should be noted that in the description of the present specification, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to a specific feature, structure, material, or characteristic described in connection with the embodiment or example being included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art upon learning the basic inventive concepts. Therefore, the appended claims should be construed to include preferred embodiments and all such variations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, the present invention should also include such modifications and variations provided that they come within the scope of the following claims and their equivalents.

Claims (8)

1. A method for analyzing automatic parameter tuning of a model of a user, comprising:
acquiring a parameter to be adjusted model of an analysis user;
acquiring parameters to be adjusted of the parameter to be adjusted model, and constructing a search space by taking the number of the parameters to be adjusted as dimensions;
acquiring a start value, a termination value and a step length of each parameter to be adjusted, selecting an intermediate value every other step length in the range of the start value and the termination value, and performing full permutation and combination on the start value, the termination value and the intermediate value of all the parameters to be adjusted to obtain the total number of combinations and the coordinate vector of each group of combinations;
initializing the CSA algorithm by taking the total number of combinations as the initial number of the crow in the CSA algorithm and the coordinate vector as the initial position of the crow to obtain an improved CSA algorithm, and optimizing all parameters to be adjusted by uniformly and discretely distributing the crow in the search space based on the improved CSA algorithm to obtain an optimal parameter combination;
automatically adjusting parameters to be adjusted based on the optimal parameter combination to obtain an adjusted parameter model, and analyzing a user according to the adjusted parameter model to obtain an analysis result;
the combined total number is used as the initial number of the crow in the CSA algorithm, the coordinate vector is used as the initial position of the crow to initialize the CSA algorithm, and the improved CSA algorithm comprises:
initializing the population perception probability of the crow population according to the population preset value in the perception probability range;
randomly initializing individual perception probability of each crow in the crow population in a perception probability range;
the optimizing all parameters to be adjusted based on the improved CSA algorithm to uniformly and discretely distribute the crow in the search space comprises the following steps:
traversing all the crows, randomly selecting one crow as a tracked crow, and tracking the tracked crow through the tracked crow based on the improved CSA algorithm;
when the individual perception probability of the tracked crow is larger than the population perception probability of the tracked crow, the tracked crow randomly generates a false food position and transmits the false food position to the tracked crow, and the tracked crow moves to the false food position and updates the current position of the tracked crow;
when the individual perception probability of the tracked crow is smaller than or equal to the population perception probability of the tracked crow, the tracked crow acquires the actual food position of the tracked crow;
acquiring the current position of the tracking crow, adaptively evaluating the actual food position and the current position, if the evaluation result of the current position is higher than the evaluation result of the actual food position, the tracking crow does not move to the actual food position, otherwise, the tracking crow moves to the actual food position and updates the current position of the tracking crow;
repeating iteration of all the crow to track until a preset condition is reached, stopping tracking, obtaining parameter combinations corresponding to the current positions with the maximum crow number, and taking the parameter combinations as optimal parameter combinations.
2. The method of claim 1, wherein the tracking the tracked crow through the tracking crow based on the modified CSA algorithm comprises:
obtaining a step length of a parameter to be adjusted corresponding to each dimension in the search space, taking the step length as a single maximum movement distance of the crow in the dimension, taking the single maximum movement distance as a constraint condition of the crow movement, and tracking the tracked crow through the tracking crow under the condition that the constraint condition is met based on the improved CSA algorithm.
3. The method of claim 1, wherein repeatedly iterating all the crows to trace until reaching a preset condition comprises:
repeating iteration of all the crow to track, and stopping tracking when the iteration number reaches a frequency threshold;
or repeatedly iterating all the crows to track, and stopping tracking when the current positions of all the crows are the same;
or repeatedly iterating all the crows to track, and stopping tracking when the current position of one of the crows reaches a preset position.
4. The method of claim 1, wherein the obtaining the current location of the tracking crow, and the adaptively evaluating the actual food location and the current location comprises:
and acquiring a current parameter combination of the current position and an actual parameter combination of the actual food position, respectively inputting the current parameter combination and the actual parameter combination into a fitness function to carry out fitness evaluation, and taking the accuracy as an evaluation result of the fitness evaluation.
5. The method for analyzing automatic parameter tuning of a model of a user according to claim 1, wherein the model to be tuned comprises a decision tree model, a support vector machine model and a random forest algorithm model.
6. A method of analyzing model auto-tuning of a user according to claim 3 in which the threshold number of times is 1000.
7. The method of claim 1, wherein the range of perceptual probabilities is 0,1 and the population perceptual probability is 0.65.
8. An apparatus for analysing automatic model referencing of a user, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method according to any of claims 1 to 7 when executing the computer program.
CN202311171313.9A 2023-09-12 2023-09-12 Method and device for analyzing automatic parameter adjustment of user model Active CN116911903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311171313.9A CN116911903B (en) 2023-09-12 2023-09-12 Method and device for analyzing automatic parameter adjustment of user model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311171313.9A CN116911903B (en) 2023-09-12 2023-09-12 Method and device for analyzing automatic parameter adjustment of user model

Publications (2)

Publication Number Publication Date
CN116911903A CN116911903A (en) 2023-10-20
CN116911903B true CN116911903B (en) 2023-12-22

Family

ID=88363349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311171313.9A Active CN116911903B (en) 2023-09-12 2023-09-12 Method and device for analyzing automatic parameter adjustment of user model

Country Status (1)

Country Link
CN (1) CN116911903B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109507891A (en) * 2019-01-21 2019-03-22 闽江学院 A kind of Semi-active fuzzy control method
CN113221051A (en) * 2021-05-21 2021-08-06 天津大学 Web service combination optimization method based on improved crow search algorithm
CN114511021A (en) * 2022-01-27 2022-05-17 浙江树人学院(浙江树人大学) Extreme learning machine classification algorithm based on improved crow search algorithm
CN114707930A (en) * 2022-03-31 2022-07-05 红云红河烟草(集团)有限责任公司 Cigarette finished product intelligent park management and control method based on sorting line model
CN114976129A (en) * 2022-05-13 2022-08-30 南京工业大学 Application of novel crow search algorithm in proton exchange membrane fuel cell model parameter identification
CN116668151A (en) * 2023-06-19 2023-08-29 南京信息工程大学 Network intrusion detection method and device based on improved CSA optimization SVM

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220051627A (en) * 2020-10-19 2022-04-26 세종대학교산학협력단 Method and apparatus for automatic design of artificial neural network structure based on crow search algorithm

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109507891A (en) * 2019-01-21 2019-03-22 闽江学院 A kind of Semi-active fuzzy control method
CN113221051A (en) * 2021-05-21 2021-08-06 天津大学 Web service combination optimization method based on improved crow search algorithm
CN114511021A (en) * 2022-01-27 2022-05-17 浙江树人学院(浙江树人大学) Extreme learning machine classification algorithm based on improved crow search algorithm
CN114707930A (en) * 2022-03-31 2022-07-05 红云红河烟草(集团)有限责任公司 Cigarette finished product intelligent park management and control method based on sorting line model
CN114976129A (en) * 2022-05-13 2022-08-30 南京工业大学 Application of novel crow search algorithm in proton exchange membrane fuel cell model parameter identification
CN116668151A (en) * 2023-06-19 2023-08-29 南京信息工程大学 Network intrusion detection method and device based on improved CSA optimization SVM

Also Published As

Publication number Publication date
CN116911903A (en) 2023-10-20

Similar Documents

Publication Publication Date Title
CN109408731B (en) Multi-target recommendation method, multi-target recommendation model generation method and device
CN107423442B (en) Application recommendation method and system based on user portrait behavior analysis, storage medium and computer equipment
Guez et al. Learning to search with mctsnets
CN111104595B (en) Deep reinforcement learning interactive recommendation method and system based on text information
CN112905648B (en) Multi-target recommendation method and system based on multi-task learning
CN113485144B (en) Intelligent home control method and system based on Internet of things
CN111967971B (en) Bank customer data processing method and device
CN112488283A (en) Improved multi-target grey wolf optimization algorithm
CN111105045A (en) Method for constructing prediction model based on improved locust optimization algorithm
US20220129747A1 (en) System and method for deep customized neural networks for time series forecasting
CN113536105A (en) Recommendation model training method and device
CN111639695B (en) Method and system for classifying data based on improved drosophila optimization algorithm
CN111079074A (en) Method for constructing prediction model based on improved sine and cosine algorithm
CN112950276A (en) Seed population expansion method based on multi-order feature combination
CN111310918B (en) Data processing method, device, computer equipment and storage medium
CN116911903B (en) Method and device for analyzing automatic parameter adjustment of user model
CN110738362A (en) method for constructing prediction model based on improved multivariate cosmic algorithm
Nguyen et al. Online learning-based clustering approach for news recommendation systems
EP3617816B1 (en) Modeling and decision support for horticulture
Amaldi et al. Randomized relaxation methods for the maximum feasible subsystem problem
US20230209367A1 (en) Telecommunications network predictions based on machine learning using aggregated network key performance indicators
CN113360772B (en) Interpretable recommendation model training method and device
US20220083913A1 (en) Learning apparatus, learning method, and a non-transitory computer-readable storage medium
CN111221741B (en) Method for automatically generating abnormal unit test based on genetic algorithm and log analysis
CN114254615A (en) Volume assembling method and device, electronic equipment and storage 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