Don’t Crash Your Laptop While Running Random Forest in R

Or more specifically, be careful to manage your machine’s resources if you decide to run parallel jobs using RStudio. The latest version of RStudio makes it very easy to set up multiple jobs at the same time. All you need to do is put the code you’d like to run in a separate script, click on the arrow next to “Source” and select “Source as Local Job…”. Great!

What RStudio then does is create a new session of R in the background to process the code you’ve just submitted. This can be really useful if you have a process like the random forest model above that can take a long time to run. But notice in the pic below that having just a second instance of R open along with RStudio will use the bulk of your processing power.

If you are hard-headed like me an insist on running two models in parallel then you may crash your machine (as I did multiple times). So until I can get myself a more powerful machine, I’ll just have to learn to be more patient when going through the model building process.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s