similar to: Bad optimization solution

Displaying 20 results from an estimated 10000 matches similar to: "Bad optimization solution"

2017 Aug 24
1
Problem in optimization of Gaussian Mixture model
Hello, I am facing a problem with optimization in R from 2-3 weeks. I have some Gaussian mixtures parameters and I want to find the maximum in that *Parameters are in the form * mean1 mean2 mean3 sigma1 sigma2 sigma3 c1 c2 c3 506.8644 672.8448 829.902 61.02859 9.149168 74.84682 0.1241933 0.6329082 0.2428986 I have used optima and optimx to find the
2011 Nov 10
3
optim seems to be finding a local minimum
Hello! I am trying to create an R optimization routine for a task that's currently being done using Excel (lots of tables, formulas, and Solver). However, otpim seems to be finding a local minimum. Example data, functions, and comparison with the solution found in Excel are below. I am not experienced in optimizations so thanks a lot for your advice! Dimitri ### 2 Inputs:
2008 Jan 07
7
Can R solve this optimization problem?
Dear All, I am trying to solve the following maximization problem with R: find x(t) (continuous) that maximizes the integral of x(t) with t from 0 to 1, subject to the constraints dx/dt = u, |u| <= 1, x(0) = x(1) = 0. The analytical solution can be obtained easily, but I am trying to understand whether R is able to solve numerically problems like this one. I have tried to find an
2008 Mar 05
6
box-constrained
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible Url : https://stat.ethz.ch/pipermail/r-help/attachments/20080305/80536e8c/attachment.pl
2009 Feb 24
2
Tracing gradient during optimization
Hi everyone, I am currently using the function optim() to maximize/minimize functions and I would like to see more output of the optimization procedure, in particular the numerical gradient of the parameter vector during each iteration. The documentation of optim() describes that the trace parameter should allow one to trace the progress of the optimization. I use the following command:
2001 Nov 08
3
Problem with optim (method L-BFGS-B)
Hello, I've just a little problem using the function optim. Here is the function I want to optimize : test_function(x){(exp(-0.06751 + 0.25473*((x[1]-350)/150) + 0.04455*((x[2]-40)/20) + 0.09399*((x[3]-400)/100) - 0.17238*((x[4]-250)/50)- 0.45984*((x[5]-550)/150)-0.39508*((x[1]-350)/150)* ((x[1]-350)/150) - 0.05116*((x[2]-40)/20)* ((x[2]-40)/20) - 0.27735*((x[3]-400)/100)*((x[3]-400)/100) -
2007 May 19
2
What's wrong with my code ?
I try to code the ULS factor analysis descrbied in ftp://ftp.spss.com/pub/spss/statistics/spss/algorithms/ factor.pdf # see PP5-6 factanal.fit.uls <- function(cmat, factors, start=NULL, lower = 0.005, control = NULL, ...) { FAfn <- function(Psi, S, q) { Sstar <- S - diag(Psi) E <- eigen(Sstar, symmetric = TRUE, only.values = TRUE) e <- E$values[-(1:q)] e <-
2008 Mar 27
1
A faster way to compute finite-difference gradient of a scalar function of a large number of variables
Hi All, I would like to compute the simple finite-difference approximation to the gradient of a scalar function of a large number of variables (on the order of 1000). Although a one-time computation using the following function grad() is fast and simple enough, the overhead for repeated evaluation of gradient in iterative schemes is quite significant. I was wondering whether there are
2002 Jul 30
1
Optim() returns wrong maximum
Dear R-devel During the last half a year I have several times encountered the following problem with optim() when using method= "L-BFGS-B". The function return a value which is clearly not the maximum (seen from printing the value each time the function is called). Some output is shown below. A few things I have observed (as I remember it): a. The problem seems to occur when the
2004 Nov 30
1
lme in R-2.0.0: Problem with lmeControl
Hello! One note/question hier about specification of control-parameters in the lme(...,control=list(...)) function call: i tried to specify tne number of iteration needed via lme(....,control=list(maxIter=..., niterEM=...,msVerbose=TRUE)) but every time i change the defualt values maxIter (e.g. maxIter=1, niterEM=0) on ones specified by me, the call returns all the iterations needed until
2011 Aug 25
1
Optim function with multivariate inputs
Hi, I have function that I want to optimize. Am playing with the optim() function in R Two issues: 1) I can't seem to get it to work with a function that takes multiple inputs. Dummy Example: myFunc <- function(A,B,D,D){ # Do stuff return E } > myFunc(1,2,3,4) [1] 12 # works fine from command line > optim( par=c(1,2,3,4), fn=myFunc) Error in A+B : 'B' is missing
2009 Nov 18
1
bug in '...' of constrOptim (PR#14071)
Dear all, There appears to be a bug in how constrOptim handles ... arguments that are suppose to be passed to optim, according to the documentation. This means you can't get the hessian to be returned, for example (so this is a real problem, and not just a question of mistaken documentation). Looking at the code, it appears that a call to the user-defined f includes the ..., when the ...
2002 Jun 28
1
Problem in optim(method="L-BFGS-B") (PR#1717)
Full_Name: Jörg Polzehl Version: 1.5.1 OS: Windows 2000 Submission from: (NULL) (193.175.148.198) When calculating MLE's in a variance component model using constrained optimization, i.e. optim(...,method="L-BFGS-B",...) I observed an inproper behaviour in cases where the likelihood function was evalueted at the constraint. Parameters and value of the function at the constraint
2010 Aug 06
2
Stopping precision using 'optim'
Hi all~ I am wondering if it is possible to alter the stopping precision for parameters estimated using the 'optim'? If it helps, I am minimizing the log-likelihood of a function using constraints (i.e. L-BFG-S). -Jeremy
2009 Nov 02
2
a prolem with constrOptim
Hi, I apologize for the long message but the problem I encountered can't be stated in a few lines. I am having some problems with the function constrOptim. My goal is to maximize the likelihood of product of K multinomials, each with four catagories under linear constraints on the parameter values. I have found that the function does not work for many data configurations. #The likelihood
2011 Sep 27
2
Error in optim function.
I'm trying to calculate the maximum likelihood estimate for a binomial distribution. Here is my code: y <- c(2, 4, 2, 4, 5, 3) n <- length(y) binomial.ll <- function (pi, y, n) { ## define log-likelihood output <- y*log(pi)+(n-y)*(log(1-pi)) return(output) } binomial.mle <- optim(0.01, ## starting value binomial.ll,
2008 Mar 31
2
L-BFGS-B needs finite values of 'fn'
Dear All, I am trying to solve the optimization problem below, but I am always getting the following error: Error in optim(rep(20, nvar), f, gr, method = "L-BFGS-B", lower = rep(0, : L-BFGS-B needs finite values of 'fn' Any ideas? Thanks in advance, Paul ----------------------------------------------- k <- 10000 b <- 0.3 f <- function(x) { n <- length(x)
2010 Aug 02
1
Confidence Bands in nonlinear regression using optim and maximum likelihood
Hello, I am trying to plot confidence bands on the mean and prediction bands for the following nonlinear regression, using maximum likelihood via optim. A toy example with data and code of what I am trying to accomplish is: VOL<-c(0.01591475, 1.19147935 ,6.34102460, 53.68809287, 91.90143074, 116.21397007, 146.41843056, 215.64535337, 256.53149673, 315.73609232) Age <-c(1.622222, 2.833333
2017 Aug 06
1
Help with optim function in R, please?
Hi all, Many thank in advance for helping me.? I tried to fit Expectation Maximization algorithm for mixture data. I must used one of numerical method to maximize my function. I built my code but I do not know how to make the optim function run over a different value of the parameters.? That is, For E-step I need to get the value of mixture weights based on the current (initial) values of
2008 Mar 23
2
scaling problems in "optim"
Dear R users, I am trying to figure out the control parameter in "optim," especially, "fnscale" and "parscale." In the R docu., ------------------------------------------------------ fnscale An overall scaling to be applied to the value of fn and gr during optimization. If negative, turns the problem into a maximization problem. Optimization is performed on