[Robast-commits] r753 - in branches/robast-1.0/pkg/RobExtremes: R inst/AddMaterial/interpolation man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 16 11:25:02 CEST 2014


Author: ruckdeschel
Date: 2014-04-16 11:25:01 +0200 (Wed, 16 Apr 2014)
New Revision: 753

Modified:
   branches/robast-1.0/pkg/RobExtremes/R/interpolLM.R
   branches/robast-1.0/pkg/RobExtremes/inst/AddMaterial/interpolation/interpolationscripts.R
   branches/robast-1.0/pkg/RobExtremes/man/internal-interpolate.Rd
Log:
RobExtremes: continued with preparation of LM evaluation

Modified: branches/robast-1.0/pkg/RobExtremes/R/interpolLM.R
===================================================================
--- branches/robast-1.0/pkg/RobExtremes/R/interpolLM.R	2014-04-15 23:14:01 UTC (rev 752)
+++ branches/robast-1.0/pkg/RobExtremes/R/interpolLM.R	2014-04-16 09:25:01 UTC (rev 753)
@@ -30,9 +30,9 @@
                    maxiter = 150, tol = .Machine$double.eps^0.5,
                    loRad = 0, upRad = Inf, loRad0 = 1e-3,
                    loRad.s=0.2, up.Rad.s=1,
