Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/downhillsimplex.R
Impementation of the downhillsimplex function for optimisation
1 2 3 |
fc |
Function to be minimized |
nParams |
Number of parameters that the function to be optimized requires |
bp |
Matrix used to start the optimisation. If no parameters is given, this matrix will be randamly initialized. |
lower |
Vector for the lower bound of the parameters |
upper |
Vector for the upper bound of the parameters |
it |
Maximium number of iterations done by the downhillsimplex algortihm |
tol |
tolearnce that is used to test for convergence |
control |
list of variables that control the behavior of the downhillsimpley algorithm. alpha = Reflexion gamma = Expansion beta = Contraktion sigma = Compression |
Implemented in C, will call you R function
Returns estimated parameters
Implementation according to Wikipedia page
Dennis Becker
Implementation according to describtion on wiki: https://en.wikipedia.org/wiki/Nelder
Package Overview:
gpHist-Package
Function for hyperparameter estimation:
estimateHyperParameters
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #simple function to be optimized
fn = function(x){
x^2
}
#call downhillsimplex
res = downhillsimplex(fn,1,lower=-10,upper=10,it=1000,tol=1e-10)
#plot results
x = seq(-10,10,0.01)
plot(x,fn(x),type='l')
points(res[1],fn(res[1]),col='red')
legend('topleft',legend=c('Function', 'Estimated minimum'), col=c('black','red'),
lty=c(1,NA),pch=c(NA,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.