The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Pruning in decision trees - how to set penalty
Replies: 1   Last Post: Jan 25, 2013 4:27 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Ilya Narsky

Posts: 145
Registered: 11/7/08
Re: Pruning in decision trees - how to set penalty
Posted: Jan 25, 2013 4:27 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"C " <> wrote in message
> Hi, I have a question regarding the pruning of decision trees. I
> understand that the method used is to minimize the fitting error plus a
> penalty on the number of nodes:
> (resubsitution error) + penalty * (number of nodes)
> My question is, shouldn't the prune function allow us to set what the
> penalty weight is here? I don't see this as an option anywhere in the
> prune function.
> Thanks in advance.
> PS: I have seen this related question thread,

Strictly speaking, the criterion is

(resubsitution error) + penalty * (number of leaves)

You do have this option. Depending on what implementation you are using, do
one of: 'help ClassificationTree.prune', 'help RegressionTree.prune' or
'help classregtree.prune'. Look at the 'alpha' parameter. This parameter is
what you call the penalty weight. If you are using ClassificationTree or
RegressionTree, the cost penalty for the pruning levels is saved in the
PruneAlpha property.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.