Are you sure you want to delete this access key?
This doc aims to make analysis result from data based on ycz6502.csv more convincing.
第一步:造数据。
生成组串相关系数随时间变化散点图:修改相关系数 dataframe coefs
.
Add (uncomment) embed()
in function test_str_coef_all_days
, and run
python -m unittest test_app.AnomalyDetectionTest.test_str_coef_all_days
.
Then input these scripts the following IPython console:
coefs['2017-03-12'] = 0.8
coefs['2017-03-13'] = 0.5
coefs['2017-03-14'] = 0.2
coefs['2017-03-15'] = -0.04
coefs['2017-04-03'] = 0.75
coefs['2017-04-04'] = 0.72
coefs['2017-04-05'] = 0.82
coefs['2017-04-06'] = 0.79
coefs['2017-04-07'] = 0.88
coefs['2017-04-22'] = -0.22
coefs['2017-04-23'] = 0.04
coefs['2017-04-24'] = 0.14
coefs['2017-04-25'] = -0.24
执行后退出 IPython console,程序自动继续运行。
生成训练参数:修改相关系数集合without_outlier
.
Add (uncomment) embed()
in function get_thr_from_coefs
, and run
python -m unittest test_app.TrainerTest.test_trainer_08
.
Then input these scripts the following IPython console:
without_outlier += list(np.linspace(-0.05, 0.05, 400))
without_outlier += list(np.linspace(0.25, 0.45, 700))
可以用下面的代码在 IPython cosnole 中绘图:
%matplotlib
import seaborn as sns
import matplotlib.pyplot as plt
ax = sns.distplot(without_outlier, bins=10)
ax = sns.boxplot(without_outlier)
ax = sns.violinplot(without_outlier)
ax.set_xlim(-1, 1)
第二步:生成 html 文档。
相比于 PDF 文档,html 文档能方便地显示汉字和数学公式。
生成方法:pandoc -s intro.md -o intro.html
.
Press p or to see the previous file or, n or to see the next file
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?