[R] How might I -remove- a tree from a random forest?

From: David L. Van Brunt, Ph.D. <dlvanbrunt_at_gmail.com>
Date: Mon, 07 May 2007 21:51:57 -0400


I see the function "getTree", which is very interesting. As I'm trying to teach myself more and more about R, and dealing with lists, it occurred to me that it might be fun to remove (as in delete) a single tree from a forest...say to go from 500 to 499.

I know, I know... "why?"

Why, to play, of course!

I've been doing a lot of reading on various tuning parameters, and wanted to play with "thinning" as a demonstration project. Problem is, each "tree" is a different length (naturally), and when I try to set a portion (identified by examining the getTree function) to "NULL", I get an error about lengths not matching up.

Wondering if there's a tool somewhere out there to do this in a straightforward fashion, or any breadcrumbs to get me going. If this is a
"new" thing, I'll post the function when I'm done for others to play with
it, too.

-- 
---------------------------------------
David L. Van Brunt, Ph.D.
mailto:dlvanbrunt_at_gmail.com


"If Tyranny and Oppression come to this land, it will be in the guise of
fighting a foreign enemy." --James Madison [[alternative HTML version deleted]] ______________________________________________ R-help_at_stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Received on Tue 08 May 2007 - 01:59:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 08 May 2007 - 04:31:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.