MATLAB智能算法30个案例分析

所属分类:书籍源码
开发工具:matlab
文件大小:62662KB
下载次数:10
上传日期:2020-10-15 21:20:30
上 传 者moxilawa
说明:  本书采用案例形式,以智能算法为主线,讲解了遗传算法.免疫算法,退火算法.粒子群算法,鱼群算法,蚁群算法和神经网络算法等最常用的智能算法的MATLAB实现,本书共给出30个案例,每个案例都是一个使用智能算法解决问题的具体实例,所有案例均由理论讲解、案例背景.MATLAB程序实现和扩展阅读四个部分组成,并配有完整的程序源码。
(This book uses case form and takes intelligent algorithm as the main line to explain the matlab implementation of the most commonly used intelligent algorithms, such as genetic algorithm, immune algorithm, annealing algorithm, particle swarm optimization algorithm, fish swarm algorithm, ant colony algorithm and neural network algorithm. There are 30 cases in this book, and each case is a specific example of using intelligent algorithm to solve problems, All cases are composed of theoretical explanation, case background, matlab program implementation and extended reading, and complete program source code.)

文件列表:
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter1\example1.m (1909, 2010-10-31)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter1\example2.m (2113, 2010-10-31)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter1\Sheffield的遗传算法工具箱.rar (423860, 2015-06-14)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter10\data.mat (422, 2010-12-28)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter10\main.m (6048, 2010-12-28)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\aberranceJm.m (1067, 2007-09-24)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\across.m (2329, 2007-09-17)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\cal.m (1325, 2007-09-17)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\calp.m (555, 2007-09-17)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\caltime.m (1276, 2007-09-17)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\Find.m (178, 2007-08-22)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\main.m (2816, 2015-06-18)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\plotRec.m (487, 2007-07-14)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\ranking.M (4708, 2010-12-23)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\REINS.M (5574, 1998-04-22)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\RWS.M (1090, 1998-04-22)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\scheduleData.mat (527, 2010-12-23)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\SELECT.M (2401, 1998-04-22)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter11\selectJm.m (398, 2007-09-24)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\bestselect.m (1669, 2010-09-06)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\centre.fig (7910, 2010-09-07)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\concentration.m (479, 2010-09-06)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\Cross.m (1294, 2010-09-06)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\draw.m (1046, 2010-09-06)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\excellence.m (400, 2010-09-06)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\figure.fig (9007, 2010-09-07)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\fitness.m (901, 2010-09-07)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\IAdata.mat (4838, 2010-09-07)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\incorporate.m (1102, 2010-09-06)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\main.m (3676, 2010-12-28)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\Mutation.m (1001, 2010-09-06)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\popinit.m (319, 2010-09-06)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\Select.m (912, 2010-09-06)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\similar.m (377, 2010-09-06)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter12\test.m (580, 2010-09-06)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter13\sample1\fun.m (241, 2010-08-03)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter13\sample1\main.m (1579, 2010-08-05)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter13\sample1\MexicoHatnew.m (174, 2010-08-03)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter13\sample1\PSO0.m (1802, 2010-08-05)
MATLAB智能算法30个案例分析\MATLAB_Codes\chapter13\sample1\PSO1.m (1859, 2010-08-05)
... ...

