search for: f_1

Displaying 20 results from an estimated 32 matches for "f_1".

Did you mean: f1
2011 Dec 10
2
efficiently finding the integrals of a sequence of functions
..., I am having a question about efficiently finding the integrals of a list of functions. To be specific, here is a simple example showing my question. Suppose we have a function f defined by f<-function(x,y,z) c(x,y^2,z^3) Thus, f is actually corresponding to three uni-dimensional functions f_1(x)=x, f_2(y)=y^2 and f_3(z)=z^3. What I am looking for are the integrals of these three functions f_1,f_2,f_3 over some interval, say, (0,1). More specifically, the integrals \int_0^1 f_1(x) dx, \int_0^1 f_2(y) dy and \int_0^1 f_3(z) dz. For this simple example, of course we can do these three int...
2003 Apr 21
2
piece wise functions
...e regression coefficients for each "interval" but also the beginning and ends of the intervals. To simplify it to the one dimensional case and two intervals, the problem is to find A_0, A_1, ... A_p and "C" from the given sample, assuming the curve is like this: A_0*f_0(x)+A_1*f_1(x)+ ... + A_p*f_p(x) with x < C A_0'*f_0(x)+A_1'*f_1(x)+ ... + A_p'*f_p(x) with x >= C Functions f_1, f_2, ... f_p are known. Is there anything in R for that? I have tried to use nonlinear (nls package) regression, "forcing" with the "nls" function the shap...
2016 Sep 13
3
undef * 0
Hi Soham, You're right that in LLVM IR arithmetic (with the current definition of `undef`) is not distributive. You can't replace `A * (B + C)` with `A * B + A * C` in general, since (exactly as you said) for A = `undef`, B = `1`, C = `-1` the former always computes `0` while the latter computes `undef`. This is fundamentally because replacing `A * (B + C)` with `A * B + A * C`
2006 Jan 20
1
Calling MySQL 5 stored procedures from app_mysql
Hello all. I am trying to use app_mysql. It works for selects and functions, but does not want to work with procedures. Pls have a look: Calling function: CREATE FUNCTION f_1(a VARCHAR(20)) RETURNS INTEGER RETURN (SELECT count(*) from peer where name = a); Result: -- Executing Macro("IAX2/100-3", "local|100") in new stack -- Executing MYSQL("IAX2/100-3", "Connect connid localhost asterisk asterisk pbx_manager_new") in new...
2010 Sep 08
11
problem with outer
...,size=1,prob=p_0) X_1=rmultinom(n-q+1,size=1,prob=cbind(p_11,p_12,(1-p_11-p_12))) N_0=apply(X_0[,(n-2*k-L+1):(n-k-L)],1,sum) N_1=apply(X_1[,(n-q-k+2):(n-q+1)],1,sum) S_vek[i]=((sum(((N_1-k*cbind(p_11,p_12,(1-p_11-p_12)))^2)/k*cbind(p_11,p_12,(1-p_11-p_12))))/(sum(((N_0-k*p_0)^2)/k*p_0)))-1 } 1-mean(f_1<=S_vek & S_vek <=f_2) } An other problem i have is when i define p_11=seq(0,1,0.1) p_12=seq(0,1,0.1) then i get also this error message: Error in rmultinom(n - q + 1, size = 1, prob = rbind(p_11, p_12, (1 - : non-positive probability i cannot solve this problem too. Thank you for...
2012 Mar 23
3
R numerical integration
Hi all, Is there any other packages to do numerical integration other than the default 'integrate'? Basically, I am integrating: integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value The integration is ok provided sigma is >0. However, when mu=-1.645074 and sigma=17535.26 It stopped working. On the other hand, Maple gives me a value of 0.5005299403. It is an
2010 Mar 04
2
which coefficients for a gam(mgcv) model equation?
Dear users, I am trying to show the equation (including coefficients from the model estimates) for a gam model but do not understand how to. Slide 7 from one of the authors presentations (gam-theory.pdf URL: http://people.bath.ac.uk/sw283/mgcv/) shows a general equation log{E(yi )} = ?+ ?xi + f (zi ) . What I would like to do is put my model coefficients and present the equation used. I am an
2016 May 30
3
Loads and stores of unsized types?
This came up in D20764, this IR verifies today: %X = type opaque define void @f_0(%X* %ptr) { %t = load %X, %X* %ptr ret void } define void @f_1(%X %val, %X* %ptr) { store %X %val, %X* %ptr ret void } which I found surprising -- what does it mean to load / store values of unknown sizes? Passing it to llc fails an assertion. Are there legitimate cases where we'd want to generate such IR? -- Sanjoy
2001 Oct 22
2
OT: compare several graphs
Hi all, this is OT, but maybe someone can give me a clue. I've got data from eye tracker experiments (750 data points). These figures show how the data lock like |** * ***** |*** ****** | ** **** | * * | | * * | | * |-------------- |--------------- Y axes display velocity, x axes display time, * are the data points.
2016 Jun 01
0
Loads and stores of unsized types?
...es. On Mon, May 30, 2016 at 4:05 PM Sanjoy Das via llvm-dev < llvm-dev at lists.llvm.org> wrote: > This came up in D20764, this IR verifies today: > > %X = type opaque > > define void @f_0(%X* %ptr) { > %t = load %X, %X* %ptr > ret void > } > > define void @f_1(%X %val, %X* %ptr) { > store %X %val, %X* %ptr > ret void > } > > which I found surprising -- what does it mean to load / store values > of unknown sizes? Passing it to llc fails an assertion. Are there > legitimate cases where we'd want to generate such IR? > >...
2009 May 06
0
bivariate normal and rho
Hi, Let f(rho) = E[F_1(x) F_2(y)], i.e f(rho) is the expectation of F(x) * F(y) with respect to the bivariate Gaussian density with mean 0 and covariance matrix [1 rho; rho 1]. Moreover, assume F_1(x) and F_2(y) to be increasing functions of x and y respectively. I was wondering if it was true that f(rho) is an increasi...
2003 Nov 10
1
ts package function filter: mismatch between function action and help (PR#5017)
...SE, init) # init: for recursive filters only. Specifies the initial values of # the time series just prior to the start value, in reverse # time order. The default is a set of zeros. but looks as if it should be in usual order as x is e.g. init y_0 y_-1 y_-2: 3, 2, 1 filter f_1 f_2 f_3: 1, .5, .25 x: 4, 5, 6, 7, 8 y_1 = 4 + 1*3 + .5*2 + .25*1 = 8.25 y_2 = 5 + 1*8.25 + .5*3 + .25*2 = 15.25 ... but > filter(4:8,c(1,.5,.25),method="recursive", init=3:1) Time Series: Start = 1 End = 5 Frequency = 1 [1] 6.7500 12.7500 22.3750 37.4375 59.8125 whereas > f...
2013 Nov 19
1
Generación de números aleatorios. Mixtura k-puntos
Saludo cordial para cada uno. Les pido ayuda para generar números aleatorios de una mixtura k-puntos. Sabemos que la función de distribución F es una mixtura k-puntos si es de la forma F(x) = p_1 F_1(x) + p_2 F_2(x) + … + p_k F_k(x), donde F_j es una función de distribución de probabilidad, p_j > 0 y suma(p_j) = 1, para j = 1, 2, …, k. En mi caso particular F es la suavización de la función de probabilidad discreta {p_j} mediante kernel gamma. En el siguiente código F es la función Keg:...
2016 Sep 13
2
undef * 0
...e replaced with `X - X`, even > > though `X - X` can be folded to `0`. > > I forgot to state that `X` above is some unknown value which can > potentially be `undef`. A full example would be: > > ``` > define i32 @f_0(i32 %x) { > ret i32 0 > } > > define i32 @f_1(i32 %x) { > %v = sub i32 %x, %x > ret i32 %v > } > ``` > > `@f_1` can be optimized to `@f_0` but not vice versa, unless you > somehow know that `%x` cannot be `undef`. > > -- Sanjoy >
2006 Nov 18
1
Questions regarding "integrate" function
Hi there. Thanks for your time in advance. I am using R 2.2.0 and OS: Windows XP. My final goal is to calculate 1/2*integral of (f1(x)^1/2-f2(x)^(1/2))^2dx (Latex codes: $\frac{1}{2}\int^{{\infty}}_{\infty} (\sqrt{f_1(x)}-\sqrt{f_2(x)})^2dx $.) where f1(x) and f2(x) are two marginal densities. My problem: I have the following R codes using "adapt" package. Although "adapt" function is mainly designed for more than 2 dimensions, the manual says it will also call up "integrate" if t...
2004 Jul 10
1
Exact Maximum Likelihood Package
...s)^2 + 6*(1-p)*t^2*(1-t)^2; f3 = 4*p*s^3*(1-s) + 4*(1-p)*t^3*(1-t); f4 = p*s^4 + (1-p)*t^4; The polynomial f_i represents the probability of seeing i successes. Suppose we repeat this experiment 1000 times, and u_i is the number of times we saw i successes. The likelihood of this event is f_0^u_0*f_1^u_1*f_2^u_2*f_3^u_3*f_4^u_4, and we seek to find those parameter values for s,t,p which maximize the likelihood. My Singular package has as input the 5 polynomials and a data vector u. For the particular example of u = (3,5,7,11,13). The output are the following four roots (p,s,t) and the correspo...
2006 Nov 17
0
Question regarding "integrate" function
Hi there. Thanks for your time in advance. My final goal is to calculate 1/2*integral of (f1(x)^1/2-f2(x)^(1/2))^2dx (Latex codes: $\frac{1}{2}\int^{{\infty}}_{\infty} (\sqrt{f_1(x)}-\sqrt{f_2(x)})^2dx $.) where f1(x) and f2(x) are two estimated marginal densities. My problem: I have the following R codes using "adapt" package. Although "adapt" function is mainly designed for more than 2 dimensions, the manual says it will also call up "integrate&...
2006 Nov 17
0
questions regarding "integrate" function in R
Hi there. Thanks for your time in advance. My final goal is to calculate 1/2*integral of (f1(x)^1/2-f2(x)^(1/2))^2dx (Latex codes: $\frac{1}{2}\int^{{\infty}}_{\infty} (\sqrt{f_1(x)}-\sqrt{f_2(x)})^2dx $.) where f1(x) and f2(x) are two marginal densities. My problem: I have the following R codes using "adapt" package. Although "adapt" function is mainly designed for more than 2 dimensions, the manual says it will also call up "integrate" if t...
2013 Aug 23
1
Setting up 3D tensor product interactions in mgcv
Hi, I am trying to fit a smoothing model where there are three dimensions over which I can smooth (x,y,z). I expect interactions between some, or all, of these terms, and so I have set up my model as mdl <- gam(PA ~ s(x) + s(y) + s(z) + te(x,y) + te(x,z) + te(y,z) + te(x,y,z),...) I have recently read about the ti(), "tensor product interaction smoother", which takes care of these
2016 Jun 14
4
Early CSE clobbering llvm.assume
Hal, To simplify this discussion, lets first just focus on code without asserts and assumes, I don’t follow your logic, you seem to be implying we don’t optimize property-propagation through “if-then” and “while-do” well ? --Peter. From: Hal Finkel [mailto:hfinkel at anl.gov] Sent: Tuesday, June 14, 2016 11:12 AM To: Lawrence, Peter <c_plawre at qca.qualcomm.com> Cc: llvm-dev