CN112115969A - Method and device for optimizing FKNN model parameters based on variant goblet sea squirt group algorithm - Google Patents

Method and device for optimizing FKNN model parameters based on variant goblet sea squirt group algorithm Download PDF

Info

Publication number
CN112115969A
CN112115969A CN202010803746.1A CN202010803746A CN112115969A CN 112115969 A CN112115969 A CN 112115969A CN 202010803746 A CN202010803746 A CN 202010803746A CN 112115969 A CN112115969 A CN 112115969A
Authority
CN
China
Prior art keywords
goblet
ith
fknn
sea squirt
optimizing
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.)
Granted
Application number
CN202010803746.1A
Other languages
Chinese (zh)
Other versions
CN112115969B (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.)
Wenzhou University
Original Assignee
Wenzhou University
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 Wenzhou University filed Critical Wenzhou University
Priority to CN202010803746.1A priority Critical patent/CN112115969B/en
Publication of CN112115969A publication Critical patent/CN112115969A/en
Application granted granted Critical
Publication of CN112115969B publication Critical patent/CN112115969B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24147Distances to closest patterns, e.g. nearest neighbour classification
    • 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]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computational Linguistics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a method for optimizing Fuzzy K Nearest Neighbor (FKNN) model parameters based on a variant goblet sea squirt group algorithm, which comprises the steps of obtaining sample data and carrying out normalization processing on the obtained sample data; optimizing a parameter k, m of the FKNN by utilizing an integrated variant goblet sea squirt group algorithm of a preset restart mechanism; and optimizing the FKNN model by using the optimal neighbor number k and the fuzzy intensity coefficient m value, and predicting the test data based on 10-fold cross validation. By implementing the method, the convergence speed and the convergence precision of the algorithm can be improved, and the capability of the algorithm for escaping from the local optimal solution is improved, so that a better global approximate optimal solution is found.

Description

