Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Black box optimization in Python

Hello, I am running a black box optimization routine with pybrain package.I want to use genetic algorithm (GA) and I have four parameters (x,y,z and w). can you help me how can I define these parameters? I have an equal constrain (x+y+z+w=1) and bounds (0<x,y,z,w&lt;1). how="" can="" i="" define="" them?="" my="" overall="" code="" is="" as="" follows:<="" p="">

def objF():
.....
return output

x0 = np.array([20,20,20,20]) %initial values
l = GA(objF, x0)
l.minimize = True
l.learn()