²é¿´: 455  |  »Ø¸´: 2
µ±Ç°Ö»ÏÔʾÂú×ãÖ¸¶¨Ìõ¼þµÄ»ØÌû£¬µã»÷ÕâÀï²é¿´±¾»°ÌâµÄËùÓлØÌû

xiaoyaojushi

гæ (³õÈëÎÄ̳)

[ÇóÖú] matlabÇóÖú

ÇëÎʰïÎÒ½âÊÍÒ»ÏÂÕâ¸ö³ÌÐòµÄÒâ˼°É£¬Ï£ÍûÄÜÏêϸ½âÊÍÒ»ÏÂÿ¾äµÄÒâ˼£¡
function [res mi]=forward_sel_class(X,Y,k)
% Forward feature selection using the MI criterion.
% X is a dataset (n x d) with n samples and d features and Y is the class
% vector with classes denoted 1, 2 ... c.
[s1,s2]=size(X);
res = [];
remainingset = [1:size(X,2)];
for j=1:size(X,2)
    j;
currscore=[];
for i=1:length(remainingset)
    tempset = [res remainingset(i)];
    tempscore=miv_opt(X(:,tempset),Y,k);
    currscore(i,=tempscore;
end
    [winnerscore, winner] = max(currscore);
    mi(i)=winnerscore;
    res = [res remainingset(winner)];
    remainingset(winner) = [];
end
function res = miv(X,Y,k)
if(size(Y,1) > size(Y,2))
    Y = Y';
end
warning off
% Estimate mutual information between X ad Y with Y a discrete random variable
% and X a real random vector
% k must be smaller than the minimum number of points in a class.

load digammaMAT;
Y = 1 + Y - min(Y);
[N,d]   = size(X);              % Sample size and dimension
C       = full(ind2vec(Y))';    % Matrix of binary class description
[N, L]  = size(C);              % Sample size and number of classes
cN      = sum(C);               % sample size of each class
for l=1:L, digammacN(l) = digammaMAT(cN(l));end
distmat = pairwisedistances(X,2);
epsilonallclasses = zeros(N,1);
epsilonsameclass = zeros(N,1);
for j = 1:N
    % get vector of all distances
    dist = distmat(j,;
    % sort this vector
    [sorteddistances, distanceindices] = sort(dist);

    % find the distance to the k th neighbour
    epsilonallclasses(j) = 2*sorteddistances(k+1); % the first neighbour is the point itself
    % find the distance to the k th neighbour in the same class
    whichclass = Y(j);
    mask = C(:,whichclass);
    mask = mask(distanceindices);
    sorteddistancesinsameclass = sorteddistances(find(mask));
    epsilonsameclass(j) = 2*sorteddistancesinsameclass(k+1);
end
res = digammaMAT(N) - 1/N * sum(cN.*digammacN)+ d/N * sum((log(epsilonallclasses))-(log(epsilonsameclass)));
res=res/log(2);
% ajout
% if (isnan(res)==1)|(res==-Inf)|(res<0)
%     res=0;
% end
% if j is specified, output is the distance from all points in X to j
% otherwise, output is a full squared distance matrix with all distances
% between all points
function [res] = pairwisedistances(X, pp,j)
[n,p] = size(X);
if nargin < 3
    %outClass = class(X);
    Y = zeros(1,n*(n-1)./2, 'single');
    k = 1;
    for i = 1:n-1
        dsq = zeros(n-i,1,'single');
        for q = 1:p
            dsq = dsq + abs(X(i,q) - X((i+1):n,q)).^pp;
        end
        Y(kk+n-i-1)) = (dsq).^(1/pp);
        k = k + (n-i);
    end
    res = squareform(Y);
else
     res = (sum(abs(X-repmat(X(j,,n,1)).^pp,2)).^(1/pp);
end

[ À´×Ô¿ÆÑмÒ×å È˹¤ÖÇÄÜ ]
»Ø¸´´ËÂ¥
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

lijie169

Í­³æ (ÖøÃûдÊÖ)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
Ã²ËÆÊÇ·ÖÀà»ùÓÚMI·ÖÀàµÄ£¬Ô­ÀíÊÇ»ùÓÚ¾àÀë
3Â¥2012-05-24 13:49:43
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
²é¿´È«²¿ 3 ¸ö»Ø´ð

nono2009

³¬¼¶°æÖ÷ (ÎÄѧ̩¶·)

No gains, no pains.

ÓÅÐãÇø³¤ÓÅÐãÇø³¤ÓÅÐãÇø³¤ÓÅÐãÇø³¤ÓÅÐã°æÖ÷

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
Ï£ÍûÄÜÏêϸ½âÊÍÒ»ÏÂÿ¾äµÄÒâ˼£¿ÄǹÀ¼ÆÃ»ÓÐÈËÕâôÓпա£
½¨ÒéÏȸãÃ÷°×Õâ¸ö³ÌÐò±³ºóµÄÔ­Àí£¬È»ºóÔÙ¶Á³ÌÐò¾Í»á±È½Ï¼òµ¥¡£
2Â¥2012-05-23 18:00:09
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 289Çóµ÷¼Á +3 »³èªÎÕè¤l 2026-03-20 3/150 2026-03-20 16:17 by Iveryant
[¿¼ÑÐ] 085600²ÄÁÏÓ뻯¹¤ +6 °²È«Éϰ¶£¡ 2026-03-16 6/300 2026-03-20 15:07 by lbsjt
[¿¼ÑÐ] 295²ÄÁÏÇóµ÷¼Á£¬Ò»Ö¾Ô¸Î人Àí¹¤085601ר˶ +4 Charlieyq 2026-03-19 4/200 2026-03-20 14:26 by ÎÞи¿É»÷111
[¿¼ÑÐ] ±¾ÈË¿¼085602 »¯Ñ§¹¤³Ì ר˶ +18 ²»ÖªµÀ½Ðʲô£¡ 2026-03-15 20/1000 2026-03-20 13:52 by danney002
[¿¼ÑÐ] Ò»Ö¾Ô¸Äϲý´óѧ£¬327·Ö£¬²ÄÁÏÓ뻯¹¤085600 +5 Ncdx123456 2026-03-19 5/250 2026-03-20 11:15 by wangy0907
[¿¼ÑÐ] Ò»Ö¾Ô¸¼ªÁÖ´óѧ²ÄÁÏѧ˶321Çóµ÷¼Á +11 Ymlll 2026-03-18 14/700 2026-03-20 10:46 by EBSD
[¿¼²©] É격26Äê +3 °Ë6°Ë68 2026-03-19 3/150 2026-03-19 19:43 by nxgogo
[¿¼ÑÐ] 266Çóµ÷¼Á +5 ÑôÑôÍÛÈû 2026-03-14 10/500 2026-03-19 15:08 by ÑôÑôÍÛÈû
[¿¼ÑÐ] Ò»Ö¾Ô¸985£¬±¾¿Æ211£¬0817»¯Ñ§¹¤³ÌÓë¼¼Êõ319Çóµ÷¼Á +10 Liwangman 2026-03-15 10/500 2026-03-19 10:25 by Î޼ʵIJÝÔ­
[¿¼ÑÐ] 0703»¯Ñ§ 305Çóµ÷¼Á +4 FY_yy 2026-03-14 4/200 2026-03-19 05:54 by anny19840123
[¿¼ÑÐ] 303Çóµ÷¼Á +4 î£08 2026-03-17 6/300 2026-03-18 11:01 by Iveryant
[»ù½ðÉêÇë] ±»ÎÒÑÔÖУºÐÂÄ£°å²»Ç¿µ÷¸ñʽÁË£¬¼Ùר¼Ò¿ªÊ¼¹Ü¸ñʽÁË +4 beefly 2026-03-14 4/200 2026-03-17 22:04 by »ÆÄñÓÚ·ÉChao
[¿¼ÑÐ] ¿¼ÑÐÇóµ÷¼Á +3 éÙËÌ. 2026-03-17 4/200 2026-03-17 21:43 by ÓÐÖ»ÀêÅ«
[¿¼ÑÐ] Ò»Ö¾Ô¸ËÕÖÝ´óѧ²ÄÁϹ¤³Ì£¨085601£©×¨Ë¶ÓпÆÑо­ÀúÈýÏî¹ú½±Á½¸öʵÓÃÐÍרÀûÒ»ÏîÊ¡¼¶Á¢Ïî +6 ´ó»ðɽС»ðɽ 2026-03-16 8/400 2026-03-17 15:05 by ÎÞи¿É»÷111
[¿¼ÑÐ] 333Çóµ÷¼Á +3 ÎÄ˼¿Í 2026-03-16 7/350 2026-03-16 18:21 by ÎÄ˼¿Í
[¿¼ÑÐ] 321Çóµ÷¼Á +5 ´óÃ×·¹£¡ 2026-03-15 5/250 2026-03-16 16:33 by houyaoxu
[¿¼ÑÐ] ÖпÆÔº²ÄÁÏ273Çóµ÷¼Á +4 yzydy 2026-03-15 4/200 2026-03-16 15:59 by Gaodh_82
[¿¼ÑÐ] 277²ÄÁÏ¿ÆÑ§Ó빤³Ì080500Çóµ÷¼Á +3 ×ÔÓɼå±ý¹û×Ó 2026-03-16 3/150 2026-03-16 14:10 by ÔËÆøyunqi
[¿¼ÑÐ] 0703 ÎïÀí»¯Ñ§µ÷¼Á +3 ÎÒ¿ÉÒÔÉϰ¶µÄ¶Ô 2026-03-13 5/250 2026-03-16 10:50 by ÎÒ¿ÉÒÔÉϰ¶µÄ¶ÔÂ
[¿¼ÑÐ] 330Çóµ÷¼Á +3 ?½´¸øµ÷¼Á¹òÁË 2026-03-13 3/150 2026-03-14 10:13 by JourneyLucky
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û