search for: scaled

Displaying 20 results from an estimated 11013 matches for "scaled".

Did you mean: scale
2008 Apr 15
1
p-values always identical for t.test of certain group of samples, why ?
Hi, Given the following, a <- rnorm(5) b <- rnorm(5) c <- rnorm(5) a.1g.scale <- scale(c(a,b,c))[1:5] b.1g.scale <- scale(c(a,b,c))[6:10] c.1g.scale <- scale(c(a,b,c))[11:15] a.2g.scale <- scale(c(a,b))[1:5] b.2g.scale <- scale(c(a,b))[6:10] c.2g.scale <- scale(c) a.3g.scale <- scale(a) b.3g.scale <- scale(b) c.3g.scale <- scale(c) I am puzzled why the
2010 Sep 24
0
kernlab:ksvm:eps-svr: bug?
...if (is.numeric(y)&&(type(ret)!="C-svc"&&type(ret)!="nu-svc"&&type(ret)!="C-bsvc"&&type(ret)!="spoc-svc"&&type(ret)!="kbb-svc")) { 143 y <- scale(y) 144 y.scale <- attributes(y)[c("scaled:center","scaled:scale")] 145 y <- as.vector(y) 146 } 2. fitted response, fitted(ret), is obtained at lines 826,827: 826 fitted(ret) <- if (fit) 827 predict(ret, x) else NULL (note: during the fitting process the return value of predict(ret,x) is...
2012 May 23
1
prcomp with previously scaled data: predict with 'newdata' wrong
...lative difference: 0.9033485" Predicting with the same data gives different results than the original PCA of the data. The reason of this behaviour seems to be in these first lines of stats:::prcomp.default(): x <- scale(x, center = center, scale = scale.) cen <- attr(x, "scaled:center") sc <- attr(x, "scaled:scale") If input data 'x' have 'scaled:scale' attribute, it will be retained if scale() is called with argument "scale = FALSE" like is the case with default options in prcomp(). So scale(scale(x, scale = TRUE), scale =...
2002 Aug 12
1
question about cloud() in lattice package
Hi all, I have been previously been using scatterplot3d package to create some graphs but unfortunately it does not allow me to rotate the plot on all three axis. The cloud() function in the lattice package does allow me to do so. When I was using scatterplot3d I was using a script (Shown Below) to calculate the mean, quartiles and range limits for all three axis and I was representing that on the
2008 Aug 28
6
Function not returning a vector?
Why does: (shape/scale) * (1:365/scale)^(shape - 1) return a vector of numbers but calling a function hasard(1:365,shape,scale) defined like: hazard <- function(x,shape,scale) { return (shape/scale) * (x/scale)^(shape - 1) } Only return a single value? It is like x becomes a single value passed as an argument. Thank you. Kevin
2011 Jul 16
2
Utility function to apply a scale object on another data frame
Hi Everyone, I would like to scale a data frame and then using the same scaling parameters scale on another data frame. This will be helpful in scaling the test dataset based on train dataset's scaling parameters. I couldn't find any utility functions that do this. Any suggestions on how to approach this problem? x = data.frame(a=1:10,b=11:20) y = data.frame(a=2:11,b=12:21) s <-
2005 Aug 31
1
Bioconductor and R-devel
...ess each piece of information within ampli.eset at description@preprocessing scale factors ampli.eset at description@preprocessing$sfs # filenames so that the scale factors can be related to their chips ampli.eset at description@preprocessing$filenames # tgt is the target intensity each chip was scaled to ampli.eset at description@preprocessing$tgt # which version of the affy package was used ampli.eset at description@preprocessing$affyversion qc.data <- qc(ampli.data, ampli.eset); slotNames(qc.data); # scale.factors contains a list of scale factors applied to each chip; qc.data at scale.f...
2004 Jan 15
2
prcomp scale error (PR#6433)
Full_Name: Ryszard Czerminski Version: 1.8.1 OS: GNU/Linux Submission from: (NULL) (205.181.102.120) prcomp(..., scale = TRUE) does not work correctly: $ uname -a Linux 2.4.20-28.9bigmem #1 SMP Thu Dec 18 13:27:33 EST 2003 i686 i686 i386 GNU/Linux $ gcc --version gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) > a <- matrix(rnorm(6), nrow = 3) > sum((scale(a %*% svd(cov(a))$u, scale
2010 Feb 22
3
scale(x, center=FALSE) (PR#14219)
...10.1 (2009-12-14) scale returns incorrect values when center=FALSE and scale=TRUE. When center=FALSE, scale=TRUE, the "scale" used is not the square root of sample variance, the "scale" attribute is equal to sqrt(sum(x^2)/(n-1)). Example: x <- runif(10) n <- length(x) scaled <- scale(x, center=FALSE, scale=TRUE) scaled s.bad <- attr(scaled, "scale") s.bad #wrong sd(x) #correct #compute the sd as if data has already been centered #that is, compute the variance as sum(x^2)/(n-1) sqrt(sum(x^2)/(n-1))
2006 Sep 11
2
Translating R code + library into Fortran?
Hi all, I'm running a monte carlo test of a neural network tool I've developed, and it looks like it's going to take a very long time if I run it in R so I'm interested in translating my code (included below) into something faster like Fortran (which I'll have to learn from scratch). However, as you'll see my code loads the nnet library and uses it quite a bit, and I
2008 Jan 04
2
question about scale() function
...olumns". But it seems that R is subtracting something else instead of the column mean: > x=c(2,4,3,4,5) > mean(x) [1] 3.6 > x-mean(x) [1] -1.6 0.4 -0.6 0.4 1.4 > scale(x) [,1] [1,] -1.4032928 [2,] 0.3508232 [3,] -0.5262348 [4,] 0.3508232 [5,] 1.2278812 attr(,"scaled:center") [1] 3.6 attr(,"scaled:scale") [1] 1.140175 Notice that -1.4 is not the same as -1.6, and 1.2 is not the same as 1.4, etc. Does anyone know what exactly is scale() doing if it is not subtracting the column mean? Thanks. -- Tom [[alternative HTML version deleted]]
2011 Oct 24
1
Adding points to a wireframe: 'x and units must have length >0' error
...ata.frame(x = runif(10, -4, 0), y = runif(10, 0, 40))-> pts1 pts1$z <- pts1$x*pts1$y # plot wireframe(z ~ y*x, gridd, drape = TRUE, colorkey= TRUE, scales = list(arrows = FALSE), pts = pts1, panel.3d.wireframe = function(x, y, z,xlim, ylim, zlim, xlim.scaled, ylim.scaled, zlim.scaled, pts1, ...) { panel.3dwire(x = x, y = y, z = z, xlim = c(-4, 0), ylim = c(0, 40), zlim = c(-160, 0), xlim.scaled = c(-0.5, 0.5),...
2018 Feb 27
2
scale.default gives an incorrect error message when is.numeric() fails on a sparse row matrix (dgeMatrix)
I am attempting to use the lars package with a sparse input feature matrix, but the following fails: library(Matrix) library(lars) data(diabetes) attach(diabetes) x = as(as.matrix(as.data.frame(x)), 'dgCMatrix') lars(x, y, intercept = FALSE) Error in scale.default(x, FALSE, normx) : > > length of 'scale' must equal the number of columns of 'x' > > More
2003 Apr 03
1
SVM module: scaling data applied to new test set without using SVM again
Hello! We are new in using R. We use the SVM module from the library ''e1071'' for training. Problem formulation: a classification has been performed using SVM module (linear kernel). Later, a new data set (test set) comparable to the training data shall be scaled in the same way as the training set (using the same scaling parameter set, but without using the SVM again to save time). We found the scaling matrices, but we do not know, how to apply them. How must the scaling parameter matrices (scaled:center and scaled:scale) be applied to the test data...
2005 Nov 18
2
Adding points to wireframe
...a few points on the surface. I read in a post from Deepayan Sarkar that "To do this in a wireframe plot you would probably use the panel function panel.3dscatter". Does someone have an example? When calling panel.3dscatter with only x, y and z arguments I get "argument "xlim.scaled" is missing, with no default". I do not know what value I should give to xlim.scaled. Ragards, Pierre-Luc
2008 Apr 30
2
wireframe - add data points
...pts <- data.frame(x=x,y=y,z=z) ##end import original data## wireframe(status~totalfrost*logtps,abc,scales=list(arrows=TRUE),drape=TRUE, screen =list (x=15, y=-50, z=-105), pts = pts, panel.3d.wireframe = function(x, y, z, xlim, ylim, zlim, xlim.scaled, ylim.scaled, zlim.scaled, pts, ...) { panel.3dwire(x = x, y = y, z = z, xlim = xlim, ylim = ylim, zlim = zlim, xlim.scaled = xlim.scaled,...
2004 Oct 20
2
Odd behaviour with scale()
...Windows XP, the behaviour occurs in R 2.0.0, but not 1.7.1). The problem is that she scales a variable in a data frame, then does a regression, and tries to get some predictions for some new data. However, at this point she gets an error (see the example below). This seems to be because the scaled variable in the new data frame does not have the center and scale attributes, but the one in the old data frame does. The work-around is to put the scaled variable intro a new data frame, which again won't have the attributes. But it seems odd to me that whether a scale()'d variable h...
1998 Apr 24
1
Warning: ignored non function "scale"
I've been working on a revised version of prcomp and princomp. Below is my current draft of prcomp, which is marginally different from V&R. I've added center and scale as optional arguments. However, scale causes the following: > zi _ prcomp(iris[,,2]) Warning: ignored non function "scale" because scale is both a variable and a function. Is there any way to avoid this
2010 Jan 15
4
transposing a list of vectors
I have a list of vectors, all forced to be the same length: testlist <- list( shape=c(0, 0, 2), cell.fill=c("red","blue","green"), back.fill=rep("white",3), scale.max=rep(100,3) ) > str(testlist) List of 4 $ shape : num [1:3] 0 0 2 $ cell.fill: chr [1:3] "red" "blue" "green" $ back.fill: chr [1:3]
2011 Sep 15
1
Lattice xyplot log scale labels help!
I have a problem with lattice log scales that I could use some help with. I'm trying to print log y-axis scales without exponents in the labels. A similar thread with Deepayan' recommendation is here: http://tolstoy.newcastle.edu.au/R/e11/help/10/09/9865.html. For example, this code using xyplot produces a logged y-axis but the labels (e.g. "10^1.2") are not very