Method and device for optimizing FKNN model parameters based on variant goblet sea squirt group algorithm
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for optimizing FKNN (fuzzy K-nearest neighbor) model parameters based on a variant bottle ascidian group algorithm.
Background
In the real world, many practical application problems can be abstracted into an actual parameter optimization problem, and a corresponding mathematical model is established. In solving the problem, people often want to find the best solution as soon as possible. Although conventional mathematical optimization methods can solve some optimization problems, the following two requirements must be satisfied: 1. the problem must be convex; 2. the final solution is closely related to the initial point. Therefore, scholars are trying to find other efficient algorithms. As an effective method, metaheuristic algorithms have proven effective in finding the optimal or near optimal solution to the optimization problem. According to its own characteristics, natural heuristic algorithms can be divided into the following three categories: physical heuristics (PAs), Evolutionary Algorithms (EAs), and Swarm Intelligence Algorithms (SIAs). In recent years, inspired by group behaviors, many different SIAs algorithms have been proposed by different scholars, such as Particle Swarm Optimization (PSO), Artificial Bee Colony (ABC), Harris-Hawks optimizer (HHO), salp-swarm algorithm (SSA), and the like. As a new optimization algorithm, SSA was created by mirjarlii in 2017, and its inspiration comes from foraging by salps.
The search strategy determines to a large extent the performance of the swarm intelligence algorithm. In other words, different optimization problems require different search strategies. Thus, integrating mutation strategies can improve the exploratory and developmental capabilities of swarm algorithms. Today there are many Differential Evolution (DE) algorithms that apply multiple variation schemes, such as: cui et al propose a multi-sub-population based adaptive mutation removal algorithm (MPADE) by adaptively embedding three mutation removal strategies, which is superior to the mutation removal algorithm in both the benchmark problem and the reality problem. Fan et al propose an adaptive DE (sde) algorithm with control parameter partition evolution and adaptive mutation strategy (ZEPDE), which adaptively applies 5 DE mutation strategies, improving DE performance. Li et al propose a multi-search differential evolution algorithm (MSDE) that introduces a number of variation methods, such as: three mutation operations of DE/current to cbest/1, DE/current to rbest/1 and DE/current to fbest/1 are carried out to improve the development and/or exploration level of DE. The Paldrak et al developed a differential evolution algorithm integration based on the variable neighborhood search algorithm (EDE-VNS) using five variation factors. Pol kov a et al propose an L-Shade algorithm with a competition strategy (LSHADE44) that uses two mutation operators and two crossover schemes to evaluate the performance of history-based linear population size reduction (L-Shade) adaptive DE variables. Wang proposes a time frame adaptive differential evolution algorithm (TFADE) that uses three variation schemes to generate candidate solutions. Wu et al combined three mutation strategies with a multi-population mechanism, suggesting multi-population integration DE (MPEDE). All of these integrated mutation strategies enhance the exploration and development capabilities of DE, significantly improving the performance of DE.
However, the existing search algorithm is adopted to process the optimization problem of the FKNN model parameter pair (k, m), and the convergence speed and the convergence accuracy of the algorithm are still to be further improved, and the capability of the algorithm to escape from the local optimal solution is improved, so that a better global approximately optimal solution is found.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method for optimizing FKNN model parameters based on a variant goblet sea squirt group algorithm, which optimizes FKNN parameter pairs (k, m) by the variant goblet sea squirt group algorithm, and finds a better global approximate optimal solution to obtain an FKNN model with higher classification accuracy by virtue of the characteristics of easy convergence, high convergence accuracy and strong ability to escape from a local optimal solution of the algorithm.
In order to solve the above technical problem, an embodiment of the present invention provides a method for optimizing FKNN model parameters based on a variant goblet sea squirt group algorithm, where the method includes the following steps:
step S1: acquiring sample data and carrying out normalization processing on the acquired sample data;
step S2, optimizing the parameters (k, m) of FKNN by using the integrated variant goblet sea squirt group algorithm with the preset restart mechanism, specifically:
s2.1, initializing parameters; the initialized parameters comprise: the number N of the population, the maximum iteration times Max _ iter, a search space [ kmin, kmax ] of k and a search space [ mmin, mmax ] of m;
step S2.2, initializing a population position: randomly generating N individual positions, wherein the position of the ith individual is Xi=(xi1,xi2) I ═ 1,2, … …, N; wherein x isi1Representing the value of k, x, of an individual i at the current locationi2Represents the value of m for individual i at the current location;
step S2.3, calculating the fitness f of N individualsiThe fitness value is based on the k and m values of the current position of the individual i; firstly, the accuracy ACC of the FKNN is calculated by an internal K-fold cross validation strategy according to the formula (1), and the value is taken as the fitness f of the individual iiA value of (d); then, updating the position of the leader according to a formula (2), and updating the position of the follower according to a formula (3);
Figure BDA0002628343290000031
Figure BDA0002628343290000032
Figure BDA0002628343290000033
wherein, acck represents the accuracy obtained by calculation on each fold data; x1,jAnd FjRespectively representing the positions of the leader and the food source in the j dimension; c. C1Is a control parameter, is adaptively reduced in the whole iteration process, and is used
Figure BDA0002628343290000034
Calculating, wherein L represents the current iteration frequency, and L represents the maximum iteration frequency; parameter c2And c3In the region [0,1]Generating randomly; ubjAnd lbjRespectively representing an upper boundary and a lower boundary of a j dimension; xi,jThe position of the ith follower in the jth dimension is shown, and i is more than or equal to 2;
s2.4, updating the position of the goblet ascidian in the goblet ascidian group algorithm by adopting an integrated variation strategy: generating three candidate positions V of the ith goblet sea squirt by the formulas (4) to (6)i1、Vi2And Vi3And generating three candidate positions V of ith goblet sea squirti1、Vi2And Vi3These three candidate positions are then corrected based on the upper and lower boundaries and further from Vi1、Vi2And Vi3The best candidate solution V with the lowest fitness is selectediUpdating the position of the ith goblet ascidian by using formula (7);
Figure BDA0002628343290000035
Figure BDA0002628343290000036
Figure BDA0002628343290000037
Figure BDA0002628343290000041
wherein r is1~r11And rand are both [0,1 ]]A random number in between; f1Denotes a scale factor set to 1.0, cr1Represents the crossover rate set to 0.1; f2Denotes a scaling factor, c, set to 0.8r2Represents the crossover rate set to 0.2; f3Denotes a scale factor set to 1.0, cr3Represents the crossover rate set to 0.9; viRepresenting the modified best candidate solution; xiIndicates the location of the ith goblet sea squirt, wherein if ViThe fitness of the sea squirt is superior to that of the ith goblet, the sea squirt is treated with ViIn place of XiOtherwise, keeping the state unchanged;
step S2.5, if the position of the ith sea squirt is not improved within the limit threshold, a restart mechanism is applied to help the sea squirt to be far away from the local optimum so as to prevent the population from falling into the local optimum, and the specific process is as follows:
using a test vector, trial (i), to record the number of times the location of the ith goblet ascidian is not improved, if the location of the ith goblet ascidian is not improved in the current search, increasing the test vector, trial (i), of the ith goblet ascidian by 1; otherwise, the real (i) resets to zero; if trial vector trial (i) exceeds a predefined limit, use trial vector T1And T2The superior vector replaces the location of the ith cask ascidian, and the trial vector trial (i) will reset to zero; wherein, T1Generated by equation (8); t is2Is generated by the formula (9) if T2Exceeds the upper boundary ub in the jth dimension of the positionjOr lower boundary lbjIf so, it is replaced by the formula (10);
T1,j=lbj+rand()×(ubj-lbj) (8);
T2,j=rand()×(ubj+lbj)-Xi,j (9);
T2,j=lbj+rand()×(ubj-lbj)ifT2,j≥ubj||T2,j≤lbj (10);
wherein, T1,jIndicates position T1The j-th dimension of (a); t is2,jIndicates position T2The j-th dimension of (a); ubjAnd lbjRespectively representing an upper boundary and a lower boundary of a j-th dimension; rand () represents a region [0,1 ]]The random number of (1);
s2.6, calculating the fitness of each individual by an internal K-fold cross validation strategy after adopting the same K and m coding modes as those in the step 2.3;
s2.7, judging whether the maximum iteration times Max _ iter is exceeded or not; if not, jumping to the step S2.3; if yes, executing the next step S2.8;
s2.8, outputting the best position bestPosition of the individual and the corresponding fitness thereof, namely the optimal neighbor number k and the fuzzy intensity coefficient m value;
and step S3, optimizing the FKNN model by using the optimal neighbor number k and the fuzzy strength coefficient m value, and predicting the test data based on 10-fold cross validation.
The embodiment of the invention also provides a device for optimizing the FKNN model parameters based on the variant goblet group algorithm, which comprises a memory and a processor, wherein the memory stores a computer program, and the device is characterized in that the processor realizes the steps of the method for optimizing the FKNN model parameters based on the variant goblet group algorithm when executing the computer program.
The embodiment of the invention has the following beneficial effects:
the invention combines a goblet sea squirt algorithm with an integrated variation strategy and a restart strategy, optimizes the parameter pair (k, m) of the FKNN based on the variant goblet sea squirt group algorithm, and finds a better global approximate optimal solution to obtain the FKNN model with higher classification precision by virtue of the characteristics of easy convergence, high convergence precision and strong capacity of escaping from a local optimal solution of the algorithm.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is within the scope of the present invention for those skilled in the art to obtain other drawings based on the drawings without inventive exercise.
Fig. 1 is a flowchart of a method for optimizing FKNN model parameters based on the variant goblet sea squirt group algorithm according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings.
As shown in fig. 1, a method for optimizing FKNN model parameters based on the variant goblet sea squirt group algorithm in the first embodiment of the present invention includes the following steps:
step S1: acquiring sample data and carrying out normalization processing on the acquired sample data;
the specific process is that the sample data come from various different fields, and can be designed according to actual needs, such as the medical field, the financial field and the like, and the data attribute category is divided into a data attribute and a category attribute. For example, for a single sample attribute of data for breast cancer disease, the data attribute values fall into two broad categories, namely data attribute X1-X9Representing attributes of relevant medical pathological aspects for breast cancer diseases, X10The categories of the data sample are represented: i.e. whether the sample is afflicted with breast cancer disease, and if the sample is afflicted with breast cancer: value 1, if the sample is healthy: a value of-1; as another example, for a single sample attribute distribution of enterprise bankruptcy risk prediction data, there may be X1-XnSuch related financial indexes as attribute indexes such as liability rate, total assets, etc., then Xn+1Also category labels: namely, whether the enterprise has the risk of bankruptcy within two years, if the risk of bankruptcy is 1, the risk of not bankruptcy is-1.
For convenience of data processing, normalization processing is performed on the acquired sample data.
Step S2, optimizing the parameters (k, m) of FKNN by using the integrated variant goblet sea squirt group algorithm with the preset restart mechanism, specifically:
s2.1, initializing parameters; the initialized parameters comprise: search space [ kmin, kmax ] of population number N and maximum iteration times Max _ iter, k]And m's search space [ mmin, mmax](ii) a For example, the number of population 10, the maximum number of iterations 50, and the search ranges for parameters k and m are all set to [2 ]-5,25];
Step S2.2, initializing a population position: randomly generating N individual positions, wherein the position of the ith individual is Xi=(xi1,xi2) I ═ 1,2, … …, N; wherein x isi1Representing the value of k for the individual i at the current location,xi2represents the value of m for individual i at the current location;
step S2.3, calculating the fitness f of N individualsiThe fitness value is based on the k and m values of the current position of the individual i; firstly, the accuracy ACC of the FKNN is calculated by an internal K-fold cross validation strategy according to the formula (1), and the value is taken as the fitness f of the individual iiA value of (d); then, updating the position of the leader according to a formula (2), and updating the position of the follower according to a formula (3);
Figure BDA0002628343290000061
Figure BDA0002628343290000062
Figure BDA0002628343290000063
wherein, acck represents the accuracy obtained by calculation on each fold data; x1,jAnd FjRespectively representing the positions of the leader and the food source in the j dimension; c. C1Is a control parameter, is adaptively reduced in the whole iteration process, and is used
Figure BDA0002628343290000071
Calculating, wherein L represents the current iteration frequency, and L represents the maximum iteration frequency; parameter c2And c3In the region [0,1]Generating randomly; ubjAnd lbjRespectively representing an upper boundary and a lower boundary of a j dimension; xi,jThe position of the ith follower in the jth dimension is shown, and i is more than or equal to 2;
s2.4, updating the position of the goblet ascidian in the goblet ascidian group algorithm by adopting an integrated variation strategy: generating three candidate positions V of the ith goblet sea squirt by the formulas (4) to (6)i1、Vi2And Vi3And generating three candidate positions V of ith goblet sea squirti1、Vi2And Vi3After, based onThese three candidate positions are corrected from the lower boundary and further from Vi1、Vi2And Vi3The best candidate solution V with the lowest fitness is selectediUpdating the position of the ith goblet ascidian by using formula (7);
Figure BDA0002628343290000072
Figure BDA0002628343290000073
Figure BDA0002628343290000074
Figure BDA0002628343290000075
wherein r is1~r11And rand are both [0,1 ]]A random number in between; f1Denotes a scale factor set to 1.0, cr1Represents the crossover rate set to 0.1; f2Denotes a scaling factor, c, set to 0.8r2Represents the crossover rate set to 0.2; f3Denotes a scale factor set to 1.0, cr3Represents the crossover rate set to 0.9; viRepresenting the modified best candidate solution; xiIndicates the location of the ith goblet sea squirt, wherein if ViThe fitness of the sea squirt is superior to that of the ith goblet, the sea squirt is treated with ViIn place of XiOtherwise, keeping the state unchanged;
step S2.5, if the position of the ith sea squirt is not improved within the limit threshold, a restart mechanism is applied to help the sea squirt to be far away from the local optimum so as to prevent the population from falling into the local optimum, and the specific process is as follows:
using a trial vector, tri (i), to record the number of times the location of the ith goblet ascidian did not improve, if the location of the ith goblet ascidian did not improve in the current search, the location of the ith goblet ascidian was recordedTrial vector trial (i) increased by 1; otherwise, the real (i) resets to zero; if trial vector trial (i) exceeds a predefined limit, use trial vector T1And T2The superior vector replaces the location of the ith cask ascidian, and the trial vector trial (i) will reset to zero; wherein, T1Generated by equation (8); t is2Is generated by the formula (9) if T2Exceeds the upper boundary ub in the jth dimension of the positionjOr lower boundary lbjIf so, it is replaced by the formula (10);
T1,j=lbj+rand()×(ubj-lbj) (8);
T2,j=rand()×(ubj+lbj)-Xi,j (9);
T2,j=lbj+rand()×(ubj-lbj)ifT2,j≥ubj||T2,j≤lbj (10);
wherein, T1,jIndicates position T1The j-th dimension of (a); t is2,jIndicates position T2The j-th dimension of (a); ubjAnd lbjRespectively representing an upper boundary and a lower boundary of a j-th dimension; rand () represents a region [0,1 ]]The random number of (1);
s2.6, calculating the fitness of each individual by an internal K-fold cross validation strategy after adopting the same K and m coding modes as those in the step 2.3;
s2.7, judging whether the maximum iteration times Max _ iter is exceeded or not; if not, jumping to the step S2.3; if yes, executing the next step S2.8;
s2.8, outputting the best position bestPosition of the individual and the corresponding fitness thereof, namely the optimal neighbor number k and the fuzzy intensity coefficient m value;
and step S3, optimizing the FKNN model by using the optimal neighbor number k and the fuzzy strength coefficient m value, and predicting the test data based on 10-fold cross validation.
Firstly, standardizing each characteristic attribute value of sample data to be tested;
and then, optimizing parameters (K, m) of FKNN by using a preset integrated variant cask sea squirt group algorithm of a restart mechanism, and internally optimizing by using a K-fold crossing strategy (namely performing K-fold cutting on a sample introduced into the model, wherein K-1 fold is used as training data each time, and optimizing two key parameters by using a hunger game search algorithm while training to expect to obtain an optimal intelligent classification model, and after the model is constructed, evaluating the performance of the constructed intelligent decision model by using the rest data as test data). In short, for different intelligent classification decision problems, we need to adopt the algorithm of goblet and sea squirt to construct the optimal classification decision model for such problems, as discussed before: the number k of neighbors and the fuzzy strength coefficient m have important influence on the performance of the model, that is, the quality of the two parameters directly influences the quality of the performance of the decision model, so that the selection of the two parameters is finished by the goblet sea squirt algorithm, the integrated variation strategy and the restart strategy, the traditional algorithm is improved, local extreme points are skipped, and the convergence speed and the accuracy of the algorithm are improved to a certain extent.
In contrast to the method for optimizing FKNN model parameters based on the variant goblet ascidian group algorithm provided in the first embodiment of the present invention, the second embodiment of the present invention further provides a device for optimizing FKNN model parameters based on the variant goblet ascidian group algorithm, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for optimizing FKNN model parameters based on the variant goblet ascidian group algorithm in the first embodiment of the present invention when executing the computer program. It should be noted that the process of executing the computer program by the processor in the second embodiment of the present invention is consistent with the process of executing each step in the method for optimizing FKNN model parameters based on the variant haichi group algorithm provided in the first embodiment of the present invention, and specific reference may be made to the foregoing related contents.
The embodiment of the invention has the following beneficial effects:
the invention combines a goblet sea squirt algorithm with an integrated variation strategy and a restart strategy, optimizes the parameter pair (k, m) of the FKNN based on the variant goblet sea squirt group algorithm, and finds a better global approximate optimal solution to obtain the FKNN model with higher classification precision by virtue of the characteristics of easy convergence, high convergence precision and strong capacity of escaping from a local optimal solution of the algorithm.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by relevant hardware instructed by a program, and the program may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc.
While the invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not to be limited to the disclosed embodiment, but on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (2)

