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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? treec.m

?? 模式識(shí)別常用功能函數(shù)
?? M
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
%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 (default)%   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, r.p.w.duin@prtools.org% Faculty EWI, Delft University of Technology% P.O. Box 5031, 2600 GA Delft, The Netherlands% $Id: treec.m,v 1.13 2006/09/14 19:29:04 duin 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. 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 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美大片日本大片免费观看| 欧美天堂一区二区三区| 欧美精品一区二| 精品一区二区国语对白| 欧美一区二区日韩| 另类小说视频一区二区| 精品日韩一区二区三区免费视频| 免费成人小视频| 国产偷国产偷精品高清尤物| 大桥未久av一区二区三区中文| 中文字幕免费不卡| 91丨porny丨国产| 天天综合网天天综合色| 欧美一区二区人人喊爽| 国产精品亚洲视频| 亚洲欧美另类小说视频| 在线观看91精品国产麻豆| 美女视频一区在线观看| 欧美高清在线精品一区| 日韩精品综合一本久道在线视频| 国产在线日韩欧美| 亚洲欧美在线另类| 欧美一区二区三区视频在线观看| 狠狠色丁香婷综合久久| 中文字幕在线观看不卡| 欧美少妇xxx| 国产成人免费在线视频| 亚洲欧美韩国综合色| 日韩欧美在线网站| 成人综合在线网站| 日韩精品视频网站| 国产精品久久午夜夜伦鲁鲁| 日本高清免费不卡视频| 久久99热这里只有精品| 中文字幕亚洲在| 欧美一区二区三区人| 丁香婷婷综合激情五月色| 亚洲午夜激情av| 国产女主播一区| 欧美精品1区2区| 成人久久视频在线观看| 免播放器亚洲一区| 中文字幕一区二区在线观看| 日韩视频免费直播| 欧洲精品一区二区| 国产精品中文欧美| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产精品久久综合| 久久在线观看免费| 91麻豆精品久久久久蜜臀| 91色视频在线| 国产精品影音先锋| 麻豆精品在线看| 亚洲五码中文字幕| 亚洲图片激情小说| 久久久久久久久蜜桃| 欧美一区三区四区| 一本大道久久a久久精品综合| 国产成人免费在线| 国产又粗又猛又爽又黄91精品| 亚洲香肠在线观看| 亚洲毛片av在线| 国产精品色哟哟| 久久这里只精品最新地址| 91.com视频| 欧美男男青年gay1069videost| 99国产精品久| 暴力调教一区二区三区| 国产91丝袜在线观看| 国产在线视视频有精品| 久久精品国产亚洲一区二区三区| 亚洲va韩国va欧美va| 亚洲线精品一区二区三区八戒| 亚洲精品网站在线观看| 综合久久久久久| 国产精品美女一区二区| 日本一区二区高清| 国产色产综合色产在线视频| 久久久精品2019中文字幕之3| 日韩欧美黄色影院| 精品成人免费观看| 久久综合九色综合欧美就去吻| 精品国产精品网麻豆系列| 欧美一个色资源| 精品国产网站在线观看| 欧美mv日韩mv亚洲| 精品1区2区在线观看| 欧美精品一区二区久久久| 国产精品日产欧美久久久久| 久久综合久久综合九色| 欧美激情在线一区二区| 日本一区免费视频| 亚洲美女淫视频| 亚洲国产成人精品视频| 男男gaygay亚洲| 久久丁香综合五月国产三级网站| 韩国三级电影一区二区| 国产乱国产乱300精品| 不卡的电视剧免费网站有什么| 国产99精品视频| 99视频一区二区三区| 91成人网在线| 在线综合亚洲欧美在线视频| 精品99999| 国产精品女上位| 亚洲图片欧美色图| 日韩黄色片在线观看| 开心九九激情九九欧美日韩精美视频电影| 日本不卡的三区四区五区| 国产精品中文欧美| 91在线观看高清| 精品视频在线免费看| 日韩精品一区二区三区老鸭窝| 国产欧美久久久精品影院| 日韩一区中文字幕| 日韩—二三区免费观看av| 国产高清不卡一区二区| 91蝌蚪porny| 91精品一区二区三区在线观看| 久久综合九色综合97婷婷| 亚洲人被黑人高潮完整版| 免费精品视频最新在线| 粉嫩绯色av一区二区在线观看| 91老师国产黑色丝袜在线| 欧美一区二区视频在线观看| 久久人人97超碰com| 亚洲乱码国产乱码精品精小说| 视频在线在亚洲| 99re热这里只有精品视频| 69精品人人人人| 国产精品另类一区| 五月天亚洲婷婷| 成人蜜臀av电影| 欧美一区二区三区四区视频| 国产精品美女久久久久aⅴ| 日韩和欧美一区二区三区| av电影在线观看不卡| 欧美一区二区三区小说| 亚洲人精品午夜| 国产在线视频一区二区| 欧美日韩亚洲丝袜制服| 国产精品第一页第二页第三页| 日韩国产高清影视| 色综合天天综合网国产成人综合天 | 国产亚洲一区二区在线观看| 亚洲综合精品自拍| 风间由美一区二区av101| 在线成人av网站| 亚洲激情av在线| 91亚洲精品一区二区乱码| 久久综合久久鬼色中文字| 日本女人一区二区三区| 在线观看视频一区二区欧美日韩| 国产精品视频在线看| 国产一区视频导航| 欧美电影免费观看高清完整版 | 色播五月激情综合网| 欧美激情综合在线| 国产综合成人久久大片91| 成人免费一区二区三区在线观看| 麻豆成人免费电影| 91精品国产一区二区| 亚洲第一二三四区| 欧美性xxxxxx少妇| 一区二区三区日韩欧美| av中文一区二区三区| 久久青草国产手机看片福利盒子| 日韩在线一二三区| 欧美一级在线观看| 日韩av一级电影| 欧美一区二区视频观看视频| 偷拍自拍另类欧美| 欧美日韩精品一区二区三区四区| 亚洲自拍偷拍欧美| 91精彩视频在线观看| 一级做a爱片久久| 在线精品视频一区二区| 亚洲午夜久久久久久久久电影院| 在线精品亚洲一区二区不卡| 一区二区三区在线视频观看58| 色菇凉天天综合网| 亚洲综合色噜噜狠狠| 欧美日韩久久一区二区| 亚洲va中文字幕| 日韩三区在线观看| 美日韩一区二区三区| 久久综合九色综合97_久久久 | 夜夜嗨av一区二区三区四季av| 色婷婷久久99综合精品jk白丝| 亚洲精品视频免费观看| 一本高清dvd不卡在线观看| 亚洲色图欧美激情| 欧美色精品天天在线观看视频| 日日噜噜夜夜狠狠视频欧美人 | 欧美国产日韩a欧美在线观看| 成人午夜在线免费| 亚洲免费观看高清| 337p亚洲精品色噜噜| 久久精品国产亚洲5555| 国产亚洲一区二区在线观看|