Displaying 20 results from an estimated 11013 matches for "scaling".
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?
...original units, see lines 2832-2838)
3. fitted response is now scaled BACK to the original units of "y" at
lines 839,840. So, when assigning "error(ret) <-" at line 844,
fitted(ret) is in the original units but y is in standardized units:
828
829 if(any(scaled))
830 scaling(ret) <- list(scaled = scaled, x.scale = x.scale,
y.scale = y.scale)
831
832 if (fit){
...
837 if(type(ret)=="eps-svr"||type(ret)=="nu-svr"||type(ret)=="eps-bsvr"){
838 if (!is.null(scaling(ret)$y.scale)){
839 scal <- scaling(ret)$y.scale$&quo...
2012 May 23
1
prcomp with previously scaled data: predict with 'newdata' wrong
Hello folks,
it may be regarded as a user error to scale() your data prior to prcomp() instead of using its 'scale.' argument. However, it is a user thing that may happen and sounds a legitimate thing to do, but in that case predict() with 'newdata' can give wrong results:
x <- scale(USArrests)
sol <- prcomp(x)
all.equal(predict(sol), predict(sol, newdata=x))
## [1]
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=...
2005 Aug 31
1
Bioconductor and R-devel
...d funded by CANCER RESEARCH UK.
http://bioinformatics.picr.man.ac.uk/simpleaffy
mailto: microarray at picr.man.ac.uk
Background correcting
Retrieving data from AffyBatch...done.
Computing expression calls...
.........................done.
scaling to a TGT of 100 ...
Scale factor for: 0203_YH10_H_MCF7_r1.CEL 0.291660289301555
Scale factor for: 0203_YH11_H_MCF10A_r1.CEL 0.42025300545212
Scale factor for: 0203_YH12_H_a100MCF7_r1.CEL 0.287589038746987
Scale factor for: 0203_YH13_H_a100MCF10A_r1.CEL 0.451200408584071
Scale factor for: 0203_YH14_...
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)
Full_Name: Maria Rizzo
Version: 2.10.1 (2009-12-14)
OS: Windows XP SP3
Submission from: (NULL) (72.241.75.222)
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor
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
Hi,
The documentation for scale() states:"If center is TRUE then centering is
done by subtracting the column means (omitting NAs) of x from their
corresponding columns". 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,]
2011 Oct 24
1
Adding points to a wireframe: 'x and units must have length >0' error
Hi,
I'm trying to follow the suggestions given by Deepayan Sarkar in this
message:
http://tolstoy.newcastle.edu.au/R/help/05/11/16135.html
to plot 3-D points on a wireframe plot. The problem is that I keep getting a
partly formed plot- with the colored lattice visible but no axis labels or
additional points- with the error message "error using packet 1, 'x' and
'units'
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
...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 set to receive the same scaling as it would
have been done b...
2005 Nov 18
2
Adding points to wireframe
Hi,
I am using function wireframe from package lattice to draw a 3D surface.
I would like to add 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
2008 Apr 30
2
wireframe - add data points
Hello all,
I’m trying to add some data points to a wireframe. X an Y axis are independent variables, Z axis is predicted probability. I’d like to add the original data points on which the predicted probabilities are based to the wireframe. I’ve followed some of the previous post on this but get stuck :
## first part yields the wireframe##
setwd("C:/Temp")
rnp <-
2004 Oct 20
2
Odd behaviour with scale()
Moi!
A student here has been getting a bit irritated with some side effects
of scale() (OS is 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
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