机器学习(三) — 神经网络

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

  1. feature:
    • features: price, shipping cost, marketing, material
    • further generalization: affordability, awareness, perceived quality
  2. layer: input layer, hidden layer, output layer
  3. activation fuction: Sigmoid, Tanh, ReLU
  4. data: transmit in the form of vector

在这里插入图片描述

2 Construct neural network layer

1. logic implement

param:

  1. g: sigmoid function(activation fuction)
  2. 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)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值