Neural network – support vector machine

Support Vector Machine (SVM) was first proposed by Cortes and Vapnik in 1995. It shows many unique advantages in solving small sample size, nonlinear and high-dimensional pattern recognition, and can be generalized to other Machine learning problems such as function fitting. 1 Mathematics section 1.1 Two-dimensional space ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ 2 algorithm Part​​ ​​ ​​

===================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

2. Cuckoo algorithm

Cuckoo algorithm is a combination of cuckoo brooding behavior and Levy flight algorithm.



In the CS algorithm, there are two paths (or updates of two positions) that are of great concern:

The execution process of CS algorithm is as follows:

Three, code,

clear all ; close all ; clc ; N = 25; %Number of nests(The scale of solution) D = 10; % Dimensionality of solution T = 200 ; % Number of iterations Xmax = 20 ; Xmin = -20 ; Pa = 0.25; % Probability of building a new nest(After host bird find exotic bird eggs) nestPop = rand(N,D)*(Xmax-Xmin)+Xmin ; % Random initial solutions for t=1:T levy_nestPop = func_levy(nestPop,Xmax,Xmin) ; % Generate new solutions by Levy flights nestPop = func_bestNestPop(nestPop,levy_nestPop); % Choose a best nest among new and old nests rand_nestPop = func_newBuildNest(nestPop,Pa,Xmax,Xmin); % Abandon(Pa) worse nests and build new nests by (Preference random walk ) nestPop = func_bestNestPop(nestPop,rand_nestPop) ; % Choose a best nest among new and old nests [~,index] = max(func_fitness(nestPop)) ; % Best nests trace(t) = func_objValue(nestPop(index,:)) ; end figure plot(trace); Xlabel (' number of iterations '); Ylabel (' fitness value '); Title (' Fitness evolution curve ');Copy the code


5. References:

The book “MATLAB Neural Network 43 Case Analysis”

Complete code download or simulation consulting www.cnblogs.com/ttmatlab/p/…