similar to: Faster way for weighted matching?

Displaying 20 results from an estimated 2000 matches similar to: "Faster way for weighted matching?"

2003 Jan 16
0
Summary: Faster way for weighted matching
I received some great ideas (see below) from a number of people to whom I am grateful. Here is the code I put together from many of their suggestions: lx <- length(x) lw <- length(w) z <- matrix(abs( rep( x , lw ) - rep( w, each = lx ) ), nrow=lw, ncol=lx, byrow=TRUE) s <- pmax( abs( w - min(x) ), abs( w - max(x) ) ) z <- (1 - (z/rep(s,length=lx*lw))^3)^3 sums <-
2013 Jan 08
1
Problem getting loess tricubic weights
Hi I am trying to get the tricube weights from the loess outputs as I need to calculate an error function which requires the weight. So I have used the following example from the R: cars.lo <- loess(dist ~ speed, cars, span=0.5, degree=1, family="symmetric") Then i try to get the weights: cars.lo$weights [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
2005 Feb 11
1
Help concerning Lasso::l1ce
Hi, First, when I try the example Prostate with bound 0.44 (as in the manual), I got a different result: > l1c.P <- l1ce(lpsa ~ ., Prostate, bound=0.44) > l1c.P .... Coefficients: (Intercept) lcavol lweight age lbph svi 1.0435803 0.4740831 0.1953156 0.0000000 0.0000000 0.3758199 lcp gleason pgg45 0.0000000 0.0000000
2000 Apr 25
0
Wrong SEs in predict.lm(..., type="terms")
predict.lm(..., type="terms") gives wrong standard errors. Below, I have provided what I believe are the necessary fixes. However, there are subtleties, and the code needs careful checking. Some of the looping is surely not necessary, but it is surely best to begin with the minimum necessary changes. My tests, including checks against S-PLUS, have extended to fitting spline curves. I
2000 Apr 26
0
Wrong SEs in predict.lm(..., type="terms") (PR#528)
>From e980153 Tue Apr 25 14:42:27 2000 To: r-help@stat.math.ethz.ch Subject: Wrong SEs in predict.lm(..., type="terms") For what it is worth, I am using RW-1.0.0 under Windows 98. I submitted this earlier to r-help. There is one change below to my proposed corrected code: predict.lm(..., type="terms") gives wrong standard errors. Below, I have provided what I believe are
2008 May 09
0
applying cor.test to a (m, n) matrix - SUMMARY
Hi again, I've got few very good options from the list and since they were not posted to the list, I will provide a summary. Thank you very much to all who answered and I hope this summary will benefit others interested in solving similar problems like that. Yasir Kaheil re-wrote my original code in a more streamlined way: pr<-array(0,c(dim(x)[2],dim(x)[2])); for (i in 1:dim(x)[2]) for
2003 Sep 25
1
apply on a 4D array
I am trying to multiply a 3D array of 4x4x4 by the 4 3D arrays of a 4D array with dimensions 4x4x4x4 (the last dimension being the one that I want to split by). (4x4x4 array) > hiaAry , , a1 i1 i2 i3 i4 h1 9.5936098 6.001040 0.08772 0.3138600 h2 1.2003500 1.454570 2.79248 0.0000000 h3 0.1346500 0.201220 0.39256 0.5464000 h4 0.0109000 0.012270 0.16417 0.2766900 ,
2011 Mar 17
1
Using barplot() with zoo -- names.arg not permitted?
I've used barplot(), including the anmes.arg parameter, on data frames successfully, but I'm even newer to using zoo than I am to R. :-} I am working on a functon that accepts a data frame ("df") as its primary argument, extracts information from it to create a zoo, then generates a plot based on that. The data frame has a column called "time" which is a standard
2007 Jul 25
3
loess prediction algorithm
Hello, I need help with the details of loess prediction algorithm. I would like to get it implemented as a part of a measurement system programmed in LabView. My job is provide a detailed description of the algorithm. This is a simple one-dimensional problem - smoothing an (x, y) data set. I found quite a detailed description of the fitting procedure in the "white book". It is also
2015 Jan 29
0
[Q] Get formal arguments of my implemented S4 method
At this point I would just due: formals(body(method)[[2L]]) At some point we need to figure out what to do with this .local() confusion. On Wed, Jan 28, 2015 at 10:07 AM, Roebuck,Paul L <PLRoebuck at mdanderson.org> wrote: > I'm attempting to reflect the information for use with corresponding > fields in GUI (in a different package), to provide default values, > argname
2018 Nov 01
0
Possible bug in Opus 1.3 (opus-tools-0.2-opus-1.3)?
(Please wrap your lines.) On Oct 26 01:38:34, Ulrich.Windl at rz.uni-regensburg.de wrote: > Playing with Opus 1.3 I converted a tone sweep with a sample rate of 96kHz (just for fun). Before I had converted that from WAV to FLAC, and to Vorbis without problems. Can you please post the original wav? I am not sure what Audacity means by a logarithmisch sweep. Is that a fixed number of Hertz per
2015 Jan 28
0
[Q] Get formal arguments of my implemented S4 method
Would you please clarify your exact use case? Thanks, Michael On Wed, Jan 28, 2015 at 9:02 AM, Roebuck,Paul L <PLRoebuck at mdanderson.org> wrote: > Interrogating some (of my own) code in another package. > > >norm.meth <- getMethod("normalize", "MatrixLike") > >message("str(norm.meth)") > >str(norm.meth) > >
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
Interrogating some (of my own) code in another package. >norm.meth <- getMethod("normalize", "MatrixLike") >message("str(norm.meth)") >str(norm.meth) >message("show(norm.meth at .Data)") >show(norm.meth at .Data) Last show() displays this: function (object, ...) { .local <- function (object, method = c("median",
2018 Nov 05
0
Antw: Re: Antw: Re: Possible bug in Opus 1.3
>>> Jan Stary <hans at stare.cz> schrieb am 05.11.2018 um 11:05 in Nachricht <20181105100534.GB44329 at www.stare.cz>: > (Are we off‑list now by intention?) No, just fooled by the list defaults (some need just reply, others need reply to all) > >> Did you also try to listen at the beginning, shortly before the real tone > appears in the audible spectrum?
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
I'm attempting to reflect the information for use with corresponding fields in GUI (in a different package), to provide default values, argname as key for UI label lookups, etc. So I want something much more like the formals of the implementation: { "object", "method": c("median", "vs", "tukey"),
2004 Aug 06
1
preliminary Speex support in Sweep
Hi Jean-Marc and others, I put Speex support in Sweep (a sound editor) yesterday, and had some fun with it :) I'd like to get some feedback before releasing it publically. I'm not really used to speech codecs (I work more with music) but I've been quite impressed at the file size and quality (especially when you hear what I did with some of the sample files ;) I didn't have any
2015 Jan 29
3
[Q] Get formal arguments of my implemented S4 method
On Jan 28, 2015, at 6:37 PM, Michael Lawrence <lawrence.michael at gene.com> wrote: > At this point I would just due: > > formals(body(method)[[2L]]) > > At some point we need to figure out what to do with this .local() confusion. Agreed, definitely. The current hack is to avoid re-matching arguments on method dispatch, so a fix would need to be fairly deep in the
2012 Aug 04
1
how to coerce the result of sweep to be an array if result of FUN is a string?
Hi, I would like to use sweep to "sweep out" proportions and confidence intervals for an array, however when I supply a function which returns a string (containing something like "9% (3-18%)") I get back a list instead of an array, here is a simplified example: # example showing that sweep does not return an array with same dimensions as STATS as advertised
1998 Aug 21
2
couldn't find FUN
The call to sweep in this function which was working in 0.62.2 is giving me trouble in 62.3: prcomponents <- function(x, center=TRUE, scale=TRUE, N=nrow(x)-1) {if (center) center <- apply(x,2,mean) else center <- rep(0, ncol(x)) if (scale) scale <- sqrt(apply(x,2,var)) else scale <- rep(1, ncol(x)) s <- svd(sweep(sweep(x,2, center),2, scale,
2018 Nov 02
6
Antw: Re: Possible bug in Opus 1.3 (opus-tools-0.2-opus-1.3)?
Hi! Excuse the delay, but I had to deal with a corrupted NTFS file system that ate many important files on an USB stick... The FLAC version of the original is almost 6MB and it can be downloaded slowly from this time-limited link: https://sbr5vjid0jgmce4q.myfritz.net:40262/nas/filelink.lua?id=0ba5a10529a6fe7b On the meaning of a logarithmic sweep: If you use foobar2000 and the