Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6710289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:00:16+00:00 2026-05-26T08:00:16+00:00

After running a randomForest , I have an object RF that contains a bunch

  • 0

After running a randomForest, I have an object RF that contains a bunch of info. If I highlite the objects name and hit CTRL + R, I get the following:

> RF
    Call:
     randomForest(x = iris[-5], iris[5],      ntree = 50, sampsize = c(100), importance = TRUE,      do.trace = F, forest = TRUE) 
                   Type of random forest: regression
                         Number of trees: 50
    No. of variables tried at each split: 2

              Mean of squared residuals: 0.03852423
                        % Var explained: 13.13

My question is how would I just print the last line (% Var explained: 13.13)?
I know for some functions there is a call like hist$breaks that will give a specific part of the object. I can’t find anything similar for this object. Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:00:17+00:00Added an answer on May 26, 2026 at 8:00 am

    The % variance explained is supposed to be analogous to an R^2 type value. If you look at ?randomForest you’ll see that one of the values in the object is accessed via $rsq. Just multiply that by 100.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After running syncdb and creating a su, where does that get recorded? Settings.py doesn't
I have a poker blind timer Silverlight app that is losing time (after running
I currently have the following ValuesQuerySet object after running the following code: sites =
After running bundle update I have suddenly found that my cucumber tests are failing
I have an Android project that I recently published to the market after running
After running Valgrind, the resultant log file contains a number of errors that look
After running some usability tests, I found that participants opened a jQuery Lightbox to
After running the following SQL statements, you will see that, MySQL has automatically created
Is there an easy way to get a conflict summary after running a cvs
After running a bunch of simulations I'm going to be outputting the results into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.