1. A method for optimizing FKNN model parameters based on a variant goblet group algorithm is characterized by comprising the following steps:
step S1: acquiring sample data and carrying out normalization processing on the acquired sample data;
step S2, optimizing the parameters (k, m) of FKNN by using the integrated variant goblet sea squirt group algorithm with the preset restart mechanism, specifically:
s2.1, initializing parameters; the initialized parameters comprise: the number N of the population, the maximum iteration times Max _ iter, a search space [ kmin, kmax ] of k and a search space [ mmin, mmax ] of m;
step S2.2, initializing a population position: randomly generating N individual positions, wherein the position of the ith individual is Xi=(xi1,xi2) I ═ 1,2, … …, N; wherein x isi1Representing the value of k, x, of an individual i at the current locationi2Represents the value of m for individual i at the current location;
step S2.3, calculating the fitness f of N individualsiThe fitness value is based on the k and m values of the current position of the individual i; firstly, the accuracy ACC of the FKNN is calculated by an internal K-fold cross validation strategy according to the formula (1), and the value is taken as the fitness f of the individual iiA value of (d); then, according toUpdating the position of the leader according to the formula (2), and updating the position of the follower according to the formula (3);
Figure FDA0002628343280000011
Figure FDA0002628343280000012
Figure FDA0002628343280000013
wherein, acck represents the accuracy obtained by calculation on each fold data; x1,jAnd FjRespectively representing the positions of the leader and the food source in the j dimension; c. C1Is a control parameter, is adaptively reduced in the whole iteration process, and is used
Figure FDA0002628343280000014
Calculating, wherein L represents the current iteration frequency, and L represents the maximum iteration frequency; parameter c2And c3In the region [0,1]Generating randomly; ubjAnd lbjRespectively representing an upper boundary and a lower boundary of a j dimension; xi,jThe position of the ith follower in the jth dimension is shown, and i is more than or equal to 2;
s2.4, updating the position of the goblet ascidian in the goblet ascidian group algorithm by adopting an integrated variation strategy: generating three candidate positions V of the ith goblet sea squirt by the formulas (4) to (6)i1、Vi2And Vi3And generating three candidate positions V of ith goblet sea squirti1、Vi2And Vi3These three candidate positions are then corrected based on the upper and lower boundaries and further from Vi1、Vi2And Vi3The best candidate solution V with the lowest fitness is selectediUpdating the position of the ith goblet ascidian by using formula (7);
Figure FDA0002628343280000021
Figure FDA0002628343280000022
Figure FDA0002628343280000023
Figure FDA0002628343280000024
wherein r is1~r11And rand are both [0,1 ]]A random number in between; f1Denotes a scale factor set to 1.0, cr1Represents the crossover rate set to 0.1; f2Denotes a scaling factor, c, set to 0.8r2Represents the crossover rate set to 0.2; f3Denotes a scale factor set to 1.0, cr3Represents the crossover rate set to 0.9; viRepresenting the modified best candidate solution; xiIndicates the location of the ith goblet sea squirt, wherein if ViThe fitness of the sea squirt is superior to that of the ith goblet, the sea squirt is treated with ViIn place of XiOtherwise, keeping the state unchanged;
step S2.5, if the position of the ith sea squirt is not improved within the limit threshold, a restart mechanism is applied to help the sea squirt to be far away from the local optimum so as to prevent the population from falling into the local optimum, and the specific process is as follows:
using a test vector, trial (i), to record the number of times the location of the ith goblet ascidian is not improved, if the location of the ith goblet ascidian is not improved in the current search, increasing the test vector, trial (i), of the ith goblet ascidian by 1; otherwise, the real (i) resets to zero; if trial vector trial (i) exceeds a predefined limit, use trial vector T1And T2The superior vector replaces the location of the ith cask sea squirt, and the trial vector deal (i) will resetIs zero; wherein, T1Generated by equation (8); t is2Is generated by the formula (9) if T2Exceeds the upper boundary ub in the jth dimension of the positionjOr lower boundary lbjIf so, it is replaced by the formula (10);
T1,j=lbj+rand()×(ubj-lbj) (8);
T2,j=rand()×(ubj+lbj)-Xi,j (9);
T2,j=lbj+rand()×(ubj-lbj)ifT2,j≥ubj||T2,j≤lbj (10);
wherein, T1,jIndicates position T1The j-th dimension of (a); t is2,jIndicates position T2The j-th dimension of (a); ubjAnd lbjRespectively representing an upper boundary and a lower boundary of a j-th dimension; rand () represents a region [0,1 ]]The random number of (1);
s2.6, calculating the fitness of each individual by an internal K-fold cross validation strategy after adopting the same K and m coding modes as those in the step 2.3;
s2.7, judging whether the maximum iteration times Max _ iter is exceeded or not; if not, jumping to the step S2.3; if yes, executing the next step S2.8;
s2.8, outputting the best position bestPosition of the individual and the corresponding fitness thereof, namely the optimal neighbor number k and the fuzzy intensity coefficient m value;
and step S3, optimizing the FKNN model by using the optimal neighbor number k and the fuzzy strength coefficient m value, and predicting the test data based on 10-fold cross validation.
2. An apparatus for optimizing FKNN model parameters based on a variant goblet group algorithm, comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program implements the steps of the method for optimizing FKNN model parameters based on a variant goblet group algorithm of claim 1.
CN202010803746.1A 2020-08-11 2020-08-11 Method and device for optimizing FKNN model parameters based on variant sea squirt swarm algorithm Active CN112115969B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010803746.1A CN112115969B (en) 2020-08-11 2020-08-11 Method and device for optimizing FKNN model parameters based on variant sea squirt swarm algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010803746.1A CN112115969B (en) 2020-08-11 2020-08-11 Method and device for optimizing FKNN model parameters based on variant sea squirt swarm algorithm