-                   withStartLM = TRUE, len = 13){
+                   withStartLM = TRUE, len = 13,namFzus =""){
              namF <- gsub("\\.th$","",paste(deparse(substitute(optF))))
-             namF <- gsub(" ", "",namF)
+             namF <- paste(gsub(" ", "",namF),namFzus,sep="")
              to <- gsub("XXXX",gsub(" ","",name(PFam)),
                     gsub("YYYY", namF, "interpolYYYYXXXX.csv"))
              print(to)

Modified: branches/robast-1.0/pkg/RobExtremes/inst/AddMaterial/interpolation/interpolationscripts.R
===================================================================
--- branches/robast-1.0/pkg/RobExtremes/inst/AddMaterial/interpolation/interpolationscripts.R	2014-04-15 23:14:01 UTC (rev 752)
+++ branches/robast-1.0/pkg/RobExtremes/inst/AddMaterial/interpolation/interpolationscripts.R	2014-04-16 09:25:01 UTC (rev 753)
@@ -6,28 +6,153 @@
 require(RobExtremes)
 ### -> change this according to where you checked out the svn repo:
 .basepath <- "C:/rtest/RobASt/branches/robast-1.0./pkg"
+.myFolderTo <- file.path(.basepath,"RobExtremesBuffer")
 ## <-
 oldwd <- getwd()
-.myFolderTo <- file.path(.basepath,"RobExtremesBuffer")
 setwd(.myFolderTo)
 .OMSE.th <- ROptEst:::.OMSE.th
 .MBRE.th <- ROptEst:::.MBRE.th
 .RMXE.th <- ROptEst:::.RMXE.th
 .modify.xi.PFam.call <- RobExtremes:::.modify.xi.PFam.call
 #
-#PF <- GParetoFamily()
-#PF <- GEVFamily()
-PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
-#PF <- GammaFamily()
-#PF <- WeibullFamily()
 ###
+xiGridpos <- getShapeGrid(700, cutoff.at.0=0.005)
+lxipos <- length(xiGridpos)
+(lxipos1 <- 1:(lxipos%/%4))
+(lxipos2 <- (1:(lxipos%/%4))+lxipos%/%4)
+(lxipos3 <- (1:(lxipos%/%4))+2*lxipos%/%4)
+(lxipos4 <- (1:lxipos)[-c(1:(3*(lxipos%/%4)))])
+xiGridpos1 <- xiGridpos[lxipos1]
+xiGridpos2 <- xiGridpos[lxipos2]
+xiGridpos3 <- xiGridpos[lxipos3]
+xiGridpos4 <- xiGridpos[lxipos4]
+xiGridneg <- seq(-1/2+0.005,-0.005,length=150)
+
 .svInt <- RobExtremes:::.svInt
-#.svInt1 <- function(){
-#    RobExtremes:::.generateInterpGridSn(PFam = PF)}
+###
+#
 ## to make this parallel, start this on several processors
-#.svInt1()
-#.svInt(.OMSE.th, PFam=PF, xiGrid = getShapeGrid(3, cutoff.at.0=0.005))
-#.svInt(.OMSE.th, PFam=PF)
-#.svInt(.MBRE.th, PFam=PF)
-.svInt(.RMXE.th, PFam=PF)
+#
+# compute the interpolation grid of Lagrange multiplier values
+#   (still not as interpolators, still not yet smoothed)
+#
+### Block01--Block15: GEVFamilyMuUnknown
+#    Block01--Block05: RMXE, (pos1, pos2, pos3, pos4, neg)
+#    Block06--Block10: OMSE, (pos1, pos2, pos3, pos4, neg)
+#    Block11--Block15: MBRE, (pos1, pos2, pos3, pos4, neg)
+##
+### Block16--Block18: GEVFamily, negative xi: RMXE, OMSE, MBRE
+#
+### Block18--Block21: GParetoFamily, negative xi: RMXE, OMSE, MBRE
+#
+# in the end, the results are stored in files like
+#   interpol.OMSEpos1GEVUFamily.csv in
+#
+if(FALSE){
+  ## Block01::      interpol.RMXEpos1GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.RMXE.th, PFam=PF, xiGrid = xiGridpos1,namFzus="pos1")
+}
+if(FALSE){
+  ## Block02::      interpol.RMXEpos2GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.RMXE.th, PFam=PF, xiGrid = xiGridpos2,namFzus="pos2")
+}
+if(FALSE){
+  ## Block03::      interpol.RMXEpos3GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.RMXE.th, PFam=PF, xiGrid = xiGridpos3,namFzus="pos3")
+}
+if(FALSE){
+  ## Block04::      interpol.RMXEpos4GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.RMXE.th, PFam=PF, xiGrid = xiGridpos4,namFzus="pos4")
+}
+if(FALSE){
+  ## Block05::      interpol.RMXEnegGEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.RMXE.th, PFam=PF, xiGrid = xiGridneg,namFzus="neg")
+}
+if(FALSE){
+  ## Block06::      interpol.OMSEpos1GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.OMSE.th, PFam=PF, xiGrid = xiGridpos1,namFzus="pos1")
+}
+if(FALSE){
+  ## Block07::      interpol.OMSEpos2GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.OMSE.th, PFam=PF, xiGrid = xiGridpos2,namFzus="pos2")
+}
+if(FALSE){
+  ## Block08::      interpol.OMSEpos3GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.OMSE.th, PFam=PF, xiGrid = xiGridpos4,namFzus="pos3")
+}
+if(FALSE){
+  ## Block09::      interpol.OMSEpos4GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.OMSE.th, PFam=PF, xiGrid = xiGridpos3,namFzus="pos4")
+}
+if(FALSE){
+  ## Block10::      interpol.OMSEnegGEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.OMSE.th, PFam=PF, xiGrid = xiGridneg,namFzus="neg")
+}
+if(FALSE){
+  ## Block11::      interpol.MBREpos1GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.MBRE.th, PFam=PF, xiGrid = xiGridpos1,namFzus="pos1")
+}
+if(FALSE){
+  ## Block12::      interpol.MBREpos2GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.MBRE.th, PFam=PF, xiGrid = xiGridpos2,namFzus="pos2")
+}
+if(FALSE){
+  ## Block13::      interpol.MBREpos3GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.MBRE.th, PFam=PF, xiGrid = xiGridpos3,namFzus="pos3")
+}
+if(FALSE){
+  ## Block14::      interpol.MBREpos4GEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.MBRE.th, PFam=PF, xiGrid = xiGridpos4,namFzus="pos4")
+}
+if(FALSE){
+  ## Block15::      interpol.MBREnegGEVUFamily.csv
+   PF <- GEVFamilyMuUnknown(withPos=FALSE, ..name="GEVU Family")
+  .svInt(.MBRE.th, PFam=PF, xiGrid = xiGridneg,namFzus="neg")
+}
+if(FALSE){
+  ## Block16::      interpol.RMXEnegGEVFamily.csv
+   PF <- GEVFamily(withPos=FALSE)
+  .svInt(.RMXE.th, PFam=PF, xiGrid = xiGridneg, namFzus="neg")
+}
+if(FALSE){
+  ## Block17::      interpol.OMSEnegGEVFamily.csv
+   PF <- GEVFamily(withPos=FALSE)
+  .svInt(.OMSE.th, PFam=PF, xiGrid = xiGridneg, namFzus="neg")
+}
+if(FALSE){
+  ## Block18::      interpol.MBREnegGEVFamily.csv
+   PF <- GEVFamily(withPos=FALSE)
+  .svInt(.MBRE.th, PFam=PF, xiGrid = xiGridneg, namFzus="neg")
+}
+if(FALSE){
+  ## Block19::      interpol.RMXEnegGParetoFamily.csv
+   PF <- GParetoFamily(withPos=FALSE)
+  .svInt(.RMXE.th, PFam=PF, xiGrid = xiGridneg, namFzus="neg")
+}
+if(FALSE){
+  ## Block20::      interpol.OMSEnegGParetoFamily.csv
+   PF <- GParetoFamily(withPos=FALSE)
+  .svInt(.OMSE.th, PFam=PF, xiGrid = xiGridneg, namFzus="neg")
+}
+if(FALSE){
+  ## Block21::      interpol.MBREnegGParetoFamily.csv
+   PF <- GParetoFamily(withPos=FALSE)
+  .svInt(.MBRE.th, PFam=PF, xiGrid = xiGridneg, namFzus="neg")
+}
+
+
 setwd(oldwd)

Modified: branches/robast-1.0/pkg/RobExtremes/man/internal-interpolate.Rd
===================================================================
--- branches/robast-1.0/pkg/RobExtremes/man/internal-interpolate.Rd	2014-04-15 23:14:01 UTC (rev 752)
+++ branches/robast-1.0/pkg/RobExtremes/man/internal-interpolate.Rd	2014-04-16 09:25:01 UTC (rev 753)
@@ -37,7 +37,7 @@
        PFam = GParetoFamily(shape=1,scale=2), radius = 0.5, upper = 1e4,
        lower = 1e-4, OptOrIter = "iterate",  maxiter = 150,
        tol = .Machine$double.eps^0.5, loRad = 0, upRad = Inf, loRad0 = 1e-3,
-       loRad.s = 0.2, up.Rad.s = 1, withStartLM = TRUE, len = 13)
+       loRad.s = 0.2, up.Rad.s = 1, withStartLM = TRUE, len = 13, namFzus = "")
 
 .generateInterpGridSn(xiGrid = getShapeGrid(500, cutoff.at.0=0.005),
                       PFam = GParetoFamily(), withPrint = TRUE)
@@ -96,6 +96,9 @@
   \item{withStartLM}{ logical of length 1: shall the LM's of the preceding grid
     value serve as starting value for the next grid value? }
   \item{len}{integer; number of Lagrange multipliers to be calibrated. }
+  \item{namFzus}{character; infix for the name of the \file{.csv}-File
+                 to which the results are written; used to split the
+                 work on xi-grids into chunks.}
 }
 \details{
    \code{.getpsi} reads the respective interpolating function



More information about the Robast-commits mailing list