search for: gradients

Displaying 20 results from an estimated 1002 matches for "gradients".

Did you mean: gradient
2007 Dec 03
0
12 commits - libswfdec/Makefile.am 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
...FDEC_ERROR ("different lengths for colors, alphas and ratios, aborting"); + return; + } + draw = swfdec_gradient_pattern_new (); + pattern = SWFDEC_PATTERN (draw); + gradient = SWFDEC_GRADIENT_PATTERN (draw); + gradient->radial = radial; + len = MIN (len, 8); + gradient->n_gradients = len; + for (i = 0; i < len; i++) { + int c, a, r; + SwfdecAsValue v; + int check = swfdec_sprite_movie_gradient_fill_check_length (colors, alphas, ratios); + if (check > i) { + const char *name = swfdec_as_integer_to_string (cx, i); + if (swfdec_as_object_get_variable...
2011 Aug 29
3
gradient function in OPTIMX
Dear R users When I use OPTIM with BFGS, I've got a significant result without an error message. However, 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", >
2011 Jul 06
1
gradient generation
Dear R-help subscribers; I have a question regarding making gradients in R. I've searched on the web, but was only able to find functions that make a gradient between color X and Y, which is not what I want. I want to 'pick out' individual, smaller pieces of a gradient based on a range of numbers. Say that I have a range of numbers, leading from 0 to...
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
I have constructed the function mml2 (below) based on the likelihood function described in the minimal latex I have pasted below for anyone who wants to look at it. This function finds parameter estimates for a basic Rasch (IRT) model. Using the function without the gradient, using either nlminb or optim returns the correct parameter estimates and, in the case of optim, the correct standard
2011 Nov 30
1
How can I pick a matrix from a function? (Out Product of Gradient)
Hi all, I would like to use optim() to estimate the equation by the log-likelihood function and gradient function which I had written. I try to use OPG(Out Product of Gradient) to calculate the Hessian matrix since sometime Hessian matrix is difficult to calculate. Thus I want to pick the Gradient matrix from the gradient function. Moreover, could R show the process of calculation on gradient
2007 Sep 17
4
graphs with gradients of colors
Hi All, I would like to fill the area under a curve with a gradient of colors. Are there any packages or trick I could use Thanks Stefan Stefan Van Dongen Antwerp [[alternative HTML version deleted]]
2005 Aug 04
4
optim
Dear R-helpers, The function optim implements algorithms that I would like to use. I have function implemented in R, which given the parameters of which minimization is to take place returns a scalar as well as the gradient. Unfortunately optim requires two function _fn_ and _gr_ where fn returns the function value and gr the gradient. Splitting my function in two functions would be easy,
2009 Jun 25
3
grid.polygon() + color gradient
Hi, I wonder whether there is a way to generate a polygon (a triangle in my case) with color gradient using grid.polygon() in package grid? I tried something like library(grid) grid.polygon(x=c(0, 0.5, 1), y=c(0.5, 1, 0.5), gp=gpar(col=NA, fill=colorRampPalette(c("green", "lightgray"), space="Lab")(200))) But am only
2011 May 03
3
help with the maxBHHH routine
...however, this gives me the following error: *Error in checkBhhhGrad(g = gr, theta = theta, analytic = (!is.null(attr(f, : the matrix returned by the gradient function (argument 'grad') must have at least as many rows as the number of parameters (10), where each row must correspond to the gradients of the log-likelihood function of an individual (independent) observation: currently, there are (is) 10 parameter(s) but the gradient matrix has only 2 row(s) * It seems it is expecting as many rows as there are parameters. So, I changed my likelihood function so that it would return the transpose...
2006 Oct 06
3
is it possible to fill with a color or transparency gradient?
...t's possible that I'm just missing something, but I haven't found anything like this in the help files. I've tried to poke around in graphics, grid, and ggplot, without any luck so far. I really like some of the functionality in ggplot, and it does some nice things with continuous gradients for the color of scatter plot points, for example, but it each individual point (or grob) is always one solid color as far as I can tell. Thanks, Eric
2008 Apr 22
2
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
2003 Jan 17
1
supplying gradient to constrOptim()
Hi, I'm very interested in using the constrOptim() function currently in the R-devel sources. In particular, I'm trying to fit point process conditional intensity models via maximum likelihood. However, I noticed that the gradient of the objective function must be supplied for all but the Nelder-Mead method. I was wondering why this was because optim() itself does not require a gradient
2008 Mar 28
1
Singular Gradient in nls
//Referring to the response posted many years ago, copied below, what is the specific criterium used for singularity of the gradient matrix? Is a Singular Value Decomposition used to determine the singular values? Is it the gradient matrix condition number or some other criterion for determining singularity? // //Glenn // / / /> What does the error 'singular gradient' mean
2011 Aug 29
0
Error: Gradient function might be wrong ----- in OPTIMX
Dear R users When I use OPTIMX with BFGS, I've got the following error message. ----------------------------------------------------------------- > optimx(par=theta0, fn=obj.fy, gr=gr.fy, method="BFGS") Error: Gradient function might be wrong - check it! ----------------------------------------------------------------- So, I checked and checked my gradient function line by
2004 Mar 29
1
calculate length of gradient ?
Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hypatia.math.ethz.ch X-Spam-Level: **** X-Spam-Status: No, hits=4.2 required=5.0 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:
2013 Mar 14
2
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
2003 Mar 27
1
How to obtain final gradient estimation from optim
I use optim to compute maximum likelihood estimations without giving an analytical gradient to optim. However, I would like to get an output of the final numerical gradient vector and the final matrix of contributions to the gradient. But I did not find any mention of this kind of output in help pages. Does anyone know how to do that ? Stephane Luchini GREQAM Marseille, France
2013 Jun 11
2
How can we access an element in a structure
Hi, I have a structure, which is the result of a function How can I access the elements in the gradient? > dput(test1) structure(-1.17782911684913, gradient = structure(c(-0.0571065371783791, -0.144708170683529), .Dim = 1:2, .Dimnames = list(NULL, c("x1", "x2")))) > test1[[1]] [1] -1.177829 > test1 [1] -1.177829 attr(,"gradient") x1
2006 Sep 29
1
linear gradient in nls
Hello, I hope this doesn't turn into a statistics question but here I go. I am using the nls function with a Gaussian distribution, see coding below. When I run the nls I get an error back saying that I have a linear gradient. I then, of course am unable to do anything else. The data that I am using are intensity values from some mass spectrometry data. Is there something I can
2005 Apr 23
1
start values for nls() that don't yield singular gradients?
...ue '?'s. All of my guesses yield either a "singular gradient" error if they are decent guesses, or a "singular gradient matrix at initial parameter estimates" error if they are bad guesses like all zeros. How can I pick starting values that don't result in singular gradients? I have had no luck with the "selfStart" models, e.g., "SSgompertz" -- the formula in "SSgompertz" is not the same as the one I need above, since it has three parameters instead of four. I've tried it and SSfpl thusly: > getInitial(y ~ SSfpl(x,a,b,c,d),data=...