search for: cosin

Displaying 20 results from an estimated 283 matches for "cosin".

Did you mean: coin
1999 Dec 01
1
density(kernel = "cosine") .. the `wrong cosine' ..
...el densities. {History: density() was newly introduced in version 0.15, 19 Dec 1996; most probably by Ross or Robert } When I was telling the students about different kernels (and why their choice is not so important, and "equivalent bandwidths" etc,etc) I wondered about the "Cosine" in my teaching notes which is defined there as k(x) = pi/4 * cos(pi/2 * x) * I{ |x| <= 1 } i.e. in R Kcos <- function(x) ifelse(abs(x) <= 1, pi/4 * cos(pi/2 * x), 0) Now, R has instead (for bandwidth h <- bw/1.135724 which makes the bandwidth Gaussian equivalent;...
2002 Jan 09
1
Distance matrix by cosine?
Hello, a. is there a possibility to obtain a distance matrix with the cosine between vectors?? hclust, hierclust, dist will not work and seem to be hard to extend. b. if there is not: Is the cosine between vectors implemented somewhere? Thanks for all hints and advice! Petra Steiner -------------- next part -------------- An HTML attachment was scrubbed... URL: https:/...
2020 Sep 09
3
constrained cosine rounding mode behavior
Hi: I am trying to implement interval arithmetic through llvm. I have a problem with the rounding mode with llvm.experimental.constrained.cos I have two pieces of codes: ; Function Attrs: norecurse nounwind readnone ssp uwtable define double @cosine_down(double returned) local_unnamed_addr #0 {   ; call the llvm intrinsic to perform downward cosine   %2 = call double @llvm.experimental.constrained.cos(double %0, metadata !"round.downward", metadata !"fpexcept.strict")   ret double %2 } ; Function Attrs: norecurse nounwind...
2002 Jan 25
1
Fw: Summary for Distance matrix by cosine?
Dear all, below you find enclosed my message from January 9th and my program (attention: beginner). Thanks for both answers! a. However, as far as I know the cosine is not the same as the Pearson correlation (only in special cases). b. Reid Huntsinger's hint was very useful, however I had to transpose the matrix first, for I want to calculate the distance of the _rows_. Regards, Petra Steiner #Funktion: Berechnung der Distanzmatrix mit dem Kosinus als...
2012 Nov 26
1
cosine curve fit
does anybody have a suggestion as to how to use R to fit some date to a cosine function and then have some output statistics that will evaluate the fit? -- View this message in context: http://r.789695.n4.nabble.com/cosine-curve-fit-tp4650866.html Sent from the R help mailing list archive at Nabble.com.
2012 Feb 23
1
Problems with Cosine Similarity using library(lsa)
...kages, but the only way to library(lsa) works it is on R 32-bits release. The problem here is that R don't leave me to load all data from my matrix and tell me that it is not able to load big vectors (may be due to limitations on memory of 32-bit release). The issue is that I need to calculate cosine similarities on my matrix data. Has somebody any suggestion or idea about how to do it (a different library or a formula to get it)? Thanks in advance. Best, AJ [[alternative HTML version deleted]]
2006 Oct 06
4
Row comparisons to a new matrix?
Hi, Can somebody tell me, which is the fastest way to make comparisons between all rows in a matrix (here A) and put the results to the new symmetric matrix? I have here used cosine distance as an example, but the comparison function can be any other, euclidean dist etc. A=rbind(c(2,3),c(4,5),c(-1,2),c(5,6)) M=matrix(nrow=length(A[,1]),ncol=length(A[,1])) for(i in 1:length(A[,1])) { for(j in 1:length(A[,1])) { M[i,j]=cosine(A[i,],A[j,]) } } Atte Tenkanen University o...
2017 Jun 20
5
fitting cosine curve
Hi R users, I have a question about fitting a cosine curve. I don't know how to set the approximate starting values. Besides, does the method work for sine curve as well? Thanks. Part of the dataset is in the following: y=c(16.82, 16.72, 16.63, 16.47, 16.84, 16.25, 16.15, 16.83, 17.41, 17.67, 17.62, 17.81, 17.91, 17.85, 17.70, 17.67, 17.45, 17....
2017 Jun 20
0
fitting cosine curve
Hi lily, You can get fairly good starting values just by eyeballing the curves: plot(y) lines(supsmu(1:20,y)) lines(0.6*cos((1:20)/3+0.6*pi)+17.2) Jim On Wed, Jun 21, 2017 at 9:17 AM, lily li <chocold12 at gmail.com> wrote: > Hi R users, > > I have a question about fitting a cosine curve. I don't know how to set the > approximate starting values. Besides, does the method work for sine curve > as well? Thanks. > > Part of the dataset is in the following: > y=c(16.82, 16.72, 16.63, 16.47, 16.84, 16.25, 16.15, 16.83, 17.41, 17.67, > 17.62, 17.81, 17.91, 17...
2005 Sep 12
4
Document clustering for R
...ing. I know that R has clustering algorithms such as clara, but only supports two distance metrics: euclidian and manhattan, which are not very useful for clustering documents. I was wondering how easy it would be to extend the clustering package in R to support other distance metrics, such as cosine distance, or if there was an API for custom distance metrics. Best regards, Raymond Pon pon3 at llnl.gov x43062
2001 Jun 10
0
Modified discrete cosine transform
I am trying to learn something of the algorithms used in Vorbis. One of them is the "Modified Discrete Cosine Transform" (MDCT). I have found a couple of books with brief descriptions of the DCT, but almost nothing about MDCT. (1) is there just one Modified DCT, which can be expected to be the same whenever someone uses that name, or does it just mean that you have changed the DCT, but a...
2011 Nov 05
1
3-D ellipsoid equations
...at it is something like the following: X(alpha)=Xo+a cos(α) cos( θ )-b sin(α) cos( θ ) + c cos( θ ) Y(alpha)=Yo+ cos (α) sin(θ)+b sin(α) cos (θ) Z(alpha)=Zo+a cos (α) sin(θ) +b sin(α) cos( θ ) Most of the books I have read use eigenvectors. The eigenvectors of course consist of the direction cosines. My difficulty is going from that approach to the approach that Alberto Monteiro took in his message on the 9 October 2006. I understand the R code and am using it for a two-dimensional ellipse problem. There does not seem to be allowance for the new coordinates of the center of the ellipsoid und...
2007 Jan 23
3
[fixed] vectorized nested loop: apply a function that takes two rows
...he docs for do.call, apply, etc, I still don't know how to write the nested loop in a vectorized way. Example data: x = matrix(rnorm(100), 10, 10) # this is actually a very large sparse matrix, but it doesn't matter for the # example library(Matrix) x = as(x,"CsparseMatrix") # cosine function cosine = function (x, y){ if (is.vector(x) && is.vector(y)) { return(crossprod(x, y)/sqrt(crossprod(x) * crossprod(y))) } else {stop("cosine: argument mismatch. Two vectors needed as input.")} } # The loop-based solution I have is: if (is(x, "Matrix") )...
2007 Jan 23
3
[fixed] vectorized nested loop: apply a function that takes two rows
...he docs for do.call, apply, etc, I still don't know how to write the nested loop in a vectorized way. Example data: x = matrix(rnorm(100), 10, 10) # this is actually a very large sparse matrix, but it doesn't matter for the # example library(Matrix) x = as(x,"CsparseMatrix") # cosine function cosine = function (x, y){ if (is.vector(x) && is.vector(y)) { return(crossprod(x, y)/sqrt(crossprod(x) * crossprod(y))) } else {stop("cosine: argument mismatch. Two vectors needed as input.")} } # The loop-based solution I have is: if (is(x, "Matrix") )...
2024 Mar 26
1
core & cosine schema items in Samba AD DC user object?
Please, it is possible (perhaps with some Samba schema extension?) to have items as 'c' (countryName), 'l' (localityName), 'l' (localityName), 'co' (friendlyCountryName), 'street' (streetAddress), 'displayName' etc. in the description of the USER object? And then how to manage them? The "samba-tool user add" doesn't seem to have a
2000 Mar 09
0
cosine and sine
Excuse me if this is has been discussed before, but, How can I make the cos(pi/2) = 0 (instead of on my machine 6.123234e-17) and the sin(pi) = 0 (instead of 1.224647e-16 on my machine) ? I'd like sin(pi) == 0 to return TRUE, and is zapsmall appropriate here? -------------- next part -------------- A non-text attachment was scrubbed... Name: brian.vcf Type: text/x-vcard Size: 411 bytes Desc:
2017 Jun 21
0
fitting cosine curve
Thanks. I will do a trial first. Also, is it okay to have the datasets that have only part of the cycle, or better to have equal or more than one cycle? That is to say, I cannot have the complete datasets sometimes. On Tue, Jun 20, 2017 at 7:37 PM, Don Cohen <don-r-help at isis.cs3-inc.com> wrote: > > If you know the period and want to fit phase and amplitude, this is > equivalent
2024 Mar 26
1
core & cosine schema items in Samba AD DC user object?
On Tue, 26 Mar 2024 17:13:34 +0100 Franta Hanzl?k <franta at hanzlici.cz> wrote: > > Yes, that's how I understood it later. > But what surprised me is that an object ("user" class in this case) > can be assigned any imaginary attribute - I thought that the Samba > AD schema strictly limits what objects and with what attributes can > be in the AD. But maybe
2012 Aug 30
2
self-defined distance function to be computed on matrix
...are(1)+square(1)) Distance(AC) = (1X1+(-1)X1+(-1)X1+1X(-1))/de(AC), and de(BC) = sqrt(square(1)+square(-1)+square(-1)+square(1)) X sqrt(square(1)+square(1)+square(1)+square(-1)) As you may see, the numerator is basically the dot product of the two vectors; this function actually is more like the cosine function in R, but with some variations. I would need to compute the distance between any two vectors in a matrix. It would be ideal if the results could be the output that produces by some R distance function. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/self...
2017 Jun 21
2
fitting cosine curve
...) >>> lines(0.6*cos((1:20)/3+0.6*pi)+17.2) >>> >>> Jim >>> >>> >>> On Wed, Jun 21, 2017 at 9:17 AM, lily li <chocold12 at gmail.com> wrote: >>> > Hi R users, >>> > >>> > I have a question about fitting a cosine curve. I don't know how to set >>> > the >>> > approximate starting values. Besides, does the method work for sine >>> > curve >>> > as well? Thanks. >>> > >>> > Part of the dataset is in the following: >>> > y...