Subject: Marine Geospatial Ecology Tools (MGET) help
Text archives
From: | Anders Knudby <> |
---|---|
To: | |
Subject: | [mget-help] Random Forest predictions |
Date: | Thu, 1 Nov 2012 17:31:46 -0700 (PDT) |
Hi, I've been comparing your Random Forest tools to an R script I wrote
myself, here's what I find.
From "Fit Random Forest Model" I get very similar results to my own
(accounting for slight differences from RF inherent randomness). All good.
From "Predict Random Forest from Rasters" I've tried very hard and I
absolutely can't get the same results as I get with this command from R:
predictions = predict(rf_model, newdata=df, type="prob"). Obviously
"rf_model" is my model (which I can get from the randomForest command or
MGET, no difference). "df" has the data I read from my rasters (presumably
identical to what MGET does, I also use .asc files). Is it the type="prob"
command that is the issue? In the randomForest help I see type options of
"response", "prob" or "vote". My assumption is that if I don't provide a
"binary classification cutoff", MGET would use type="prob". Right?
Any pointers?
Anders
myself, here's what I find.
From "Fit Random Forest Model" I get very similar results to my own
(accounting for slight differences from RF inherent randomness). All good.
From "Predict Random Forest from Rasters" I've tried very hard and I
absolutely can't get the same results as I get with this command from R:
predictions = predict(rf_model, newdata=df, type="prob"). Obviously
"rf_model" is my model (which I can get from the randomForest command or
MGET, no difference). "df" has the data I read from my rasters (presumably
identical to what MGET does, I also use .asc files). Is it the type="prob"
command that is the issue? In the randomForest help I see type options of
"response", "prob" or "vote". My assumption is that if I don't provide a
"binary classification cutoff", MGET would use type="prob". Right?
Any pointers?
Anders
Archives powered by MHonArc.