Publications (2)

Publication Number Publication Date
CN112115969A true CN112115969A (en) 2020-12-22
CN112115969B CN112115969B (en) 2023-11-17

Family

ID=73804915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010803746.1A Active CN112115969B (en) 2020-08-11 2020-08-11 Method and device for optimizing FKNN model parameters based on variant sea squirt swarm algorithm

Country Status (1)

Country Link
CN (1) CN112115969B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114244549A (en) * 2021-08-10 2022-03-25 和安科技创新有限公司 GSSK-means abnormal flow detection method, memory and processor for industrial internet

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284860A (en) * 2018-08-28 2019-01-29 温州大学 A kind of prediction technique based on orthogonal reversed cup ascidian optimization algorithm
WO2019136892A1 (en) * 2018-01-15 2019-07-18 大连民族大学 Complex network community detection method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019136892A1 (en) * 2018-01-15 2019-07-18 大连民族大学 Complex network community detection method
CN109284860A (en) * 2018-08-28 2019-01-29 温州大学 A kind of prediction technique based on orthogonal reversed cup ascidian optimization algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梁珂;阚光远;李致家;: "新型耦合数据驱动模型在降雨径流模拟中的应用研究", 水文, no. 04 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114244549A (en) * 2021-08-10 2022-03-25 和安科技创新有限公司 GSSK-means abnormal flow detection method, memory and processor for industrial internet
CN114244549B (en) * 2021-08-10 2023-10-03 和安科技创新有限公司 GSSK-means abnormal flow detection method, memory and processor for industrial Internet

