Revision 595bec19
Added by Benoit Parmentier almost 12 years ago
climate/research/oregon/interpolation/GAM_fusion_analysis_raster_prediction_multisampling.R | ||
---|---|---|
11 | 11 |
#5)GAM fusion: possibilty of running GAM+FUSION or GAM+CAI and other options added |
12 | 12 |
#The interpolation is done first at the monthly time scale then delta surfaces are added. |
13 | 13 |
#AUTHOR: Benoit Parmentier |
14 |
#DATE: 03/12/2013
|
|
14 |
#DATE: 03/18/2013
|
|
15 | 15 |
#PROJECT: NCEAS INPLANT: Environment and Organisms --TASK#568-- |
16 | 16 |
################################################################################################### |
17 | 17 |
|
... | ... | |
76 | 76 |
|
77 | 77 |
source(file.path(script_path,"sampling_script_functions_03122013.R")) |
78 | 78 |
source(file.path(script_path,"GAM_fusion_function_multisampling_03122013.R")) |
79 |
source(file.path(script_path,"GAM_fusion_function_multisampling_validation_metrics_03122013.R"))
|
|
79 |
source(file.path(script_path,"GAM_fusion_function_multisampling_validation_metrics_03182013.R"))
|
|
80 | 80 |
|
81 | 81 |
|
82 | 82 |
###################### START OF THE SCRIPT ######################## |
... | ... | |
240 | 240 |
##Write out information concerning accuracy and predictions |
241 | 241 |
outfile<-file.path(in_path,paste("assessment_measures_",out_prefix,".txt",sep="")) |
242 | 242 |
write.table(tb_diagnostic_v,file= outfile,row.names=FALSE,sep=",") |
243 |
write.table(summary_metrics[[1]], file= outfile, append=TRUE,sep=",") #write out avg
|
|
244 |
write.table(summary_metrics[[2]], file= outfile, append=TRUE,sep=",") #write out median
|
|
243 |
write.table(x=as.data.frame(summary_metrics[[1]]), file= outfile, append=TRUE,sep=",") #write out avg
|
|
244 |
write.table(x=as.data.frame(summary_metrics[[2]]), file= outfile, append=TRUE,sep=",") #write out median
|
|
245 | 245 |
|
246 | 246 |
#################### CLOSE LOG FILE #################### |
247 | 247 |
|
... | ... | |
258 | 258 |
################### PREPARE RETURN OBJECT ############### |
259 | 259 |
#Will add more information to be returned |
260 | 260 |
|
261 |
raster_prediction_obj<-list(gamclim_fus_mod,gam_fus_mod,gam_fus_validation_mod,tb_diagnostic_v) |
|
262 |
names(raster_prediction_obj)<-c("gamclim_fus_mod","gam_fus_mod","gam_fus_validation_mod","tb_diagnostic_v") |
|
261 |
raster_prediction_obj<-list(gamclim_fus_mod,gam_fus_mod,gam_fus_validation_mod,tb_diagnostic_v,summary_metrics) |
|
262 |
names(raster_prediction_obj)<-c("gamclim_fus_mod","gam_fus_mod","gam_fus_validation_mod","tb_diagnostic_v", |
|
263 |
"summary_metrics_v") |
|
263 | 264 |
save(raster_prediction_obj,file= paste("raster_prediction_obj_",out_prefix,".RData",sep="")) |
264 | 265 |
|
265 | 266 |
return(raster_prediction_obj) |
Also available in: Unified diff
Raster prediction gam fusion, modification in validation and output object