Multi-layer perceptron

\[\begin{split}y = f_1(x_1,x_2,x_3,x_4,x_5) \ if \ x_0 == 1 \\ y = f_2(x_1,x_2,x_3,x_4,x_5,x_6) \ if \ x_0 == 2 \\ y = f_3(x_1,x_2,x_3,x_4,x_5,x_6,x_7) \ if \ x_0 == 3 \\\end{split}\]

\(x_0 \in \{1,2,3\} , x_1 \in [-5,-2], x_2 \in [-5,-1], x_3 \in [8,16,32,64,128,256], x_4 \in \{ReLU,SeLU,ISRLU\}, x_{5,6,7} \in [0,5] .\)

Usage

import matplotlib.pyplot as plt
from smt.problems import HierarchicalNeuralNetwork
from smt.applications.mixed_integer import MixedIntegerSamplingMethod
from smt.sampling_methods import LHS

problem = HierarchicalNeuralNetwork()
ds = problem.design_space
n_doe = 100
ds.seed = 42
samp = MixedIntegerSamplingMethod(
    LHS, ds, criterion="ese", random_state=ds.seed
)
xdoe = samp(n_doe)

y = problem(xdoe)

plt.scatter(xdoe[:, 0], y)
plt.xlabel("x")
plt.ylabel("y")
plt.show()
../../_images/neuralnetwork_Test_test_hier_neural_network.png

Options

List of options

Option

Default

Acceptable values

Acceptable types

Description

ndim

3

None

[‘int’]

return_complex

False

None

[‘bool’]

name

CantileverBeam

None

[‘str’]

P

50000.0

None

[‘int’, ‘float’]

Tip load (50 kN)

E

200000000000.0

None

[‘int’, ‘float’]

Modulus of elast. (200 GPa)