フィルターのクリア

How does predict work for decision trees?

1 回表示 (過去 30 日間)
HSch
HSch 2017 年 3 月 26 日
回答済み: Anoop Somashekar 2017 年 3 月 30 日
So as far as I understand it, any input gets classified according to the structure of the trained tree and its leaves. But how does the cost-matrix that can be specified come into play if the prediction itself is fixed? (The documentation states that the cost is considered at the prediction process, but isn't it really already considered when the tree is constructed?)
http://de.mathworks.com/help/stats/compactclassificationtree.predict.html Especially the 'Predict Class Label' definition does not make any sense to me if the tree is completely determined already.
Would really appreciate help with this since it is urgent and completely confuses me.

回答 (1 件)

Anoop Somashekar
Anoop Somashekar 2017 年 3 月 30 日
Cost matrix is used while building the tree as described in the fitctree document. By default, the cost is 0 for correct classification, and 1 for incorrect classification. It can be overridden by specifying cost name-value pair while using 'fitctree' method. If the cost matrix is specified in 'fitctree' method then the tree structure might be different as compared to the tree structure built using default cost matrix.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by