±±¾©Ê¯ÓÍ»¯¹¤Ñ§Ôº2026ÄêÑо¿ÉúÕÐÉú½ÓÊÕµ÷¼Á¹«¸æ
²é¿´: 457  |  »Ø¸´: 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µÄ»ØÌû

nono2009

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

No gains, no pains.

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

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

¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
Ï£ÍûÄÜÏêϸ½âÊÍÒ»ÏÂÿ¾äµÄÒâ˼£¿ÄǹÀ¼ÆÃ»ÓÐÈËÕâôÓпա£
½¨ÒéÏȸãÃ÷°×Õâ¸ö³ÌÐò±³ºóµÄÔ­Àí£¬È»ºóÔÙ¶Á³ÌÐò¾Í»á±È½Ï¼òµ¥¡£
2Â¥2012-05-23 18:00:09
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

lijie169

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

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

¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
Ã²ËÆÊÇ·ÖÀà»ùÓÚMI·ÖÀàµÄ£¬Ô­ÀíÊÇ»ùÓÚ¾àÀë
3Â¥2012-05-24 13:49:43
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ xiaoyaojushi µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 085600 ²ÄÁÏÓ뻯¹¤ 329·ÖÇóµ÷¼Á +12 Mr. Z 2026-03-25 12/600 2026-03-29 14:13 by wxiongid
[¿¼ÑÐ] 311Çóµ÷¼Á +5 ¶¬Ê®Èý 2026-03-24 5/250 2026-03-29 08:55 by qingfeng258
[¿¼ÑÐ] ±¾¿ÆË«·Ç²ÄÁÏ£¬¿ç¿¼Ò»Ö¾Ô¸»ªµç085801µçÆø£¬283Çóµ÷¼Á£¬ÈκÎרҵ¶¼¿ÉÒÔ +6 ֥ʿѩbaoo 2026-03-28 8/400 2026-03-29 08:16 by ËÉ»¨¸×1201
[¿¼ÑÐ] 289Çóµ÷¼Á +13 ÐÂʱ´ú²ÄÁÏ 2026-03-27 13/650 2026-03-29 01:16 by 544594351
[¿¼ÑÐ] 0703»¯Ñ§µ÷¼Á£¬Çóµ¼Ê¦ÊÕ +9 ÌìÌìºÃÔËÀ´Éϰ¶° 2026-03-24 10/500 2026-03-28 22:17 by chemzp
[¿¼ÑÐ] 085600 286·Ö ²ÄÁÏÇóµ÷¼Á +7 ÂéÀ±öÏÓã 2026-03-27 8/400 2026-03-28 12:17 by zllcz
[¿¼ÑÐ] ҩѧ105500Çóµ÷¼Á +3 Ssun¡£¡£ 2026-03-28 3/150 2026-03-28 11:24 by lxf170613
[¿¼ÑÐ] Ò»Ö¾Ô¸Äϲý´óѧ324Çóµ÷¼Á +7 hanamiko 2026-03-27 7/350 2026-03-28 09:56 by ÀîÉϰ¶0921
[¿¼ÑÐ] 291Çóµ÷¼Á +6 HanBeiNingZC 2026-03-24 6/300 2026-03-28 07:55 by baoball
[¿¼ÑÐ] 295Çóµ÷¼Á +5 1428151015 2026-03-27 6/300 2026-03-28 04:04 by fmesaito
[¿¼ÑÐ] 275Çóµ÷¼Á +10 jjjjjjjjjjl 2026-03-27 10/500 2026-03-27 23:47 by barnett0632
[¿¼ÑÐ] 265Çóµ÷¼Á11408 +3 ÁõС¹lu 2026-03-27 3/150 2026-03-27 20:53 by nihaoar
[¿¼ÑÐ] 316Çóµ÷¼Á +5 Pigcasso 2026-03-24 5/250 2026-03-27 12:10 by zhshch
[¿¼ÑÐ] ²ÄÁÏѧ˶£¬Çóµ÷¼Á 6+5 ÌǺù«888ll 2026-03-22 10/500 2026-03-27 08:18 by hypershenger
[¿¼ÑÐ] µ÷¼ÁÇóÊÕÁô +7 ¹ûÈ»ÓÐÎÒ 2026-03-26 7/350 2026-03-27 00:26 by wxiongid
[¿¼ÑÐ] 341Çóµ÷¼Á +7 ÇàÄûÃÊ1 2026-03-26 7/350 2026-03-27 00:19 by wxiongid
[¿¼ÑÐ] 340Çóµ÷¼Á +5 »°Ã·ÌÇ111 2026-03-24 5/250 2026-03-25 06:53 by ilovexiaobin
[¿¼ÑÐ] Çóµ÷¼Á +6 ÑÐÑУ¬½Óµç»° 2026-03-24 7/350 2026-03-24 17:01 by barlinike
[¿¼ÑÐ] ½ÓÊÕ2026˶ʿµ÷¼Á(ѧ˶+ר˶) +4 allen-yin 2026-03-23 6/300 2026-03-23 15:04 by Íô£¡£¿£¡
[¿¼ÑÐ] 328Çóµ÷¼Á +4 LHHL66 2026-03-23 4/200 2026-03-23 14:55 by lbsjt
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û