VIP
2015-Jan-31 12:12 UTC
[R] How can I get the same result after running function maximinESE_LHS?
Hi All, Recently I'm doing my thesis with LHS, and I created the design by using the folloing code. "require(DiceDesign) require(DoE.wrapper) set.seed(27662) LHD=lhs.design(200,7,type="dmax",factor.names=list( Angle1=c(80,90),Angle2=c(90,100), Angle3=c(32,40),Radial2=c(10,15), Radial3=c(25,35),Length1=c(120,130), Length2=c(0,10)),range=0.98,niter_max=2000) LHDnew=maximinESE_LHS(LHD,T0=0.005*phiP(LHD,p=50),inner_it=200,J=50,it=4) plot(LHDnew$design$Angle1,LHDnew$design$Angle2) plot(LHDnew$critValues,type="l") LHDopt=LHDnew$design?" As R language is new for me, Each time I run the code, the different LHDopt can get. I don't know how can I avoid this situation. Anybody could help me? BR, Dean [[alternative HTML version deleted]]
Jeff Newmiller
2015-Jan-31 18:51 UTC
[R] How can I get the same result after running function maximinESE_LHS?
Because your code includes set.seed, I would expect that running it all from scratch should lead to the same result every time. I an not familiar with that specific package, so there could be a surprise in it, but unlikely. I suspect that you are running parts of the code to get different results. Please read the Posting Guide, which among other things mentions that this is a plain text email list. Failing to send your email in plain text leads to us not seeing what you sent as you saw it, which leads to problems understanding each other. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. On January 31, 2015 4:12:55 AM PST, VIP <850939110 at qq.com> wrote:>Hi All, >Recently I'm doing my thesis with LHS, and I created the design by >using the folloing code. >"require(DiceDesign) >require(DoE.wrapper) >set.seed(27662) >LHD=lhs.design(200,7,type="dmax",factor.names=list( > Angle1=c(80,90),Angle2=c(90,100), > Angle3=c(32,40),Radial2=c(10,15), > Radial3=c(25,35),Length1=c(120,130), > Length2=c(0,10)),range=0.98,niter_max=2000) >LHDnew=maximinESE_LHS(LHD,T0=0.005*phiP(LHD,p=50),inner_it=200,J=50,it=4) >plot(LHDnew$design$Angle1,LHDnew$design$Angle2) >plot(LHDnew$critValues,type="l") >LHDopt=LHDnew$design?" >As R language is new for me, Each time I run the code, the different >LHDopt can get. I don't know how can I avoid this situation. >Anybody could help me? >BR, >Dean > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.