Neural Network

Neural Network

基础的神经单元

mark

参数 功能
$x_i$ 输入的n维度的向量
$w_i$ 加权的系数
$b$ 偏置
$z$ $\Sigma_{i=1}^{n} w_ix_i+b$ 的值
$h(z)$ 经过激活函数得到的一个范围在0-1之间的数
$a$ 作为输入向量x传给下一个神经元
Read more
2019-nCoV Data Prediction

2019-nCoV Data Prediction

2019 Novel Coronavirus (2019-nCoV) is a virus (more specifically, a coronavirus identified as the cause of an outbreak of respiratory illness first detected in Wuhan, China. Early on, many of the patients in the outbreak in Wuhan, China reportedly had some link to a large seafood and animal market, suggesting animal-to-person spread. However, a growing number of patients reportedly have not had exposure to animal markets, indicating person-to-person spread is occurring. At this time, it’s unclear how easily or sustainably this virus is spreading between people. The latest situation summary updates are available on CDC’s web page 2019 Novel Coronavirus, Wuhan, China

from https://www.cdc.gov/coronavirus/2019-ncov/about/index.html

Lead

As everyone knows, the serious coronavirus is attacking our country especially in Wuhan while most activities are canceled. Staying at home become the daily routine. Besides working on learning stuff, I am trying to learn Python, a popular programming language which I should master long before.

After learning Matrix Linear Regression, an powerful and beginner-friendly algorithm used for predicting, I got an idea: forecasting the future trend by using a series of data including the number of people infected with virus. So I just started to do it and it’s time to share my computing results.

Read more
Getting started with Python 2

Getting started with Python 2

For and Else

1
2
3
4
for x in range(6):
print(x)
if x==2: break
else: print("over") # this line will skip if last line exists

Pass

There cannot exist any blank within for and if else. We must use pass to avoid the mistake.

1
2
3
for x in [1,2,3,4]:
pass
print("over")
Linear Regression

Linear Regression

人工智能第一讲

定义

基于已知的函数模型预测未知的

分类

监督学习

  • 需要人工标记
  • 预测、推荐、标注、识别等
  • 回归
  • 分类

无监督学习

  • 聚类
  • 社团划分
  • 生成学习
  • 强化学习: 根据结果回馈优化模型

有监督模型

样本二元组:(x,y)

利用样本求解模型最佳参数

线性回归

image-20200127092012971

image-20200127093925978

  • hyperparameter

image-20200127102104560

Getting started with Python 1

Getting started with Python 1

What’s new for me


  • Do not need to declare variables
  • indentation replaces curly braces to divide code blocks

Grammar


Assigning value to multiple variables

1
x, y, z = 1, 2, "hello"

Define a global variable in local function

1
2
3
def myfunc():
global x
x = "fantastic"

Change the value of a global variable inside the function

1
2
3
4
x = "declan"
def myfunc():
global x
x = "declan and jessica"
Read more
Intro to Neural Network

Intro to Neural Network

线性回归补充

  1. 线性回归可以对样本是非线性的,只要对参数线性

$y=\theta_0+\theta_1x+\theta_2x^2$

  1. 局部加权回归

人工神经网络

mark

相同的词向量表示会非常近

  1. 把字用向量表示

  2. 卷积操作

  3. RNN表示

  4. 平均 pool

  5. 全连接

  6. sigmoid