Example 1

Read and explore the output from Example 1 -- a vector parameter study that evaluates an objective function over the Rosenbrock function.

Use pylab magic:


In [ ]:
%pylab inline

Read the Dakota tabular data file.


In [ ]:
dat_file = '../examples/1-rosenbrock/dakota.dat'
data = numpy.loadtxt(dat_file, skiprows=1, unpack=True, usecols=[0,2,3,4])
data

Plot the path taken in the vector parameter study.


In [ ]:
plot(data[1,], data[2,], 'ro')
xlim((-2, 2))
ylim((-2, 2))
xlabel('$x_1$')
ylabel('$x_2$')
title('Planview of parameter study locations')

Plot the values of the Rosenbrock function at the study locations.


In [ ]:
plot(data[-1,], 'bo')
xlabel('index')
ylabel('Rosenbrock fuction value')
title('Rosenbrock function values at study locations')

What's the minimum value of the function over the study locations?


In [ ]:
min(data[-1,:])