Displaying 2 results from an estimated 2 matches for "min_thi".
Did you mean:
min_this
2010 Dec 22
0
adjust secondary y-axis bounds to minimize visual residuals
...0 at the top) as this is more intuitive when thinking in
terms of depth. The second is electrical conductance (a surrogate for
salinity), and is referenced to the right y-axis. The data and plot
commands follow below.
I've been trying to figure out a way to minimize the variable called
"min_this" by changing the values in ylim_2 only, with one constraint:
ylim_2[1]>0. I'm unsure of how to stuff the code that follows the plot
commands into a loop that adjusts ylim_2 so as to minimize "min_this"? I'm
guessing there is a function to do this?
Thanks,
Eric
library...
2010 Dec 30
2
optim and singularity
...nding left-axis values
temp.dat.mapped<-x[1,1]*temp.dat$Avg.EM.Survey.Value+x[2,1]
#calculate the resids between green squares and blue circles
resids<-na.omit(data.frame(Col1=temp.dat$WTD,Col2=temp.dat.mapped,SumSqrDiff=(temp.dat$WTD-temp.dat.mapped)^2))
#quantity to be minimized
min_this<-sum(resids$SumSqrDiff)
min_this
}
edm<-optim(ylim_2,f,lower=c(0,0),upper=c(100,100),method="L-BFGS-B")
ylim_2<-edm$par
--
View this message in context: http://r.789695.n4.nabble.com/optim-and-singularity-tp3168722p3168722.html
Sent from the R help mailing list archive at Na...