search for: gradient

Displaying 20 results from an estimated 393 matches for "gradient".

2007 Dec 03
12 commits - libswfdec/ libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h libswfdec/swfdec_gradient_pattern.c libswfdec/swfdec_gradient_pattern.h libswfdec/swfdec_movie_as_drawing.c libswfdec/swfdec_pattern.c
libswfdec/ | 2 libswfdec/swfdec_as_strings.c | 17 + libswfdec/swfdec_as_types.c | 16 + libswfdec/swfdec_as_types.h | 2 libswfdec/swfdec_gradient_pattern.c | 129 +++++++++++++++ libswfdec/swfdec_gradient_pattern.h | 67 +++++++ libswfdec/swfdec_movie_as_drawing.c | 172 +++++++++++++++++++- libswfdec/swfdec_pattern.c | 123 -------------- test/imag...
2011 Aug 29
gradient function in OPTIMX
...r, when I use OPTIMX with BFGS( or spg), I've got the following an error message. ---------------------------------------------------------------------------------------------------- > optimx(par=theta0, fn=obj.fy, gr=gr.fy, method="BFGS", > control=list(maxit=10000)) Error: Gradient function might be wrong - check it! ---------------------------------------------------------------------------------------------------- I checked and checked my gradient function line by line. I could not find anything wrong. Is it a bug or something? I prefer OPTIMX, so I'd like to know...
2008 Apr 22
optimization and gradient
Dear all, I am using the functions 'optim' and 'nlminb'. For both, you can provide a function which computes the gradient of the objective function (to enhance speed and precision). In my case, both the objective function and the gradient take time to be computed and share many common computations (similar matrix, products, etc...). Therefore, I have to compute these quantities twice which slows down the procedure...
2011 Aug 31
Gradients in optimx
Hi Reuben, I am puzzled to note that the gradient check in "optimx" does not work for you. Can you send me a reproducible example so that I can figure this out? John - I think the best solution for now is to issue a "warning" rather than an error message, when the numerical gradient is not sufficiently close to the user-speci...
2004 Mar 29
calculate length of gradient ?
...tests=MSGID_FROM_MTA_HEADER,RCVD_IN_BL_SPAMCOP_NET autolearn=no version=2.63 Dear r-help list, my question is about ordination technics: To decide using a linear model response or a unimodal model response, in Canoco (software for ordination technics) you can calculate a so-called "length of gradient". (from Canoco Help file:) > The length of gradient is a measure of how unimodal the species > responses are along an ordination axis. It is the range of the > sample scores divided by the average within-species standard > deviation along the axis. The gradient length is expressed...
2013 Mar 14
question about nls
Hi,all: I met a problem of nls. My data: x y 60 0.8 80 6.5 100 20.5 120 45.9 I want to fit exp curve of data. My code: > nls(y ~ exp(a + b*x)+d,start=list(a=0,b=0,d=1)) Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates I can't find out the reason for the error. Any suggesions are welcome. Many thanks. [[alternative HTML version deleted]]
2005 Nov 16
I have to compute some standard errors using the delta method and so have to use the command "numericDeriv" to get the desired gradient. Befor using it on my complicated function, I've done a try with a simple exemple : x <- 1:5 numericDeriv(quote(x^2),"x") and i get : [1] 1 8 27 64 125 216 attr(,"gradient") [,1] [,2] [,3] [,4] [,5] [,6] [1,] Inf 0 0 NaN 0 0 [2,] 0 0 0...
2017 Oct 24
draw a circle with a gradient fill
Hi all,I would like to draw a simple circle where the color gradient follows the rule color = 1/(r^2) where r is the distance from the circle. I would also like to add a color bar with values going from -40 to -110 (and associate those with the color gradient that fills the circle). So far I experiemented with draw circle install.packages('plotrix')requi...
2009 Apr 26
Stochastic Gradient Ascent for logistic regression
Hi. guys, I am trying to write my own Stochastic Gradient Ascent for logistic regression in R. But it seems that I am having convergence problem. Am I doing anything wrong, or just the data is off? Here is my code in R - lbw <- read.table("" , header=TRUE...
2013 Oct 03
SSweibull() : problems with step factor and singular gradient
SSweibull() :  problems with step factor and singular gradient Hello I am working with growth data of ~4000 tree seedlings and trying to fit non-linear Weibull growth curves through the data of each plant. Since they differ a lot in their shape, initial parameters cannot be set for all plants. That’s why I use the self-starting function SSweibull(). How...
2011 Feb 15
"Error : singular gradient matrix at initial parameters estimates"
Dear all, I am a fresh user of R and I already face to problems that I don't understand. In the use of the function nls(), I systematically have an error message : "Singular gradient matrix at initial parameters estimates". I tried to use nls() on a set of data that I subseted from a bigger matrix data. I wish to fit a gaussian on these points (spectrum) and draw this fit on the plot. Is this possible? Why do I always have this error message when using nls() ? Thank you f...
2008 Apr 08
diagonally fill a rectangle with color gradient
Hi, Is it possible to diagonally fill a rectangle with a color gradient? I noticed that the gradient.rect of plotrix could fill a rect either up and down or from side to side. I am looking for something similar but fills diagonally instead, e.g., from the upper left corner to the bottom right. Does anyone know how to do it in R? Thanks, -- Tom [[alternative HTML v...
2006 Jun 19
help on nlm (gradient) (fwd)
...ymore. Figured it out. Thanks for everything. Luz ---------- Forwarded message ---------- Date: Sun, 18 Jun 2006 23:12:25 -0600 (MDT) From: Luz Maria Palacios Derflingher <palacios at> To: r-help at Cc: r-help at Subject: help on nlm (gradient) Hello. I am having some trouble using nlm in R for windows version 2.2.1. I have to minimise a function which includes in its insides the evaluation of integrals through the "adapt" function. In order to make R work less, I calculated the gradient and coded it. I made sure that the...
2007 Feb 07
Singular Gradient
I tried to fit data with the following function: fit<-nls(y~ Is*(1-exp(-l*x))+Iph,start=list(Is=-2e-5,l=2.3,Iph=-0.3 ),control=list(maxiter=500,minFactor=1/10000,tol=10e-05),trace=TRUE) But I get only a singular Gradient warning... the data can by found attached(there are two sampels of data col 1/2 and 3/4). I tried to fix it by chanching the start parameters but that didn't solve the problem. Would it be a possibiliti to use the selfstart Model? How? Thanks for any answers This
1999 Nov 24
nlm gradient and hessian
Out of curiosity, I have tried, without success, to use the new facility in nlm to specify the gradient and hessian. (It is many years since I had a problem simple enough to make analytic derivation of these worthwhile.) The help now says that the function must have attributes with these names but gives no indication as to what should be in the attributes. The online example and demo do not use the n...
2008 Apr 28
Making color gradient
Hi I would like to make a color bar with a gradient of colors that represent values between 0-1. I used the gradient.rect function in plotrix to make the actually color bar but I don't know how to put a range of values (0-1) next to the color bar. How do I do this? Thanks Zarrar -- Zarrar Shehzad Research Assistant NYU Child Study Center 21...
2018 Apr 05
Obtain gradient at multiple values for exponetial decay model
...,16 280,12 320,10 360,9 400,7 graphdata<-read.csv('~/tmp/data.csv') graphmodeld<-lm(log(graphdata[,2])~graphdata[,1]) graphmodelp<-exp(predict(graphmodeld)) plot(graphdata[,2]~graphdata[,1]) lines(graphdata[,1],graphmodelp) Please what is the function and syntax to obtain gradient values for the model curve at various requested values, e.g.: when graphdata[,1] at values = 100, 250, 350 ?
2015 Sep 04
[RFC] Refinement of convergent semantics
...this operation may not be made control dependent on any additional values (aka may not be sunk into a condition) nospeculate - this operation may not be added to any program trace on which it was not previously executed (same as notrap?) Most of today’s convergent operations (barriers, arithmetic gradients) would continue to be marked only as convergent. The new semantics would allow full loop unrolling, and provide clarity on which loop unswitching operations are allowed, examples below. The one case where nospeculate would also be needed is in the case of texture fetches that compute implicit gr...
2018 Feb 05
Package sgd
A web search on "gradient descent R" also brought up a bunch of stuff. Is any of this what you want? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )...
2018 Apr 05
Obtain gradient at multiple values for exponetial decay model
...9 This prompted to think that interpolation is required, but the function 'approx' only seems to perform constant interpolation. Is the correct thinking to find a function to perform interpolation, then find/write a function to differentiate the model at a specific value of x, to find gradient at that point?