Techniques from information theory are usual in selecting variables in time series prediction or pattern recognition. These tasks involve, directly or indirectly, the maximization of the mutual information between input and output data. However, this procedure requires a high computational effort, due to the calculation of the joint entropy, which requires the estimation of the joint probability distributions. To avoid this computational effort, it is possible to apply variable selection based on the principle of minimum-redundancy/maximum-relevance, which maximizes the mutual information indirectly, with lower computational cost. However, the problem of combinatorial optimization, i.e. to check all possible combinations of variables, still represents a large computational effort. Due to this computational cost, a simple method of incremental search, that reaches a quasi-optimal solution, was proposed by some previous works. Given the limitations of the existing methods, this code was developed, in order to perform the combinatorial optimization by using Genetic Algorithms. The arguments are the desired number of selected features (feat_numb), a matrix X, in which each column is a feature vector example, and its respective target data y, which is a row vector. The output is a vector with the indexes of the features that composes the optimum feature set, in which the order of features has NO relation with their importance. In case of publication, please cite the original work: O. Ludwig and U. Nunes; “ Novel Maximum-Margin Training Algorithms for Supervised Neural Networks;” IEEE Transactions on Neural Networks, vol.21, issue 6, pp. 972-984, Jun. 2010, where this algorithm is applied in choosing the hidden neurons to compose a hybrid neural network named ASNN.
Could you please send and example how I can use this function.
I have some confusions regarding the inputs.
Here, every row of X is a particular feature subset. But it is not clear to me what the other input 'respective target data y' means.
Can you please add some details to this?
First of all,thank you so much for providing this effective code.
when i try to perform features selection using this code i call it as following:
x=matrix of features;
y=labels; % maybe the problem is here
and then an error come out as following:
Error using vertcat
CAT arguments dimensions are not consistent.
Error in statistics (line 9)
Error in GA_feature_selector (line 19)
Actually, i tried to select a sub set of features i have (x) which is 40*28 matrix where each row represent a vector. and i have y labels whcih is 40 *1 matrix where each row is a target label for each vector.
Can you please tell me why the code not work, and where is the problem, and i will be appreciate that.
Thank you in advance
can you please give the description of the above code. Its very difficult to understand the meaning of each line.Moreover various notations are difficult to be guessed.
Pressão means pressure in my mother tongue, you can set the selective pressure of the GA through this variable, see Equation (10) of:
Can you please explain the meaning of 'Pressao'......There are no of variables whoz meaning is difficult to be guessed....So can you please provide an algo of the code.
I'm sorry you aren't able to read/interpret the file description: "... The arguments are the desired number of selected features (feat_numb), a matrix X, in which each column is a feature vector example...".
what is the meaning "15" in Hy=entropia2([y;zeros(1,C)],15)?
Moreover, the Y dimension is not matched with zeros(1,C). because the Dimension of C is equal with number of features whereas the dimension of y is equal the number of input pairs.
So, there is a mismatch dimension to vertcat!
How we can solve this problem?
Can you please explain the meaning of the resolucao=15. Why 15?
if u please send a description for the used GA method,thnx
Ali, use transposed X n y, i.e. X',y'.. hope it helps
I am facing difficulty using the code. I am running Matlab 7, on Mac OS. When i call the function I get the following error :
??? Error using ==> vertcat
CAT arguments dimensions are not consistent.
Error in ==> statistics at 9
Error in ==> GA_feature_selector at 19
Can anyone help please
thanks for your code
but plz write an example to run this code
The approach depends on your application, in the case of object detection, the usual approach is to use an image descriptor, eg HOG (see http://www.mathworks.com/matlabcentral/fileexchange/28689-hog-descriptor-for-matlab), before the feature selection.
How to use this function for images
Only the description.