24СʱÈÈÃŰæ¿éÅÅÐаñ    

²é¿´: 526  |  »Ø¸´: 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 µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[»ù½ðÉêÇë] ϵͳ²é²»µ½ +11 ¶­°Ëǧ 2026-08-26 11/550 2026-08-28 18:06 by Leogzhya
[»ù½ðÉêÇë] Ϊʲô×ÊÖúÊý¸÷´ó¸ßУ¶¼´´Ð¸ߣ¬×Ô¼ºÉêÇëÔõô¾ÍÕâôÄÑ +11 Kittylucky 2026-08-27 12/600 2026-08-28 16:26 by lyxiaomc
[»ù½ðÉêÇë] ÓÐûÓÐÈÔûÊÕµ½ÐÅÏ¢µÄ +3 µÂÉÐÖÐÐÐ 2026-08-27 3/150 2026-08-28 15:24 by rongshuxia
[»ù½ðÉêÇë] Â鷳ר¼ÒÃÇ¿´¿´ÆÀίÃǵÄÒâ¼û£¨F¿ÚÃæÉÏ£© +4 gdd2018 2026-08-28 9/450 2026-08-28 14:22 by jklily
[»ù½ðÉêÇë] 2026ÄêÒ¶ÆóËï»ù½ð +3 bud_bud 2026-08-27 6/300 2026-08-28 11:53 by bud_bud
[»ù½ðÉêÇë] ÄÄλ¸ßÈËÖÐÁË£¬°Ñ²éѯµ½µÄ½ØÍ¼Ìù³öÀ´ÈÃÎÒ¿´¿´£¬ÈÃÎÒ³¤³¤¼ûʶ +5 yuleib84 2026-08-26 6/300 2026-08-28 00:02 by yudaoqian88
[»ù½ðÉêÇë] ÃæÉϺÏ×÷µ¥Î»¸ÇÕ +5 ssyjh 2026-08-27 5/250 2026-08-27 20:50 by gdfollow
[»ù½ðÉêÇë] »ù½ðδÖУ¬ÕâÖÖ´ð¸´ÊÇÄ£°åÂ𣿠+5 zhaosm1982 2026-08-27 6/300 2026-08-27 16:00 by lfy8008
[ÎÄѧ·¼²ÝÔ°] ÃÎÏë +3 myrtle 2026-08-26 3/150 2026-08-27 10:01 by angelyueyi
[»ù½ðÉêÇë] ÎÒ²»Àí½â£¡ +15 Edward_pc 2026-08-26 23/1150 2026-08-26 20:34 by zzuzxg
[»ù½ðÉêÇë] ÄÜ·ñÍ˳ö²ÎÓëµÄÃæÉÏÏîÄ¿½â³ýÏÞÏî +23 koalala 2026-08-24 26/1300 2026-08-26 14:29 by ±¦±´³æ×Ó
[»ù½ðÉêÇë] ³öÀ´ÁË +9 trojank 2026-08-26 9/450 2026-08-26 14:25 by ±¦±´³æ×Ó
[»ù½ðÉêÇë] Ϊʲô¹ú×ÔÈ»²»ÄÜÖ±½Ó¹«²¼ +4 bjdxyxy 2026-08-26 4/200 2026-08-26 13:12 by qingmu1201
[»ù½ðÉêÇë] ϵͳ½ø²»È¥ +4 yanglien 2026-08-26 5/250 2026-08-26 11:10 by wenfengw83
[»ù½ðÉêÇë] ¹úºÏ¿É²éÁË +3 paperzjh 2026-08-26 3/150 2026-08-26 10:41 by LemmonTr
[Ö°³¡ÈËÉú] ѧÉúײ¼û¸¨µ¼Ô±ËÍÍâÂô£¬µÚ¶þÌìÈ«°à¶¼³ÁĬÁË +3 ¾¨ÓãÈÚ½ð_Õã½­_É 2026-08-22 3/150 2026-08-26 09:01 by zzuzxg
[»ù½ðÉêÇë] ¹úºÏÏÖÔڲ鲻µ½ÁËÂ𣿠+10 chengyan1220 2026-08-24 20/1000 2026-08-26 08:57 by peasantsprig
[»ù½ðÉêÇë] ÔÚ¼á±ù»¹¸Ç×ű±º£µÄʱºò£¬ÎÒ¿´µ½ÁËÅ­·ÅµÄ÷»¨¡£ (½ð±Ò+10) +6 ziyangfang 2026-08-25 9/450 2026-08-25 20:26 by huagongfeihu
[»ù½ðÉêÇë] Èç¹û´Ë¿ÌÄãÕýÔÚΪ¹ú»ù¸Ðµ½½¹ÂÇ£¬²»·ÁÀ´ÌýÌýÕâÊס¶»ù½ðÖ®Íâ¡· +8 scalable 2026-08-24 8/400 2026-08-25 12:52 by jnhyjjm
[½Ìʦ֮¼Ò] Ìø²ÛºóÔÚÑÐÏîÄ¿Ôõô°ì£¿ +5 ¼òµ¥»¯xn 2026-08-22 10/500 2026-08-23 12:38 by ¼òµ¥»¯xn
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û