search for: new_x

Displaying 18 results from an estimated 18 matches for "new_x".

Did you mean: new_p
2010 May 05
1
Predict when regressors are passed through a data matrix
...te model. I cannot pass a matrix to predict - when I pass a data frame I get the fitted valuie which leads me to think that R doesnt see the data.frame I pass to predict Thanks in advance, Paolo # REPRODUCIBLE CODE x <- matrix(rnorm(30), ncol =2) y <- 1 + 3*x[, 1] + 2*x[, 1] + rnorm(15) new_x <- matrix(rnorm(2), ncol =2) new_x.d <- data.frame(new_x) # fitted values predict(lm(y ~ x)) # same as fitted values predict(lm(y ~ x), new_x.d) # error predict(lm(y ~ x), new_x) [[alternative HTML version deleted]]
2010 May 17
1
Loess fit
...t to extend an existing loess fit to a new data set is producing error. I was trying the following: dat = read.csv(choose.files()) x = dat[,2]; y = dat[,1] x.sort = sort(x) y.loess = loess(y~x, span=0.75) # For testing the above fit with a new dataset: test = read.csv(choose.files()) # test data new_x = test [,1]; new_y = test[,2] new_x.sort = sort(new_x) predicted <- predict(y.loess, newdata=new_x.sort) Am I doing any mistake ? Please correct me. I could see that though the rest of the values of "predicted" looks alright, however the first output of it is an NA !! Many thanks,...
2006 Jul 31
1
questions regarding spline functions
...39;splines' package, it is possible to fit a model of some property with depth based on the bs() function: #natual, B-Splines library(splines) #fit a b-spline model: fm <- lm(y ~ bs(x, df=5) ) I am able to predict a soil property with depth, at unsampled locations with this model with: new_x <- seq(range(x)[1], range(x)[2], len = 200) #predict attribute at unsampled depths: new_y <- predict(fm, data.frame(x=new_x) ) #plot the predicted attribute at the unsampled depths lines(new_x, new_y, col='red') This tends to work fairly well (see attached), but I am wondering if...
2018 Jan 17
3
always allow canonicalizing to 8- and 16-bit ops?
...ult i32 %zy, %zz %minyz = select i1 %cmpyz, i32 %zy, i32 %zz %cmpyx = icmp ult i8 %y, %x %minxyz = select i1 %cmpyx, i32 %minxz, i32 %minyz %tr_minxyz = trunc i32 %minxyz to i8 %new_zx = sub nsw i32 %zx, %minxyz %new_zy = sub nsw i32 %zy, %minxyz %new_zz = sub nsw i32 %zz, %minxyz %new_x = trunc i32 %new_zx to i8 %new_y = trunc i32 %new_zy to i8 %new_z = trunc i32 %new_zz to i8 call void @use4(i8 %tr_minxyz, i8 %new_x, i8 %new_y, i8 %new_z) ret void } ...but x86 gets to shrink the subs which leads to a bunch of other transforms, and we grind this down to 10 instructions b...
2017 Nov 16
3
Manera eficiente de añadir el valor anterior por grupo
Buenas Tengo un Data table de la siguiente manera: datos<-data.table(grupo=rep(c("a","b"),5),x=c(1:10),y=rnorm(10,2,1)) Lo que quiero es añadir una fila por cada grupo y en esa nueva fila, al valor de la x ponerle el valor anterior de la y Lo que hago es añadir una nueva fila por grupo, con: datos[,.SD[1:(.N+1)],by=grupo] Y para añadir el valor anterior uso la función
2013 Jun 19
2
Relative position between two windows
...t ( display, RootWindow ( display, 0 ), SubstructureNotifyMask ); > > XEvent event; > while ( true ) > { > XNextEvent ( display, & event ); > /* ... */ > if ( event.type == ConfigureNotify and event.xconfigure.window == > window_B ) > { > // new_x, new_y based on event.xconfigure.x, event.xconfigure.y, > etc... > XMoveWindow ( display, window_A, new_x, new_y ); > } > /* ... */ > } > The problem is that the move correction of a window is only applied at the end of the move/resize operation of the other and n...
2018 Jan 22
2
always allow canonicalizing to 8- and 16-bit ops?
...cmpyz, i32 %zy, i32 %zz > %cmpyx = icmp ult i8 %y, %x > %minxyz = select i1 %cmpyx, i32 %minxz, i32 %minyz > %tr_minxyz = trunc i32 %minxyz to i8 > > %new_zx = sub nsw i32 %zx, %minxyz > %new_zy = sub nsw i32 %zy, %minxyz > %new_zz = sub nsw i32 %zz, %minxyz > %new_x = trunc i32 %new_zx to i8 > %new_y = trunc i32 %new_zy to i8 > %new_z = trunc i32 %new_zz to i8 > > call void @use4(i8 %tr_minxyz, i8 %new_x, i8 %new_y, i8 %new_z) > ret void > } > > ...but x86 gets to shrink the subs which leads to a bunch of other > transforms,...
2018 Jan 22
0
always allow canonicalizing to 8- and 16-bit ops?
...ult i32 %zy, %zz %minyz = select i1 %cmpyz, i32 %zy, i32 %zz %cmpyx = icmp ult i8 %y, %x %minxyz = select i1 %cmpyx, i32 %minxz, i32 %minyz %tr_minxyz = trunc i32 %minxyz to i8 %new_zx = sub nsw i32 %zx, %minxyz %new_zy = sub nsw i32 %zy, %minxyz %new_zz = sub nsw i32 %zz, %minxyz %new_x = trunc i32 %new_zx to i8 %new_y = trunc i32 %new_zy to i8 %new_z = trunc i32 %new_zz to i8 call void @use4(i8 %tr_minxyz, i8 %new_x, i8 %new_y, i8 %new_z) ret void } ...but x86 gets to shrink the subs which leads to a bunch of other transforms, and we grind this down to 10 instructions b...
2013 Jun 19
0
Relative position between two windows
...ureNotifyMask >> ); >> >> XEvent event; >> while ( true ) >> { >> XNextEvent ( display, & event ); >> /* ... */ >> if ( event.type == ConfigureNotify and event.xconfigure.window == >> window_B ) >> { >> // new_x, new_y based on event.xconfigure.x, event.xconfigure.y, >> etc... >> XMoveWindow ( display, window_A, new_x, new_y ); >> } >> /* ... */ >> } >> > > The problem is that the move correction of a window is only applied at the > end of the mo...
2013 May 29
0
"Unable to optimize" error returned in factanal using R-3.0.1, Windows 64 bit, and OpenBLAS
...'s checks (it passes the spline one failed by the 32-bit version which I asked about yesterday). Well, it fails the same procedure twice, but not all the time. The error is found in a call to the `factanal` procedure, specifically the call to `optim` therein, and it returns an error code "NEW_X", which I have never seen before. It fails this call in the checks for both stats.R and datasets.R, but does not fail them all, and for those it works, it returns the proper answers. The first call that fails is in statsEx.Rout fa <- factanal( ~., 2, data = swiss) Error in factanal(~....
2012 Apr 26
0
constrained optimisation without second order derivatives? - lnsrch error
...d add them both to my final error term. I'm constraining two of my parameters (to be between 0 and 1), and so it seems I have to use L-BFGS-B. Unfortunately, when optim gets close to the minimum, it usually bails with 52: "ERROR: ABNORMAL_TERMINATION_IN_LNSRCH" or sometimes 1: "NEW_X". Occasionally it succeeds. I assume this error is something to do with the error terms disappearing when you get reasonably good parameters. Is that plausible? If so does anybody know how to fix it? Thanks, Jon Phillips
2018 Jan 23
0
MachineVerifier and undef
...cmpyz, i32 %zy, i32 %zz > %cmpyx = icmp ult i8 %y, %x > %minxyz = select i1 %cmpyx, i32 %minxz, i32 %minyz > %tr_minxyz = trunc i32 %minxyz to i8 > > %new_zx = sub nsw i32 %zx, %minxyz > %new_zy = sub nsw i32 %zy, %minxyz > %new_zz = sub nsw i32 %zz, %minxyz > %new_x = trunc i32 %new_zx to i8 > %new_y = trunc i32 %new_zy to i8 > %new_z = trunc i32 %new_zz to i8 > > call void @use4(i8 %tr_minxyz, i8 %new_x, i8 %new_y, i8 %new_z) > ret void > } > > ...but x86 gets to shrink the subs which leads to a bunch of other > transforms,...
2011 Sep 23
0
Error message when using 'optim' for numerical maximum likelihood
...'optim' function to optimise the log-likelihood function. The optimiser seemed to work fine for sample sizes up to 100,000 i.e. the optim function converged, but when I tried to run optim using a sample size of 200,000 the optim failed to converge - the correspoding error message was "NEW_X". Can someone please advise what this error message means, and what I can do to avoid producing this error? I have supplied an extract of my code below for inspection (note that I am fairly new to programming so my code is probably not the most efficient/elegant...). Thank you in advance, S...
2002 Jan 08
6
Subsets without NA
Is there a way of removing all rows with missing values from a data frame? I usually use subset(x, var1!="NA") and repeat for each variable. It would be nice to be able to do it in one fell swoop. Also, surprisingly, it doesn't always work. Sometimes I'm left with an empty set even though not all rows have missing values for the variable. Cheers, mikkel Mikkel Grum,
2012 Jan 25
26
[PATCH v4 00/23] Xenstore stub domain
Changes from v3: - mini-os configuration files moved into stubdom/ - mini-os extra console support now a config option - Fewer #ifdefs - grant table setup uses hypercall bounce - Xenstore stub domain syslog support re-enabled Changes from v2: - configuration support added to mini-os build system - add mini-os support for conditionally compiling frontends, xenbus -
2013 May 28
3
R-3.0.1 - "transient" make check failure in splines-EX.r
Hello. I seem to be having the same problem that Paul had in the thread titled "[Rd] R 2.15.2 make check failure on 32-bit --with-blas="-lgoto2"" from October of last year <https://stat.ethz.ch/pipermail/r-devel/2012-October/065103.html> Unfortunately, that thread ended without an answer to his last question. Briefly, I am trying to compile an Rblas for Windows NT 32bit
2008 Feb 29
35
[RFC] PVFB: Add refresh period to XenStore parameters?
Hello, Sometimes the backend of PVFB knows that it doesn''t need permanent refresh, when the window is minimized for instance (no refresh at all), or the administration tools know that the window is thumnailed, and so a slow refresh rate is fine. Also, some users may want to tune the refresh rate according to the smoothness they would like, balanced with the CPU time that requires.
2008 Dec 22
56
[git patches] Ocfs2 patches for merge window, batch 2/3
...handle a partial cluster now. ocfs2: Use ocfs2_mv_xattr_buckets() in ocfs2_mv_xattr_bucket_cross_cluster(). ocfs2: Start using buckets in ocfs2_adjust_xattr_cross_cluster(). ocfs2: Pass buckets into ocfs2_mv_xattr_bucket_cross_cluster(). ocfs2: Move buckets up into ocfs2_add_new_xattr_cluster(). ocfs2: Move buckets up into ocfs2_add_new_xattr_bucket(). ocfs2: Pass xs->bucket into ocfs2_add_new_xattr_bucket(). Mark Fasheh (2): jbd2: Add BH_JBDPrivateStart ocfs2: Use BH_JBDPrivateStart instead of BH_Unshadow Tao Ma (4): ocfs2: fix indendation...