⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prune_tree_points.m

📁 决策树算法的matlab实现
💻 M
字号:
function T = prune_tree_points(T,A,B,min_points)
% PRUNE_TREE_POINTS prunes the decision tree T as follows:  if any decision
%	node misclassifies less than min_points points, then this decision
%	node will be made a leaf node.
%
%	T = prune_tree_points(T,A,B,min_points)
%
%	T : matrix representing the decision tree generated by MSM-T algorithm
%	A : matrix representing the point set A
%	B : matrix representing the point set B
%	min_points: the minimum allowable number of misclassified points at
%		a decision node.
%
%	ASSUME: the root node will never be pruned.

% n is the dimension of the points in set A,B
global n;
n = size(A,2);

% prune the tree
position = [ 1 ];
T = prune_points(T,A,B,min_points,0,[position, T(n+2,1)]); % prune left
T = prune_points(T,A,B,min_points,1,[position, T(n+3,1)]); % prune right


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -