Skip to Content.

mget-help - RE: [mget-help] random forest in MGET

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


From: "Jason Roberts" <>
To: "'Ram Deo'" <>
Cc: "'Luis Miguel Verissimo'" <>, <>
Subject: RE: [mget-help] random forest in MGET
Date: Mon, 5 Nov 2012 16:36:45 -0500

Dear Ram,

 

Thanks for contacting us about MGET. I’m sorry about the problem you are seeing.

 

I am actively investigating this problem, among others, after being contacted by Luis Miguel Verissimo, a fellow colleague at your institution. Do know him? I added him to the CC list, in case he is interested in this problem as well.

 

The problem is that MGET uses the R randomForest package to fit these models, and that package seems to be limited in the syntax it will accept for model formulas. I can reproduce the error you obtained with your original formula:

 

tot_volcuf ~ modslope + tmndvi20 + avbawht + factor(cover)

 

Apparently the problem relates to how the randomForest package parses the formula and uses it to build an internal representation of the data passed into it. You can work around it with an ugly hack:

 

tot_volcuf ~ modslope + tmndvi20 + avbawht + factor(cover) - cover

 

In R syntax, the - cover means “do not use the variable cover as a predictor”. Well, simply omitting + cover accomplishes the same thing; it prevents cover from being used as a predictor. But by explicitly saying - cover, we trick R into not failing with the message you mentioned.

 

I do not completely understand this at a deep level yet, and I have not provided a full explanation of what I think is going on with R here, but you can try this as a quick workaround. Unfortunately, when you do, I suspect you will still encounter a problem when you try to run the MGET Predict Random Forest From Rasters tool. That tool fails when the model formula includes categorical variables, but for a different reason. I am working on that problem as well.

 

Sorry again for all of these problems. The Random Forest tools are new in MGET and I have not tested them very well. I should be able to provide a solution to these problems this week, however.

 

Best regards,

 

Jason

 

 

From: Ram Deo [mailto:]
Sent: Monday, November 05, 2012 2:58 PM
To:
Subject: [mget-help] random forest in MGET

 

Hello Sir,

 

I am a PhD student at Michigan Technological University, School of Forest Resources and Environmental Science. I found the ArcMap extension "Marine Geospatial Ecology Tools 0.8a45" very interesting, and relavant for my research work. I am trying to apply the "Fit Random Forest Model" to my reference data but I am continously getting an error message. I have one response variable (continuous) and four explanatory variables (one of them categorical) in my training data set. I am trying to fit a model of the form:

 

tot_volcuf ~ modslope + tmndvi20 + avbawht + factor(cover)

 

The error message that I am getting is: Error in factor(cover) : object 'cover' not found.

 

Herewith I have attached my data table. Could you please run the above model with my data? It would be a great help if you could suggest me the necessary steps and would be highly acknowledged.

 

Thanks in advance.

 

Sincerely,

Ram Kumar Deo

Ph.D. Student

School of Forest Resources and Environmental Science

Michigan Technological University

Houghton, MI-94431 

 

Archives powered by MHonArc.
Top of Page