Also Published As

Publication number Publication date
CN112115969B (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN110232971B (en) Doctor recommendation method and device
Abd-Alsabour A review on evolutionary feature selection
CN111105045A (en) Method for constructing prediction model based on improved locust optimization algorithm
CN110705640A (en) Method for constructing prediction model based on slime mold algorithm
Tran et al. Improving performance for classification with incomplete data using wrapper-based feature selection
JP2022063250A (en) Super loss: general loss for robust curriculum learning
Brajevic et al. Multilevel image thresholding selection based on the cuckoo search algorithm
CN111079074A (en) Method for constructing prediction model based on improved sine and cosine algorithm
Zhang et al. Evolving neural network classifiers and feature subset using artificial fish swarm
Ashouri et al. Retraining-free methods for fast on-the-fly pruning of convolutional neural networks
Szwarcman et al. Quantum-inspired evolutionary algorithm applied to neural architecture search
Seth et al. Particle swarm optimization assisted support vector machine based diagnostic system for lung cancer prediction at the early stage
CN110751257A (en) Method for constructing prediction model based on hunger game search algorithm
CN111639695A (en) Method and system for classifying data based on improved drosophila optimization algorithm
CN112115969A (en) Method and device for optimizing FKNN model parameters based on variant goblet sea squirt group algorithm
US8250003B2 (en) Computationally efficient probabilistic linear regression
Rustam et al. Classification of cancer data based on support vectors machines with feature selection using genetic algorithm and laplacian score
Czajkowski et al. Steering the interpretability of decision trees using lasso regression-an evolutionary perspective
CN110991494A (en) Method for constructing prediction model based on improved moth optimization algorithm
Ghaedi et al. Cat hunting optimization algorithm: a novel optimization algorithm
Guo et al. Sensitivity pruner: filter-level compression algorithm for deep neural networks
CN113963410A (en) Face recognition optimization method based on improved genetic algorithm
Li et al. Finding pre-images via evolution strategies
CN116362344A (en) Text anti-attack method based on style migration and whale optimization algorithm hybridization
Cohen Automated crater detection using machine learning

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