Code Monkey home page Code Monkey logo

Comments (22)

jakobbossek avatar jakobbossek commented on July 30, 2024

This code does not cause any errors anymore. Line 57 now checks the column names of design.x.
Can we close this?

from mlrmbo.

nbauer2 avatar nbauer2 commented on July 30, 2024

But design.x was even wrong. I will try to check your changings soon. I also got erros caused in lines 70 und 71.

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024

I did not change anything :-) Your example code works perfectly with the generateMBODesign fun from the repository.

from mlrmbo.

nbauer2 avatar nbauer2 commented on July 30, 2024

Very strenge... I will look at the code and wirte some more comments.

from mlrmbo.

nbauer2 avatar nbauer2 commented on July 30, 2024

I still have problems with my application. if I run my example I get the message "Computing y column for design. Was not provided" which is not true.

ps in my example is wronng. The right one is:
ps = makeNumericParamSet(len = number_of_parameters(objfun), lower = lower_bounds(objfun), upper = upper_bounds(objfun))

And I still think that the problem is in line 57 (disign.x is false in this place)

from mlrmbo.

berndbischl avatar berndbischl commented on July 30, 2024
  1. For source code please use the correct markup on github:

https://help.github.com/articles/github-flavored-markdown
see Fenced code blocks

  1. Can you - just to make sure - paste a complete example that reproduces this error?

Actually, if you have that, you could yourself create a unit test. At an appropriate place.
That would be best!

from mlrmbo.

nbauer2 avatar nbauer2 commented on July 30, 2024

I created an unit test: initdesign_test.R.

As can be seen, although I provided y-vector for initial design, mbo “does not see it” und evaluates the initial design again.

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024

On my system I get a pretty satisfactory result. All your tests pass successfully. I cannot reproduce your problem.

library(methods)
library(testthat)
library(devtools)
library(BBmisc)
library(mlr)
Lade nötiges Paket: ParamHelpers
load_all(".", reset=TRUE)
test_file("inst/tests/test_mbo_initial_design.R")
# mbo initial design : ...

I guess I tested the correct unit test. You probably renamed the test file to test_mbo_initial_design.R?

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024

Oh, git blame told me, that you are not the author of test_mbo_initial_design.R. Could you please commit your test to let me/us comprehend your problem?

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024

@nbauer2: Could you please check in you unit test. Otherwise we cannot work on it. Moreover stick to the naming conventions of the tests, i. e., name your test test_myTestName.R.

from mlrmbo.

nbauer2 avatar nbauer2 commented on July 30, 2024

I pushed test_initdesign.R. I get a new error, which I have not got before (after mbo() command):

m=mbo(makeMBOFunction(objfun), design=design, par.set=ps, learner=learner_km, control=ctrl, show.info=TRUE)
Error in checkStuff(fun, par.set, design, learner, control) : 
  could not find function "hasDiscrete"

I updated mlr, mlrMOBO, ParamHelpers and BBmisc, but this function still could not be find.

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024

I guess you installed the current CRAN version of ParamHelpers, i.e., version 1.1-36. There are some new helper functions including hasDiscrete in the upcoming release. You should install the github developer version!

from mlrmbo.

berndbischl avatar berndbischl commented on July 30, 2024

I will piblish the new paramhelpers to cran this week.

Nadja these things we mention in the commit messages and news File. If you dont want to wait you can look there!

from mlrmbo.

berndbischl avatar berndbischl commented on July 30, 2024

And nadja , if appropriate, please push a regular unit test. Look at the ones already there.

You pushed something else.

It takes too much time to clean this up.

from mlrmbo.

nbauer2 avatar nbauer2 commented on July 30, 2024

Very strenge. I use Githup Version of ParamHelpers. I first pulled changes and then did make install. I will check now why the old version was loaded in my R. Sometimes it happens.

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024

@nbauer2: I converted your test to a unit test and moved it to tests/testthat and modified it a bit, because it was to time consuming.

from mlrmbo.

berndbischl avatar berndbischl commented on July 30, 2024

Very strenge. I use Githup Version of ParamHelpers. I first pulled changes and then did make
install. I will check now why the old version was loaded in my R. Sometimes it happens.

The only reason I can guess is if you save and load R workspaces in your IDE. Which you should never do IMHO because of exactly the problem you mentioned.

from mlrmbo.

nbauer2 avatar nbauer2 commented on July 30, 2024

Yes, I had to directories with R packages, now I deleted one, so that this error should not appear more.
@jakob: Thak you for converting.

This unit test produces error at the moment. And - more important - mbo does not see the initial design (first message: Computing y column for design. Was not provided )

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024

At the moment all tests fail due to a change of Daniel in evalTargetFunction in his last commit! Replace

z = parallelMap(fun2, xs)
z = parallelMap(fun2, xs, impute.error =
     function(x)
       list(y = rep(NA, control$number.of.targets), time = NA)
)

with z = parallelMap(fun2, xs)in evalTargetFunction and the test should run fine.

from mlrmbo.

nbauer2 avatar nbauer2 commented on July 30, 2024

Yes, there is no error message more. But my problem is that mbo evaluates the initial design once again (as if design=NULL) although it was provided!

from mlrmbo.

danielhorn avatar danielhorn commented on July 30, 2024

Please update parallelMap to the newest github version. The tests fail, 'cause i'm using a new feature of parallelMap.

from mlrmbo.

jakobbossek avatar jakobbossek commented on July 30, 2024

Yes, there is no error message more. But my problem is that mbo evaluates the initial design once
again (as if design=NULL) although it was provided!

@nbauer2: It works now. There was a bug in generateMBODesign.
Closing this issue.

from mlrmbo.

Related Issues (20)

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.