Displaying 10 results from an estimated 10 matches for "maxd".
Did you mean:
max
2010 Dec 04
2
Problem storing lm() model in a list
...rror: variable 'poly(x, d, raw = T)' was fitted with type "nmatrix.1" but type "nmatrix.10" was supplied
Does anyone have any ideas?
Thanks,
Harold
############################################################################
polyModelSelection <- function(x,y,maxd,add.dim=F) {
dim.mult <- 0
if (add.dim) {
dim.mult = 1
}
bestD <- 1
bestError <- 1
loss <- 1
lm.models <- vector("list",maxd)
for (d in 1:maxd) {
lm.mod <- lm(y ~ 0 + poly(x,d,raw=T))
lm.models[[d]] <- lm.mod...
2008 May 23
1
Shared Library Error
...ne help me resolve this? A part of the R function looks like this:
print(is.loaded('merge_xtabs_patterns_file'))
print(is.loaded('merge_xtabs_patterns_file_'))
.Fortran('merge_xtabs_patterns_file_',ydim[1],ydim[2],x=as.integer(as.matrix(y)),na=as.integer(c),
maxD=as.integer(maxD),lrowmem=length(rowmem),rowmem=as.integer(rowmem),
sequential=as.integer(Sequential),nclust=as.integer(nclust))
The corresponding output:
[1] FALSE
[1] TRUE
Error in .Fortran("merge_xtabs_patterns_file_", ydim[1], ydim[2], x =
as.integer(as.matrix(y)), :
Fortran s...
2013 Apr 24
0
Help me make faster R code for Kennard-Stone algorithm [My code is so slow from Matlab]
...# D: Upper Trianglar Matrix
# D[i, j] = Euclidean distance between object i and
j (j > i)
D[i, j] = max(svd(xa - xb)$d) # the largest
singular value
}
}
cat("for (i in 1:(M - 1)) done! \n")
maxD = apply(D, 2, max)
index_row = apply(D, 2, function(x) which(x == max(x))[1])
dummy = max(maxD)
index_column = which(maxD == dummy)
m = vector()
m[1] = index_row[index_column]
m[2] = index_column
dminmax[2] = D[m[1], m[2]]
for (i in...
2010 Nov 22
1
Plotting a cloud/fog of variable density in rgl
...d3D = expand.grid(x = range1D, y = range1D, z = range1D)
gridded(grid3D) = ~x+y+z
res3D = krige(formula = v ~ 1, data3D, grid3D, model = vgm(1, "Exp", .2))
# convert the result to a data.frame
d = as.data.frame(res3D)
# compute transparency (proportional to the interpolated value)
maxD = max(d$var1.pred)
minD = min(d$var1.pred)
alpha = (d$var1.pred - minD)/(maxD - minD)
# reduce maximum alpha (all points are semi-transparent)
alpha = alpha/5
# plot
library("rgl")
spheres3d(d$x, d$y, d$z, alpha=alpha, radius=0.05)
I saw the fog effect but it seems to add a fog...
2002 Oct 04
2
spline bug ?
# Is this a bug or something I don't understand?
spline(date, stor, n=52, xmin=mind, xmax=maxd)
# gives length(x) of 53 ????, but y has the expected length of 52
# Shouldn't they be the same length? From help (spline):
# spline returns a list containing components x and y which give the
# ordinates where interpolation took place and the interpolated values
# xmin and xmax are inside m...
2004 Apr 04
1
How to improve this code?
Hi all,
I've got some functioning code that I've literally taken hours to
write. My 'R' coding is getting better...it used to take days :)
I know I've done a poor job of optimizing the code. In addition, I'm
missing an important step and don't know where to put it.
So, three questions:
1) I'd like the resulting output to be sorted on distance (ascending)
and
2006 Nov 02
3
Better y-axis labels, and x-axis scaling
...een 0 and 1.
The result can be seen at
http://sneakymustard.com/tmp/plot.jpg
As you can see, the default y axis labels are not very nice, as it uses
irregular intervals.
I tried using variations of
axis(2, at = pretty(c(0, ceiling(max(distances))), 5))
or
yaxp = c(round(mind, 2), round(maxd, 2), -4)
in the matplot() call.
Is there anything else I could try for better labeling of values between
0 and 1 in a log-scale axis? Hints or pointers to the appropriate docs
are appreciated :)
Also, is there a command/option to change the plotted spacing between
the labels in a plot? In the pl...
2013 Sep 23
28
[PATCH 0/2] add LZ4 kernel decompression support
Linux 3.11 added respective support, so I think we should follow
suit.
1: xen: add LZ4 decompression support
2: libxc: add LZ4 decompression support
Signed-off-by: Jan Beulich <jbeulich@suse.com>
2012 Jun 23
9
[PATCH 0/5] btrfs: lz4/lz4hc compression
WARNING: This is not compatible with the previous lz4 patchset. If you''re using
experimental compression that isn''t in mainline kernels, be prepared to backup
and restore or decompress before upgrading, and have backups in case it eats
data (which appears not to be a problem any more, but has been during
development).
These patches add lz4 and lz4hc compression
2010 Nov 24
0
4. Rexcel (Luis Felipe Parra)-how to run a code from excel
...d3D = expand.grid(x = range1D, y = range1D, z = range1D)
gridded(grid3D) = ~x+y+z
res3D = krige(formula = v ~ 1, data3D, grid3D, model = vgm(1, "Exp",
.2))
# convert the result to a data.frame
d = as.data.frame(res3D)
# compute transparency (proportional to the interpolated value)
maxD = max(d$var1.pred)
minD = min(d$var1.pred)
alpha = (d$var1.pred - minD)/(maxD - minD)
# reduce maximum alpha (all points are semi-transparent)
alpha = alpha/5
# plot
library("rgl")
spheres3d(d$x, d$y, d$z, alpha=alpha, radius=0.05)
I saw the fog effect but it seems to add a fog...