Code Monkey home page Code Monkey logo

abcoptim's Introduction

abcoptim's People

Contributors

gvegayon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

abcoptim's Issues

Error in if (fun >= 0) return(1/(fun + 1)) else return(1 + abs(fun)) : missing value where TRUE/FALSE needed

Richard Hodgett writes:

Hi George,

Thank you so much for creating the ABCoptim R package. I am using it to demonstrate ABC with my MSc students.

I have run into a problem which I hope you can help me with. I am trying to use abc_optim() with problems from the globalOptTests package.

Some of the problems in globalOptTests package throw errors:

abc_optim(fn=goTest, fnName="Camel6", par=c(0,0))
Error in if (fun >= 0) return(1/(fun + 1)) else return(1 + abs(fun)) :
missing value where TRUE/FALSE needed
abc_optim(fn=goTest, fnName="Camel3", par=c(0,0))
Error in if (fun >= 0) return(1/(fun + 1)) else return(1 + abs(fun)) :
missing value where TRUE/FALSE needed
abc_optim(fn=goTest, fnName="Powell", par=c(0,0,0,0))
Error in if (r < prob[i]) { : missing value where TRUE/FALSE needed
abc_optim(fn=goTest, fnName="Wood", par=c(0,0,0,0))
Error in if (fun >= 0) return(1/(fun + 1)) else return(1 + abs(fun)) :
missing value where TRUE/FALSE needed

Whilst some of the problems work fine:

abc_optim(fn=goTest, fnName="Ackleys", par=c(0,0,0,0,0,0,0,0,0,0))
$par
[1] -6.623080e+297 -6.623080e+297 -6.623080e+297 -5.879277e+297 -6.623080e+297 -6.623080e+297 -6.623080e+297 -6.623080e+297
[9] -6.623080e+297 -6.623080e+297

$value
[1] 20.00523

$counts
function
53

Is there something I need to define to make the abc_optim() work with the problems that throw the “missing value where TRUE/FALSE needed” error?

Many thanks for any help you can provide,
Kind regards,
Richard

Dr. Richard Edgar Hodgett
Lecturer in Business Analytics and Decision Science

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.