regression tree/classification tree, tree depth, dont understand synatx
3 ビュー (過去 30 日間)
古いコメントを表示
Can someone explain me the following syntax (especially the one in bold), which is used in order to determine the optimal tree depth of a regression tree/classification tree: Generate minimum leaf occupancies for classification trees from 10 to 100, spaced exponentially apart:
leafs = logspace(1,2,10);
Create cross validated classification trees for the ionosphere data with minimum leaf occupancies from leafs:
rng('default') N = numel(leafs); err = zeros(N,1); for n=1:N t = ClassificationTree.fit(X,Y,'crossval','on',... 'minleaf',leafs(n)); err(n) = kfoldLoss(t); end plot(leafs,err); xlabel('Min Leaf Size'); ylabel('cross-validated error');
You can also find it under http://www.mathworks.de/de/help/stats/classification-trees-and-regression-trees.html#bsw6p3v . Also does anyone know how the default tree depth is generated? Any help on this question is very welcome, thank you!:)
0 件のコメント
採用された回答
Alan Weiss
2014 年 7 月 1 日
doc logspace
y = logspace(a,b,n) generates n points between decades 10^a and 10^b.
doc rng
rng('default') puts the settings of the random number generator used by rand, randi, and randn to their default values so that they produce the same random numbers as if you restarted MATLAB. The default settings are the Mersenne Twister with seed 0.
doc kfoldLoss
Well, you get the idea. If, after reading the documentation, you still have some questions, feel free to ask again.
Alan Weiss
MATLAB mathematical toolbox documentation
2 件のコメント
Alan Weiss
2014 年 8 月 1 日
I cannot add anything to the documentation, sorry--the documented description of pruning and methods of setting the leafiness are about the depth of my knowledge.
Alan Weiss
MATLAB mathematical toolbox documentation
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Gaussian Process Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!