Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Random Forest Regression

Hello,

I'm new to JASP, first of all thank you for this great program. I have two questions. Is it possible to calculate relative importance (%) in RFR (Random Forest Regression)? I don't know what the predicted values in RFR represent? I expected predicted values similar to the variable to be predicted

Thanks!

Comments

  • I'll ask our experts!

    E.J.

  • edited April 2020

    Hi vps2020,

    Great that you like the program and the machine learning module! To elaborate on your question regarding the relative importance of the variables in a random forest regression model, these can be requested in JASP via the "Variable importance" button, see image below. A click on this button produces the variable importance table.

    Relative importance can be measured in different ways. For a random forest regression, the values that JASP returns for the variable importance are, for each variable, the values for the mean decrese in accuracy and the total increase in node purity (see also https://www.displayr.com/how-is-variable-importance-calculated-for-a-random-forest/ for an explanation for how these are calculated, or the randomForest package manual for how these are calculated https://cran.r-project.org/web/packages/randomForest/randomForest.pdf). The first value is based on how much the predictive accuracy of the model decreases when the specific predictor variable is excluded, which is measured by the increase (in %) in mean squared error when the variable is excluded. The second measure is based on the decrease in Gini impurity (see also https://bambielli.com/til/2017-10-29-gini-impurity/) when a variable is chosen to split a node in the forest. More useful variables achieve higher increases in node purities.

    How do you say something about variable importance with these values? For both measures, the rule-of-thumb is that higher values relate to a higher variable importance. However, the mean decrese in accuracy is more robust. In the example above, the variable "Color" has the highest importance when predicting the amount of alcohol in wine, since its mean decrease in accuracy and total increase in node purity are the highest.

    When the variable "Color" is excluded from the analysis, the mean squared error of the random forest regression rises with 0.376%. The total increase in node purity when the variable "Color" is chosen to split a node is 11.441.

    The predicted values (when you click "Add predicted values to data") of the random forest regression are the values that your trained regression model predicts for your entire data set. These can be close to the actual values of the outcome variable, but that does not have to be the case. This depends on how well your predictor variables predict the outcome variable, and thus depends on the error that the model has.


    Best,

    Koen


    p.s. Here is the .jasp file I used

  • Hi koenderks,

    Thank you so much for your response. However, I do not understand the predicted values. Their range is on the example you sent me from -2 to 1, while the variable to be predicted (alcohol) is from 11 to 15. How do I interpret these values?

    Thank you in advance for any suggestions.


  • Hi vps2020,

    Good spot. That is because, by default, the predicted values are scaled/standardized to have a mean of zero and a standard deviation of one (see picture below). This is good practice in training a ml model, but this causes the predicted values to be in the range of the scaled variables as well.

    If you turn off the scaling option, the predicted values will be in the range of the actual values of the Alcohol variable. However, since the data for the model changes and so will the resulting outcomes (e.g., variable importance). JASP currently offers no option to scale back the predictions, but this might be a nice addition in the next release.

    Hope this helps!

  • Thanks a lot, koenderks 😀🤗 That seems to completely fix the issue.

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games