----------------------------------------- --- MATLAB/OCTAVE interface of LIBSVM --- ----------------------------------------- Table of Contents ================= - Introduction - Installation - Usage - Returned Model Structure - Examples - Other Utilities - Additional Information Introduction ============ This tool provides a simple interface to LIBSVM, a library for support vector machines (http://www.csie.ntu.edu.tw/~cjlin/libsvm). It is very easy to use as the usage and the way of specifying parameters are the same as that of LIBSVM. Installation ============ On Unix systems, we recommend using GNU g++ as your compiler and type 'make' to build 'svmtrain.mexglx' and 'svmpredict.mexglx'. Note that we assume your MATLAB is installed in '/usr/local/matlab', if not, please change MATLABDIR in Makefile. Example: linux> make To use Octave, type 'make octave': Example: linux> make octave On Windows systems, pre-built 'svmtrain.mexw32' and 'svmpredict.mexw32' are included in this package, so no need to conduct installation. If you have modified the sources and would like to re-build the package, type 'mex -setup' in MATLAB to choose a compiler for mex first. Then type 'make' to start the installation. Starting from MATLAB 7.1 (R14SP3), the default MEX file extension is changed from .dll to .mexw32 or .mexw*** (depends on 32-bit or ***-bit Windows). If your MATLAB is older than 7.1, you have to build these files yourself. Example: matlab> mex -setup (ps: MATLAB will show the following messages to setup default compiler.) Please choose your compiler for building external interface (MEX) files: Would you like mex to locate installed compilers [y]/n? y Select a compiler: [1] Microsoft Visual C/C++ version 7.1 in C:\Program Files\Microsoft Visual Studio [0] None Compiler: 1 Please verify your choices: Compiler: Microsoft Visual C/C++ 7.1 Location: C:\Program Files\Microsoft Visual Studio Are these correct?([y]/n): y matlab> make Under ***-bit Windows, Visual Studio 2005 user will need "X*** Compiler and Tools". The package won't be installed by default, but you can find it in customized installation options. For list of supported/compatible compilers for MATLAB, please check the following page: http://www.mathworks.com/support/compilers/current_release/ Usage ===== matlab> model = svmtrain(training_label_vector, training_instance_matrix [, 'libsvm_options']); -training_label_vector: An m by 1 vector of training labels (type must be double). -training_instance_matrix: An m by n matrix of m training instances with n features. It can be dense or sparse (type must be double). -libsvm_options: A string of training options in the same format as that of LIBSVM. matlab> [predicted_label, accuracy, decision_values/prob_estimates] = svmpredict(testing_label_vector, testing_instance_matrix, model [, 'libsvm_options']); -testing_label_vector: An m by 1 vector of prediction labels. If labels of test data are unknown, simply use any random values. (type must be double) -testing_instance_matrix: An m by n matrix of m testing instances with n features. It can be dense or sparse. (type must be double) -model: The output of svmtrain. -libsvm_options: A string of testing options in the same format as that of LIBSVM. Returned Model Structure ======================== The 'svmtrain' function returns a model which can be used for future prediction. It is a structure and is organized as [Parameters, nr_class, totalSV, rho, Label, ProbA, ProbB, nSV, sv_coef, SVs]: -Parameters: parameters -nr_class: number of classes; = 2 for regression/one-class svm -totalSV: total #SV -rho: -b of the decision function(s) wx+b -Label: label of each class; empty for regression/one-class SVM -ProbA: pairwise probability information; empty if -b 0 or in one-class SVM -ProbB: pairwise probability information; empty if -b 0 or in one-class SVM -nSV: number of SVs for each class; empty for regression/one-class SVM -sv_coef: coefficients for SVs in decision functions -SVs: support vectors If you do not use the option '-b 1', ProbA and ProbB are empty matrices. If the '-v' option is specified, cross validation is conducted and the returned model is just a scalar: cross-validation accuracy for classification and mean-squared error for regression. More details about this model can be found in LIBSVM FAQ (http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html) and LIBSVM implementation document (http://www.csie.ntu.edu.tw/~cjlin/papers/libsvm.pdf). Result of Prediction ==================== The function 'svmpredict' has three outputs. The first one, predictd_label, is a vector of predicted labels. The second output, accuracy, is a vector including accuracy (for classification), mean squared error, and squared correlation coefficient (for regression). The third is a matrix containing decision values or probability estimates (if '-b 1' is specified). If k is the number of classes, for decision values, each row includes results of predicting k(k-1/2) binary-class SVMs. For probabilities, each row contains k values indicating the probability that the testing instance is in each class. Note that the order of classes here is the same as 'Label' field in the model structure. Examples ======== Train and test on the provided data heart_scale: matlab> load heart_scale.mat matlab> model = svmtrain(heart_scale_label, heart_scale_inst, '-c 1 -g 0.07'); matlab> [predict_label, accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model); % test the training data For probability estimates, you need '-b 1' for training and testing: matlab> load heart_scale.mat matlab> model = svmtrain(heart_scale_label, heart_scale_inst, '-c 1 -g 0.07 -b 1'); matlab> load heart_scale.mat matlab> [predict_label, accuracy, prob_estimates] = svmpredict(heart_scale_label, heart_scale_inst, model, '-b 1'); To use precomputed kernel, you must include sample serial number as the first column of the training and testing data (assume your kernel matrix is K, # of instances is n): matlab> K1 = [(1:n)', K]; % include sample serial number as first column matlab> model = svmtrain(label_vector, K1, '-t 4'); matlab> [predict_label, accuracy, dec_values] = svmpredict(label_vector, K1, model); % test the training data We give the following detailed example by splitting heart_scale into 150 training and 120 testing data. Constructing a linear kernel matrix and then using the precomputed kernel gives exactly the same testing error as using the LIBSVM built-in linear kernel. matlab> load heart_scale.mat matlab> matlab> % Split Data matlab> train_data = heart_scale_inst(1:150,:); matlab> train_label = heart_scale_label(1:150,:); matlab> test_data = heart_scale_inst(151:270,:); matlab> test_label = heart_scale_label(151:270,:); matlab> matlab> % Linear Kernel matlab> model_linear = svmtrain(train_label, train_data, '-t 0'); matlab> [predict_label_L, accuracy_L, dec_values_L] = svmpredict(test_label, test_data, model_linear); matlab> matlab> % Precomputed Kernel matlab> model_precomputed = svmtrain(train_label, [(1:150)', train_data*train_data'], '-t 4'); matlab> [predict_label_P, accuracy_P, dec_values_P] = svmpredict(test_label, [(1:120)', test_data*train_data'], model_precomputed); matlab> matlab> accuracy_L % Display the accuracy using linear kernel matlab> accuracy_P % Display the accuracy using precomputed kernel Note that for testing, you can put anything in the testing_label_vector. For more details of precomputed kernels, please read the section ``Precomputed Kernels'' in the README of the LIBSVM package. Other Utilities =============== A matlab function libsvmread reads files in LIBSVM format: [label_vector, instance_matrix] = libsvmread('data.txt'); Two outputs are labels and instances, which can then be used as inputs of svmtrain or svmpredict. A matlab function libsvmwrite writes Matlab matrix to a file in LIBSVM format: libsvmwrite('data.txt', label_vector, instance_matrix] The instance_matrix must be a sparse matrix. (type must be double) These codes are prepared by Rong-En Fan and Kai-Wei Chang from National Taiwan University. Additional Information ====================== This interface was initially written by Jun-Cheng Chen, Kuan-Jen Peng, Chih-Yuan Yang and Chih-Huai Cheng from Department of Computer Science, National Taiwan University. The current version was prepared by Rong-En Fan and Ting-Fan Wu. If you find this tool useful, please cite LIBSVM as follows Chih-Chung Chang and Chih-Jen Lin, LIBSVM : a library for support vector machines, 2001. Software available at http://www.csie.ntu.edu.tw/~cjlin/libsvm For any question, please contact Chih-Jen Lin , or check the FAQ page: http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#/Q9:_MATLAB_interface

近期下载者

相关文件


收藏者