Displaying 20 results from an estimated 4000 matches similar to: "disturbing seed dependence in optim L-BFGS-B method"
2009 Dec 28
2
Modified R Code
Dear R helpers,
I have following input files. (Actually they are more than 10 rates but here i am considering only 2 rates to write my problem)
rate1.csv
min1 max1 min2 max2 min3 max3
1.05 1.30 1.30 1.65 1.65 1.99
rate2.csv
min1 max1 min2 max2 min3
2016 Nov 08
2
should we have IR intrinsics for integer min/max?
Thanks, Hal and Matt for the feedback. As usual, my instincts about
canonicalization were probably wrong. :)
I thought that @max1 vs. @max3 would be viewed as an unknowable trade-off
between reducing the dependency chain and the pseudo-canonical min/max
form, so we'd add intrinsics, and defer that decision to the backend.
I'll wait to see if there are any other arguments presented.
2012 Jan 27
3
Subsetting for the ten highest values by group in a dataframe
Hello,
I am looking for a way to subset a data frame by choosing the top ten
maximum values from that dataframe. As well this occurs within some
factor levels.
## I've used plyr here but I'm not married to this approach
require(plyr)
## I've created a data.frame with two groups and then a id variable (y)
df <- data.frame(x=rnorm(400, mean=20), y=1:400,
2009 Jun 04
3
Fast way of finding top-n values of a long vector
If x is a (long) vector and n << length(x), what is a fast way of
finding the top-n values of x?
Some suggestions (calculating the ratio of the two top values):
library("rbenchmark")
set.seed(1); x <- runif(1e6, max=1e7); x[1] <- NA;
benchmark(
replications=20,
columns=c("test","elapsed"),
order="elapsed"
, sort = {a<-sort(x,
2016 Nov 07
5
should we have IR intrinsics for integer min/max?
Hi -
The answer to this question may help to resolve larger questions about
intrinsics and vectorization that were discussed at the dev mtg last week,
but let's start with the basics:
Which, if any, of these is the canonical IR?
; ret = x < y ? 0 : x-y
define i32 @max1(i32 %x, i32 %y) {
%sub = sub nsw i32 %x, %y
%cmp = icmp slt i32 %x, %y ; cmp is independent of sub
%sel = select
2005 Nov 24
0
htb thingy
hi all
i want to first apollogiaze if my message will annoy you(my guess is
because it will be quite large:))
i have the following situation on my hands
i was recently faced with the problem of traffic shaping/bandwith
limiting.
my setup is(very common i guess)
-internet comming in(going out) through eth0
-internet is being "shared" with the private local network via eth1.
i
2016 Apr 18
0
[PATCH v4 06/37] volt: parse the max voltage map entries
There are at least three "max" entries, which specify the max voltage. Because
they are actually normal voltage map entries, they can also be affected by the
temperature.
Nvidia respects those entries and if they get changed, nvidia uses the lower
voltage from both.
We shouldn't exceed those voltages at any given time.
v2: state what those entries do in the source
v3: add the
2017 Jan 23
1
[PATCH] virtio_net: fix PAGE_SIZE > 64k
I don't have any guests with PAGE_SIZE > 64k but the
code seems to be clearly broken in that case
as PAGE_SIZE / MERGEABLE_BUFFER_ALIGN will need
more than 8 bit and so the code in mergeable_ctx_to_buf_address
does not give us the actual true size.
Cc: John Fastabend <john.fastabend at gmail.com>
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
Lightly tested on x86
2017 Jan 23
1
[PATCH] virtio_net: fix PAGE_SIZE > 64k
I don't have any guests with PAGE_SIZE > 64k but the
code seems to be clearly broken in that case
as PAGE_SIZE / MERGEABLE_BUFFER_ALIGN will need
more than 8 bit and so the code in mergeable_ctx_to_buf_address
does not give us the actual true size.
Cc: John Fastabend <john.fastabend at gmail.com>
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
Lightly tested on x86
2016 Mar 28
1
[PATCH v2 06/22] volt: parse the both max voltage entries
On 21/03/16 18:16, Karol Herbst wrote:
> these entries specify a maximum voltage nvidia never exceeds, we shouldn't do
> that, too.
>
> Signed-off-by: Karol Herbst <nouveau at karolherbst.de>
> ---
> drm/nouveau/include/nvkm/subdev/bios/vmap.h | 2 ++
> drm/nouveau/include/nvkm/subdev/volt.h | 2 ++
> drm/nouveau/nvkm/subdev/bios/vmap.c | 5
2009 Apr 28
3
truehist and density plots
Hi,
I wanted to plot the histogram of a vector and then, plot the density function of subsets of the vector on the histogram. So I use truehist in MASS package and lines(density) as follows:
length(b) = 1000
truehist(b)
lines(density(b[1:100]))
however the density plot of the first 100 points exceeds the max of y axis (see attached). how is it possible to make a graphics so that the density plot
2008 May 09
2
which.max2()
Hello,
which.max() only returns one index value, the one for the
maximum value. If I want the two index values for the two
largest values, is this a decent solution, or is there a
nicer/better R'ish way?
max2 <-function(v)
{
m=which.max(v)
v[m] = -v[m]
m2=which.max(v)
result=c(m, m2)
result
}
Seems to work ok.
Thanks,
Esmail
2004 Jan 19
0
problem with wrr+prio
I have set up wrr successfully on my bridge/shaper machine. That much
works fine. I originally used sfq in the inner classes. However, there
was a problem with high-bandwidth connections (web downloads,
bittorrent) starving low-bandwidth low-latency connections like ssh. I
would like to use prio or similar to prioritize the interactive traffic,
but it does not seem to work. I have tested with
2004 Jan 05
3
optim function : "BFGS" vs "L-BFGS-B"
Dear kind R-experts.
Does anybody have an experience to use optim function?
If yes, what is the main difference between two method "BFGS" vs
"L-BFGS-B"?
I used "BFGS" method and got what I wanted. But when I used "L-BFGS-B"
the error message said that "L-BFGS-B needs finite values of fn". So
that means
"BFGS" method can handle even if fn
2006 Aug 24
1
Optim question
This is a very basic question, but I am a bit confused with optim. I
want to get the MLEs using optim which could replace the newton-raphson
code I have below which also gives the MLEs. The function takes as input
a vector x denoting whether a respondent answered an item correctly
(x=1) or not (x=0). It also takes as input a vector b_vector, and these
are parameters of test items (Rasch estimates
2016 Oct 10
0
optim(…?=, =?utf-8?Q?method=‘L-BFGS-B’) stops with an error message while violating the lower bound
>>>>> Spencer Graves <spencer.graves at prodsyse.com>
>>>>> on Sat, 8 Oct 2016 18:03:43 -0500 writes:
[.............]
> 2. It would be interesting to know if the
> current algorithm behind optim and optimx with
> method='L-BFGS-B' incorporates Morales and Nocedal (2011)
> 'Remark on ?Algorithm 778:
2011 May 25
1
L-BFGS-B and parscale in optim()
Hi,
When using method L-BFGS-B along with a parscale argument, should the
lower and upper bounds provided be on the scaled or unscaled values?
Thanks.
Cheers,
--
Seb
2016 Oct 08
0
optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Hi Spencer: See the link below about L-BFGS-B below because I had problems
with it a good while back (and I think the link description is the cause
but I can't prove it ) so eventually I moved to the Rvmmin(b) package.
It's a package but really an algorithm. Rvmmin(b) uses a variable-metric
algorithm similar to that of L-BFGS-B but without the problem below. It's
not surprisingly a
2007 Jul 30
1
stop criteria when "L-BFGS-B needs finite values of 'fn' " in optim
Hi all!
I'm running some simulations and I need to estimate some paramaters with
optim( ),
in some cases optim stops with the next message:
"L-BFGS-B needs finite values of 'fn' "
I would like to know how to include and "if" condition when this happen,
could it be something like:
myfun <- optim(....) # run my function
2019 May 03
0
R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments
On 02/05/2019 21:35, Florian Gerber wrote:
> Dear all,
>
> when using optim() for a function that uses the parent environment, I
> see the following unexpected behavior:
>
> makeFn <- function(){
> ??? xx <- ret <- NA
> ??? fn <- function(x){
> ?????? if(!is.na(xx) && x==xx){
> ?????????? cat("x=", xx, ", ret=", ret, "