search for: kmax

Displaying 14 results from an estimated 14 matches for "kmax".

Did you mean: kmap
2005 Aug 03
7
call fortran in R
...de: R CMD SHLIB ~/Desktop/Fortan_kmeans/kmeans3.f There is the wrapper I have paste inside de kmeans3.f file: c THIS IS THE WRAPPER subroutine wrapper(n, p, nran, mat, ishort, w, z, + ntran, istand, k1, k2, iassign, iseed) integer n,p,kmax real*8 mat(n,p),sx(kmax,p),sx2(kmax,p),vect(p), + xbar(kmax,p),var(kmax,p),mean(p),coord(10) real*8 D1,Dref,SSE,SSEref,Dvec(kmax),w(p),SST real*8 CH,CHr(kmax),SSEr(kmax),temp integer list(n),howmany(kmax),no(n),nobest(kmax...
2012 Feb 15
0
[LLVMdev] Performance problems with FORTRAN allocatable arrays
...LLVM does a bad job of optimizing array indexing > code for FORTRAN arrays declared using the ALLOCATABLE keyword. > > For example if you have something like the following: > > DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:,:) :: QAV > ... > ALLOCATE( QAV( -2:IMAX+2,-2:JMAX+2,-2:KMAX+2,ND) ) > ... > DO L = 1, 5 > DO K = K1, K2 > DO J = J1, J2 > DO I = I1, I2 > II = I + IADD > IBD = II - IBDD > ICD = II + IBDD > > QAV(I,J,K,L) = R6I * (2.0D0 * Q(IBD,J,K,L,N) + >>...
2012 Feb 15
2
[LLVMdev] Performance problems with FORTRAN allocatable arrays
I've noticed that LLVM does a bad job of optimizing array indexing code for FORTRAN arrays declared using the ALLOCATABLE keyword. For example if you have something like the following: DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:,:) :: QAV ... ALLOCATE( QAV( -2:IMAX+2,-2:JMAX+2,-2:KMAX+2,ND) ) ... DO L = 1, 5 DO K = K1, K2 DO J = J1, J2 DO I = I1, I2 II = I + IADD IBD = II - IBDD ICD = II + IBDD QAV(I,J,K,L) = R6I * (2.0D0 * Q(IBD,J,K,L,N) + > 5.0D0 * Q( II,J,K,L,N) - >...
2012 May 29
1
model frame and formula mismatch with latent class analysis poLCA
...On this dataframe (here named datax), i perform LCA as follows: datax.int=datax+1 ### poLCA can only analyze 1,2,... f<-as.formula(paste("cbind(", paste(colnames(datax.int), collapse = ","), ")~1")) #all items are dependent variables fit<-list() #collect fits Kmax=5 #maximum nr of classes bic=rep(0,Kmax) #vector of BIC values ll=rep(0,Kmax) #vector of loglikelihood values for (j in 1:Kmax){ #fits for #classes=1,2,...,Kmax cat(j,"\n") #print current analysis number fit[[j]]<-poLCA(f,data.int,nclass=j,nrep=20,verbose=FALSE) #20 random starts...
2010 Apr 15
0
[LLVMdev] darwin dragon-egg build issues
Duncan, Do a quick check here on x86_64-apple-darwin10 with svn llvm and svn dragon-egg against release gcc 4.5.0, the results from the himenoBMTxpa benchmark compiled at -O3 look pretty good. With stock gcc-4.5.0, we get... Grid-size = M mimax = 128 mjmax = 128 mkmax = 256 imax = 127 jmax = 127 kmax =255 Start rehearsal measurement process. Measure the performance in 3 times. MFLOPS: 156.560865 time(s): 2.575476 1.733593e-03 Now, start the actual measurement process. The loop will be excuted in 69 times This will take about one minute. Wait for a while...
2010 Apr 13
2
[LLVMdev] darwin dragon-egg build issues
Hi Peter, > Why not do this too? I've applied this - thanks for the patch! Ciao, Duncan.
2007 Oct 09
1
pseudo code
Hey there! I got a pseudo code and don't know how to apply it to R, maybe someone can help me: Input: A dataset X, kmax: maximum number of clusters, num_subsamples: number of subsamples. Output: S(i; k) - a distribution of similarities between partitions into k clusters of a reference clustering and clustering of subsamples; i = 1 to num_subsamples Requires: T = cluster(X): A hierarchical clustering algorithm L =...
2010 Jun 15
1
Help with error
...ata with Monod kinetics and Haldane inhibition. I am using the following commands to do the nonlinear regression: dce<-read.delim("data.txt", header = TRUE, sep = "\t", quote="\"", dec=".", fill = TRUE, comment.char="") dce.m1<-nls(rate~kmax*conc/(Ks+conc+((conc^2)/Ki),data=dce ,start=list(Ks=1000,kmax=6000,Ki=10000),trace=TRUE) I get reasonable answers for Ks, kmax and Ki from this. However, I want to find the 95% confidence intervals for each of these values. So I first use the command profile: (pr <- profile(dce.m1)) And then...
2009 Jul 31
1
what meaning missing value True /False needed
...ulLossInflaRate <- cumprod(1+LossInflaRate) CumulCPIRate <- cumprod(1+CPIRate) xmin  <-  Xmin(LapseType, ElasticityLeft, WindowLeft, MinLapseRate,CentralLapseRate) xmax  <-  Xmax(LapseType, ElasticityLeft, WindowLeft, MaxLapseRate,CentralLapseRate) kmin  <-  OptimYear - FirstYear + 1 kmax  <-  LastYear - FirstYear + 1 NbOfFutureSimYear <-  LastYear - OptimYear  + 1 PriorLR <- (LRUpBound*LRLowBound)^0.5 Phase  <-  1 LRScenar  <- LRScenar(PriorLR,Phase,LRUpBound ,LRLowBound,TransitCoefMean,TransitCoefStdDev,LTMeanComputYearNb) MarketPriceLTMean  <- mean( 1/LRScenar)...
2007 Jan 05
1
help for memory problem with 64-bit machines
...al(cor(swiss),2,3,nsol=4,niter=10,criterion="RM") *** caught segfault *** address 0x47cd37c, cause 'memory not mapped' Traceback: 1: .Fortran("anneal", as.integer(criterio), as.integer(p), as.double(as.vector(mat)), as.integer(kmin), as.integer(kmax), as.double(valores), as.integer(vars), as.double(bestval), as.integer(bestvar), as.integer(nexclude), as.integer(exc), as.integer(ninclude), as.integer(inc), as.integer(nsol), as.integer(niter), as.logical(improvement), as.double(cooling), as.double(temp), as.integer(coolfreq), as.integer(len...
2010 Jul 16
3
Help with Sink Function
...eplace=FALSE) miceSample$pID50 <- combined$pID50 miceTestSample <- miceSample[47:55,] miceTrainSample <- miceSample[1:46,] fit.kknn <- kknn(pID50~., miceTrainSample, miceTestSample) table(miceTestSample$pID50, fit.kknn$fit) (fit.train1 <- train.kknn(pID50~., miceTrainSample, kmax=15, kernel=c("rectangular"), distance=1)) predictedTrain <- predict(fit.train1, miceTrainSample, miceTrainSample$pID50) pID50Train <- miceTrainSample$pID50 lmTrain <- lm(predictedTrain~pID50Train) slm <- summary(lmTrain) str(slm) if (i == 1) { previousR2 <-slm$r...
2024 Jul 26
1
Automatic Knot selection in Piecewise linear splines
...for completeness: Similar to "earth", "segmented" also fits piecewise linear relationships with the number of breakpoints being selected by the AIC or BIC (recommended). #code (example and code from Martin Maechler previous email) library(segmented) o<-selgmented(y, ~x, Kmax=20, type="bic", msg=TRUE) plot(o, add=TRUE) lines(o, col=2) #the approx CI for the breakpoints confint(o) #the estimated breakpoints (with CI's) slope(o) #the estimated slopes (with CI's) However segmented appears to be less efficient than earth (although with reasonable runni...
1999 Aug 03
1
legend in coplot output
Dear friends: It's possible make a legend in the coplot output? My data are: "dados"<-structure (list ( Qu1 = c(1,2,3,4,5,6,7,8,3,2), Qu2 = c(3,4,5,6,7,8,9,9,6,3), Ku1 = structure (factor ( c(1,1,1,1,2,1,2,2,1,1),levels=1:2),.Label=c("Kmin","Kmax")), Ph1 = structure (factor ( c(1,1,3,2,3,3,2,3,2,1),levels=1:3),.Label=c("Pmin","Pmean","Pmax")), Th1 = structure( factor( c(1,1,2,4,3,3,2,4,2,1),levels=1:4),.Label=c("Tmin_in","Tmax_in","Tmin_out","Tmax_out"))), row.names...
2024 Jul 16
2
Automatic Knot selection in Piecewise linear splines
>>>>> Anupam Tyagi >>>>> on Tue, 9 Jul 2024 16:16:43 +0530 writes: > How can I do automatic knot selection while fitting piecewise linear > splines to two variables x and y? Which package to use to do it simply? I > also want to visualize the splines (and the scatter plot) with a graph. > Anupam NB: linear splines, i.e. piecewise