5/11/2023 0 Comments Raster effectsSSURGO_ESRI_DRAINAGE_RE_4 <- raster("SSURGO_ESRI_drainage_reclass_nulfill_4.tif.tif") SSURGO_ESRI_DRAINAGE_RE_3 <- raster("SSURGO_ESRI_drainage_reclass_nulfill_3.tif.tif") SSURGO_ESRI_DRAINAGE_RE_2 <- raster("SSURGO_ESRI_drainage_reclass_nulfill_2.tif.tif") LOC_SD_SLOPE <- raster("loc_sd_slope_s.tif.tif") LOC_REL_RE <- raster("loc_rel_re_s.tif.tif") I then take rasters corresponding to these same predictors across my entire study area and combine them into a raster stack: #plot model predictionsĬOST_DIST_ECOTONE <- raster("cost_dist_ecotone_s.tif.tif")ĬOST_DIST_HEA <- raster("cost_dist_hea_s.tif.tif")ĬOST_DIST_MEDSTR <- raster("cost_dist_medstr_s.tif.tif")ĬOST_DIST_RIV_COAST <- raster("cost_dist_riv_coast_s.tif.tif")ĭEM30_ASP_RE_2 <- raster("dem30_asp_rel_2.tif.tif")ĭEM30_ASP_RE_3 <- raster("dem30_asp_rel_3.tif.tif")ĭEM30_ASP_RE_4 <- raster("dem30_asp_rel_4.tif.tif")ĭEM30_ASP_RE_5 <- raster("dem30_asp_rel_5.tif.tif")ĭEM30_SLOPE <- raster("dem30_slope_s.tif.tif") Rf1 <- randomForest(formula=SITE_NONSITE ~., data=dcc.s.dummy, ntree=500, mtry=10)ĭcc.s.dummy includes the following data: str(dcc.s.dummy) ![]() The RF model is built to predict a 0/1 binary variable SITE_NONSITE using different environmental and geophysical data. ![]() ![]() I fit a Random Forest model to tabular data from test sites in R, and now would like to generate a raster showing predicted probability values using raster data corresponding to the same predictors (e.g., slope, elevation, pH) that are in the model.
0 Comments
Leave a Reply. |