亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? treec.m

?? 用于模式識別的MATLAB源代碼,準確性高,比較好用.
?? M
?? 第 1 頁 / 共 2 頁
字號:
%TREEC Build a decision tree classifier% %   W = TREEC(A,CRIT,PRUNE,T)% % Computation of a decision tree classifier out of a dataset A using % a binary splitting criterion CRIT:%   INFCRIT  -  information gain%   MAXCRIT  -  purity (gini value)%   FISHCRIT -  Fisher criterion% % Pruning is defined by prune:%   PRUNE = -1 pessimistic pruning as defined by Quinlan. %   PRUNE = -2 testset pruning using the dataset T, or, if not%              supplied, an artificially generated testset of 5 x size of%              the training set based on parzen density estimates.%              see PARZENML and GENDATP.%   PRUNE = 0 no pruning (default).%   PRUNE > 0 early pruning, e.g. prune = 3%   PRUNE = 10 causes heavy pruning.% % see also DATASETS, MAPPINGS, TREE_MAP% Copyright: R.P.W. Duin, duin@ph.tn.tudelft.nl% Faculty of Applied Sciences, Delft University of Technology% P.O. Box 5046, 2600 GA Delft, The Netherlands% $Id: treec.m,v 1.9 2004/01/06 07:36:34 bob Exp $function w = treec(a,crit,prune,t)	prtrace(mfilename);	% When no input data is given, an empty tree is defined:	if nargin == 0 | isempty(a)		if nargin <2, 			w = mapping('treec');		elseif nargin < 3, w = mapping('treec',crit);		elseif nargin < 4, w = mapping('treec',{crit,prune});		else, w = mapping('treec',{crit,prune,t});		end		w = setname(w,'Decision Tree');		return	end	% Given some data, a tree can be trained		islabtype(a,'crisp');	isvaldset(a,1,2); % at least 1 object per class, 2 classes	% First get some useful parameters:	[m,k,c] = getsize(a);	nlab = getnlab(a);	% Define the splitting criterion:	if nargin == 1 | isempty(crit), crit = 2; end	if ~isstr(crit)		if crit == 0 | crit == 1, crit = 'infcrit'; 		elseif crit == 2, crit = 'maxcrit';		elseif crit == 3, crit = 'fishcrit';		else, error('Unknown criterion value');		end	end	% Now the training can start:	if (nargin == 1) | (nargin == 2)		tree = maketree(+a,nlab,c,crit);	elseif nargin > 2		% We have to apply a pruning strategy:		if prune == -1, prune = 'prunep'; end		if prune == -2, prune = 'prunet'; end		% The strategy can be prunep/prunet:		if isstr(prune)			tree = maketree(+a,nlab,c,crit);			if prune == 'prunep'				tree = prunep(tree,a,nlab);			elseif prune == 'prunet'				if nargin < 4					t = gendatp(a,5*sum(nlab==1));				end				tree = prunet(tree,t);			else				error('unknown pruning option defined');			end		else			% otherwise the tree is just cut after level 'prune'			tree = maketree(+a,nlab,c,crit,prune);		end	else		error('Wrong number of parameters')	end	% Store the results:	w = mapping('tree_map','trained',{tree,1},getlablist(a),k,c);	w = setname(w,'Decision Tree');	w = setcost(w,a);		return%MAKETREE General tree building algorithm% % 	tree = maketree(A,nlab,c,crit,stop)% % Constructs a binary decision tree using the criterion function% specified in the string crit ('maxcrit', 'fishcrit' or 'infcrit' % (default)) for a set of objects A. stop is an optional argument % defining early stopping according to the Chi-squared test as % defined by Quinlan [1]. stop = 0 (default) gives a perfect tree % (no pruning) stop = 3 gives a pruned version stop = 10 a heavily % pruned version. % % Definition of the resulting tree:% % 	tree(n,1) - feature number to be used in node n% 	tree(n,2) - threshold t to be used% 	tree(n,3) - node to be processed if value <= t% 	tree(n,4) - node to be processed if value > t% 	tree(n,5:4+c) - aposteriori probabilities for all classes in% 			node n% % If tree(n,3) == 0, stop, class in tree(n,1)% % This is a low-level routine called by treec.% % See also infstop, infcrit, maxcrit, fishcrit and mapt.% Authors: Guido te Brake, TWI/SSOR, Delft University of Technology%     R.P.W. Duin, TN/PH, Delft University of Technology% Copyright: R.P.W. Duin, duin@ph.tn.tudelft.nl% Faculty of Applied Physics, Delft University of Technology% P.O. Box 5046, 2600 GA Delft, The Netherlandsfunction tree = maketree(a,nlab,c,crit,stop) 	prtrace(mfilename);	[m,k] = size(a); 	if nargin < 5, stop = 0; end;	if nargin < 4, crit = []; end;	if isempty(crit), crit = 'infcrit'; end;	% Construct the tree:	% When all objects have the same label, create an end-node:	if all([nlab == nlab(1)]) 		% Avoid giving 0-1 probabilities, but 'regularize' them a bit using		% a 'uniform' Bayesian prior:		p = ones(1,c)/(m+c); p(nlab(1)) = (m+1)/(m+c);		tree = [nlab(1),0,0,0,p];	else		% now the tree is recursively constructed further:		[f,j,t] = feval(crit,+a,nlab); % use desired split criterion		if isempty(t)			crt = 0;		else			crt = infstop(+a,nlab,j,t);    % use desired early stopping criterion		end		p = sum(expandd(nlab),1);		if length(p) < c, p = [p,zeros(1,c-length(p))]; end		% When the stop criterion is not reached yet, we recursively split		% further:		if crt > stop			% Make the left branch:			J = find(a(:,j) <= t);			tl = maketree(+a(J,:),nlab(J),c,crit,stop);			% Make the right branch:			K = find(a(:,j) > t);			tr = maketree(+a(K,:),nlab(K),c,crit,stop);			% Fix the node labelings before the branches can be 'glued'			% together to a big tree:			[t1,t2] = size(tl);			tl = tl + [zeros(t1,2) tl(:,[3 4])>0 zeros(t1,c)];			[t3,t4] = size(tr);			tr = tr + (t1+1)*[zeros(t3,2) tr(:,[3 4])>0 zeros(t3,c)];			% Make the complete tree: the split-node and the branches:			tree= [[j,t,2,t1+2,(p+1)/(m+c)]; tl; tr]; 		else			% We reached the stop criterion, so make an end-node:			[mt,cmax] = max(p);			tree = [cmax,0,0,0,(p+1)/(m+c)];		end	end	return%MAXCRIT Maximum entropy criterion for best feature split.% % 	[f,j,t] = maxcrit(A,nlabels)% % Computes the value of the maximum purity f for all features over % the data set A given its numeric labels. The criterion used is the % gini value at all class minimum and maximum values for all % features [1]. j is the optimum feature, t its threshold. This is a % low level routine called for constructing decision trees.% % [1] L. Breiman, J.H. Friedman, R.A. Olshen, and C.J. Stone, % Classification and regression trees, Wadsworth, California, 1984. % Copyright: R.P.W. Duin, duin@ph.tn.tudelft.nl % Faculty of Applied Physics, Delft University of Technology% P.O. Box 5046, 2600 GA Delft, The Netherlandsfunction [f,j,t] = maxcrit(a,nlab)	prtrace(mfilename);	[m,k] = size(a);	c = max(nlab);	% -variable T is an (2c)x k matrix containing:	%      minimum feature values class 1	%      maximum feature values class 1	%      minimum feature values class 2	%      maximum feature values class 2	%            etc.	% -variable R (same size) contains:	%      fraction of objects which is < min. class 1.	%      fraction of objects which is > max. class 1.	%      fraction of objects which is < min. class 2.	%      fraction of objects which is > max. class 2.	%            etc.	% These values are collected and computed in the next loop:	T = zeros(2*c,k); R = zeros(2*c,k);	for j = 1:c		L = (nlab == j);		if sum(L) == 0			T([2*j-1:2*j],:) = zeros(2,k);			R([2*j-1:2*j],:) = zeros(2,k);		else			T(2*j-1,:) = min(a(L,:),[],1);			R(2*j-1,:) = sum(a < ones(m,1)*T(2*j-1,:),1);			T(2*j,:) = max(a(L,:),[],1);			R(2*j,:) = sum(a > ones(m,1)*T(2*j,:),1);		end	end	% From R the purity index for all features is computed:	G = R .* (m-R);	% and the best feature is found:	[gmax,tmax] = max(G,[],1);	[f,j] = max(gmax);	Tmax = tmax(j);	if Tmax ~= 2*floor(Tmax/2)		t = (T(Tmax,j) + max(a(find(a(:,j) < T(Tmax,j)),j)))/2;	else		t = (T(Tmax,j) + min(a(find(a(:,j) > T(Tmax,j)),j)))/2;	end	return%INFCRIT The information gain and its the best feature split.% % 	[f,j,t] = infcrit(A,nlabels)% % Computes over all features the information gain f for its best % threshold from the dataset A and its numeric labels. For f=1: % perfect discrimination, f=0: complete mixture. j is the optimum % feature, t its threshold. This is a lowlevel routine called for 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品视频在线看| 蜜臀国产一区二区三区在线播放 | 精品免费日韩av| 亚洲欧美日韩在线不卡| 裸体在线国模精品偷拍| 色婷婷久久99综合精品jk白丝| 精品久久国产字幕高潮| 日韩精品电影一区亚洲| 99精品国产视频| 国产欧美一区二区精品性| 免费成人在线观看| 欧美日韩aaaaaa| 一二三区精品福利视频| 99精品在线观看视频| 国产网红主播福利一区二区| 麻豆91在线播放免费| 欧美美女网站色| 亚洲成人激情社区| 91传媒视频在线播放| 亚洲人成亚洲人成在线观看图片| 国产成人在线免费| 精品国产区一区| 国内精品自线一区二区三区视频| 7777精品伊人久久久大香线蕉 | 欧美精品九九99久久| 亚洲欧美综合色| 成人国产精品免费网站| 国产日产欧美精品一区二区三区| 极品少妇一区二区三区精品视频 | 中文av一区二区| 国产99久久精品| 国产区在线观看成人精品| 国产福利一区二区| 欧美国产日产图区| jizz一区二区| 亚洲伦理在线免费看| 91丨porny丨最新| 2021中文字幕一区亚洲| 久久精品国产成人一区二区三区 | 在线免费观看日本欧美| 亚洲欧美另类图片小说| 色视频成人在线观看免| 亚洲高清视频的网址| 制服丝袜中文字幕亚洲| 久久精品国产成人一区二区三区 | 国产成人午夜电影网| 中文字幕在线视频一区| 色狠狠综合天天综合综合| 亚洲大型综合色站| 日韩一区二区三区av| 国产毛片一区二区| 亚洲婷婷综合色高清在线| 精品视频1区2区| 国产在线视频一区二区| 亚洲日本在线a| 欧美一区二区三区性视频| 国产一区二区三区四| 亚洲人成精品久久久久久| 欧美日本一区二区三区四区 | 99视频精品免费视频| 一区二区视频免费在线观看| 国产精品久久看| 综合激情网...| 日韩三级视频在线观看| 国产不卡视频在线播放| 亚洲大型综合色站| 国产情人综合久久777777| 91亚洲精品久久久蜜桃| 日韩精品一区在线| 99久久免费视频.com| 日本在线不卡一区| 成人欧美一区二区三区小说| 91精品午夜视频| 不卡的看片网站| 精品亚洲成a人| 亚洲va韩国va欧美va| 国产欧美日韩麻豆91| 日韩一区二区视频在线观看| www.欧美色图| 久久超碰97人人做人人爱| 亚洲视频在线一区二区| 久久久久久久综合日本| 欧美精品黑人性xxxx| 91色九色蝌蚪| 国产91丝袜在线18| 美女网站色91| 亚洲成人激情av| 自拍偷拍国产精品| 欧美国产日韩一二三区| 日韩三级电影网址| 欧美日韩一区二区三区在线看| 国产成a人无v码亚洲福利| 蜜臀久久久久久久| 亚洲不卡av一区二区三区| 中文字幕色av一区二区三区| 精品国产乱码久久久久久影片| 欧美日韩精品二区第二页| 色综合天天在线| 国产91综合网| 国产美女av一区二区三区| 日本人妖一区二区| 日韩专区在线视频| 亚洲成人动漫在线免费观看| 一区二区不卡在线播放| 亚洲图片激情小说| 中文字幕一区av| 日韩毛片在线免费观看| 国产精品福利一区二区三区| 中文字幕欧美激情| 久久久久99精品国产片| 欧美精品一区二区三区视频| 日韩视频一区二区| 欧美va在线播放| 精品久久久久一区二区国产| 精品久久久久av影院| 欧美精品一区二区久久久| 日韩精品中午字幕| 久久伊人蜜桃av一区二区| 亚洲精品一区二区三区福利| 26uuu色噜噜精品一区二区| 欧美精品一区二区久久婷婷| 精品成人私密视频| 久久精品一区二区| 中文在线一区二区 | 欧美一级片在线| 欧美一级黄色大片| 777午夜精品免费视频| 日韩一区二区电影网| 欧美精品一区二区久久婷婷| 久久精品男人天堂av| 国产精品久久久久久久久晋中 | 久久网这里都是精品| 国产三级精品在线| 日韩一区日韩二区| 亚洲一区二区三区视频在线播放 | 欧美一级艳片视频免费观看| 精品精品国产高清a毛片牛牛| 337p粉嫩大胆色噜噜噜噜亚洲 | 日韩欧美www| 久久久亚洲精品石原莉奈| 欧美国产日韩精品免费观看| 夜夜精品视频一区二区| 麻豆一区二区在线| 午夜欧美在线一二页| 蜜臂av日日欢夜夜爽一区| 国产成人福利片| 欧洲一区二区三区免费视频| 欧美精品1区2区3区| 久久精品日产第一区二区三区高清版 | 久久九九久精品国产免费直播| 中文字幕一区二区在线播放| 午夜免费欧美电影| 国产91精品一区二区麻豆网站| 欧美亚洲愉拍一区二区| 欧美精品一区二区三区高清aⅴ| 综合久久一区二区三区| 久久国内精品视频| 在线观看网站黄不卡| 26uuu色噜噜精品一区| 亚洲一区二区综合| 国产成人午夜精品影院观看视频 | 欧美日韩在线一区二区| 久久综合视频网| 亚洲午夜电影在线| 成人美女视频在线看| 日韩欧美精品在线视频| 亚洲精品国产无套在线观| 韩国三级电影一区二区| 欧美午夜精品一区二区蜜桃| 欧美极品少妇xxxxⅹ高跟鞋| 日本成人在线视频网站| 色妹子一区二区| 欧美国产成人在线| 另类专区欧美蜜桃臀第一页| 色综合一个色综合| 国产网站一区二区三区| 日本免费新一区视频| 欧美午夜精品久久久久久超碰| 国产精品日产欧美久久久久| 激情综合五月天| 欧美一区二区三区在线观看| 亚洲国产人成综合网站| 99re视频这里只有精品| 中文字幕精品三区| 国产成人精品综合在线观看| 欧美大片一区二区| 另类小说一区二区三区| 欧美美女黄视频| 亚洲va在线va天堂| 欧美亚洲日本国产| 亚洲一区二区在线免费观看视频| av成人免费在线| 成人免费在线观看入口| 成人深夜在线观看| 国产精品网站在线播放| 国产精品一线二线三线精华| 精品国产91洋老外米糕| 国产精品一色哟哟哟| 国产精品久久久久影院色老大| 成人精品国产福利|