Hi all, It seems that optimization algorithm, optim, tries to find optimized parameters within defined lower and upper bounds. In my problem, all the parameters are integers. My question is that if there is any means that I can let "optim" only tries mutual exclusive integers. To be specific, I am giving an example here. I tried to find a set parameters with five elements with the lowest value for the cost function. The parameter set that "optim" returned is "5, 5, 49, 51, 51". However, I only wanted to search unique parameter values, such as "5, 6, 49, 50, 51". Many thanks, Zhi Xie Johns Hopkins School of Medicine Baltimore, MD
It seems that optimization algorithm, optim, tries to find optimized parameters within defined lower and upper bounds. In my problem, all the parameters are integers but mutual exclusive. My question is that if there is any means that I can let "optim" only tries mutual exclusive integers. To be specific, I am giving an example here. I tried to find a set parameters with five elements with the lowest value for the cost function. The parameter set that "optim" returned is "5, 5, 49, 51, 51". However, I only wanted to search unique parameter values, such as "5, 6, 49, 50, 51". Many thanks, Zhi Xie Johns Hopkins School of Medicine Baltimore, MD
As someone very involved with optim and its evolution I can say it is not at all suited to this sort of combinatoric optimization. I don't know if there are packages in R to help out -- it would be nice. If (this may be a big IF) your set of possible combinations is not too large, combn() generates the C(n,r) combinations and, assuming the function is not too expensive to compute, one can use enumeration and be certain of having the optimum. choose(60,5) shows about 5.5 million sets. A bit tedious, but likely doable over lunchtime. But choose(600,5) is >600 billion, and probably too heavy. John Nash >From: Zhi Xie <xiezhi at gmail.com> >It seems that optimization algorithm, optim, tries to find optimized >parameters within defined lower and upper bounds. In my problem, all >the parameters are integers. My question is that if there is any means >that I can let "optim" only tries mutual exclusive integers. To be >specific, I am giving an example here. >I tried to find a set parameters with five elements with the lowest >value for the cost function. The parameter set that "optim" returned >is "5, 5, 49, 51, 51". However, I only wanted to search unique >parameter values, such as "5, 6, 49, 50, 51".
Maybe Matching Threads
- minimization a quadratic form with some coef fixed and some constrained
- Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?
- optim(method="SANN")
- btrfs_print_tree?
- Get timestamp and processor ID in the IR