1,监督学习:数据与标签的
2,非监督学习:只有数据没有标签
3,半监督学习:监督学习+半监督学习
4,强化学习:训练中总结经验
4,遗传算法:适者生存
import matplotlib.pyplot as plt
import pandas as pd
import requests
import io
import numpy as np
url = 'http://blog.topspeedsnail.com/wp-content/uploads/2016/12/铁路客运量.csv'
ass_data = requests.get(url).content
df = pd.read_csv(io.StringIO(ass_data.decode('utf-8'))) # python2使用StringIO.StringIO
data = np.array(df['铁路客运量_当期值(万人)'])
# normalize
normalized_data = (data - np.mean(data)) / np.std(data)
plt.figure()
plt.plot(data)
plt.show()