Giter Club home page Giter Club logo

Comments (3)

ivan-marroquin avatar ivan-marroquin commented on August 10, 2024

I tried the following:

problem.types[0]= [Real(logs_min[0], logs_max[0])]
problem.types[1]= [Real(logs_min[1], logs_max[1])]
problem.types[2]= [Real(logs_min[2], logs_max[2])]
problem.types[0]= [Real(logs_min[3], logs_max[3])]

The error still occurs but I got a different message: 'list' object has no attribute 'rand'

Traceback (most recent call last):
File "New_Platypus_TPE55_Full_Optimization_Class_1.py", line 685, in
rstate= np.random.RandomState(seed),
File "C:\Anaconda3\lib\site-packages\hyperopt\fmin.py", line 307, in fmin
return_argmin=return_argmin,
File "C:\Anaconda3\lib\site-packages\hyperopt\base.py", line 635, in fmin
return_argmin=return_argmin)
File "C:\Anaconda3\lib\site-packages\hyperopt\fmin.py", line 320, in fmin
rval.exhaust()
File "C:\Anaconda3\lib\site-packages\hyperopt\fmin.py", line 199, in exhaust
self.run(self.max_evals - n_done, block_until_done=self.async)
File "C:\Anaconda3\lib\site-packages\hyperopt\fmin.py", line 173, in run
self.serial_evaluate()
File "C:\Anaconda3\lib\site-packages\hyperopt\fmin.py", line 92, in serial_eva
luate
result = self.domain.evaluate(spec, ctrl)
File "C:\Anaconda3\lib\site-packages\hyperopt\base.py", line 840, in evaluate
rval = self.fn(pyll_rval)
File "New_Platypus_TPE55_Full_Optimization_Class_1.py", line 612, in optimize_
parameters_inverse_second_layer_round_1
algorithm.run(n_iter)
File "C:\Anaconda3\lib\site-packages\platypus-0.1-py3.6.egg\platypus\core.py",
line 302, in run
File "C:\Anaconda3\lib\site-packages\platypus-0.1-py3.6.egg\platypus\algorithm
s.py", line 64, in step
File "C:\Anaconda3\lib\site-packages\platypus-0.1-py3.6.egg\platypus\algorithm
s.py", line 390, in initialize
File "C:\Anaconda3\lib\site-packages\platypus-0.1-py3.6.egg\platypus\algorithm
s.py", line 71, in initialize
File "C:\Anaconda3\lib\site-packages\platypus-0.1-py3.6.egg\platypus\algorithm
s.py", line 71, in
File "C:\Anaconda3\lib\site-packages\platypus-0.1-py3.6.egg\platypus\operators
.py", line 38, in generate
File "C:\Anaconda3\lib\site-packages\platypus-0.1-py3.6.egg\platypus\operators
.py", line 38, in
AttributeError: 'list' object has no attribute 'rand'

from platypus.

dhadka avatar dhadka commented on August 10, 2024

I think the last line has a copy-paste error. Should be problem.types[3] instead of problem.types[0].

problem.types[0]= Real(logs_min[0], logs_max[0])
problem.types[1]= Real(logs_min[1], logs_max[1])
problem.types[2]= Real(logs_min[2], logs_max[2])
problem.types[3]= Real(logs_min[3], logs_max[3])

from platypus.

ivan-marroquin avatar ivan-marroquin commented on August 10, 2024

You are totally correct! I didn't pay attention to my typo. Thanks!

I would like to ask you this question: is there a difference between the commands (A) and (B)?
Command A:
problem.types[:]= [Real(logs_min[0], logs_max[0]), Real(logs_min[1], logs_max[1]),
Real(logs_min[2], logs_max[2]), Real(logs_min[3], logs_max[3])]

Command B:
problem.types[0]= Real(logs_min[0], logs_max[0])
problem.types[1]= Real(logs_min[1], logs_max[1])
problem.types[2]= Real(logs_min[2], logs_max[2])
problem.types[3]= Real(logs_min[3], logs_max[3])

I am hoping that Command B will constraint better the range of values for the variables.

Once again, thanks a lot

from platypus.

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.