Nueral network
1 Demand prediction
1. one feature
the activation of the price
a = f ( x ) = 1 1 + e − ( w x + b ) a = f(x) = \frac{1}{1+e^{-(wx+b)}} a=f(x)=1+e−(wx+b)1
2. mutiple features
- feature:
- features: price, shipping cost, marketing, material
- further generalization: affordability, awareness, perceived quality
- layer: input layer, hidden layer, output layer
- activation fuction: Sigmoid, Tanh, ReLU
- data: transmit in the form of vector
2 Construct neural network layer
1. logic implement
param:
- g: sigmoid function(activation fuction)
- a: activation value
2. implement by tensorflow
x = np.array([[...]])
y = np.array([[...]])
layer_1 = Dense(units=4, activation="sigmoid")
layer_2 = Dense(units=5, activation="sigmoid")
layer_3 = Dense(units=3, activation="sigmoid")
layer_4 = Dense(units=1, activation="sigmoid")
model = Sequential([layer_1, layer_2, layer_3, layer_4])
model.compile(...)
model.fit(x, y)
model.predict(x_new)