From 359f5c2da69d3a0e42c7c97cf0aad7b03555ac09 Mon Sep 17 00:00:00 2001 From: ceci Date: Mon, 18 Feb 2019 02:36:13 +0000 Subject: [PATCH] update fit a line --- 01.fit_a_line/README.cn.md | 4 ++-- 01.fit_a_line/index.cn.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/01.fit_a_line/README.cn.md b/01.fit_a_line/README.cn.md index 384e03e..4032b68 100644 --- a/01.fit_a_line/README.cn.md +++ b/01.fit_a_line/README.cn.md @@ -152,8 +152,8 @@ data = data.reshape(data.shape[0] // feature_num, feature_num) maximums, minimums, avgs = data.max(axis=0), data.min(axis=0), data.sum(axis=0)/data.shape[0] -for i in six.moves.range(feature_num-1): # six.moves可以兼容python2和python3 - +# six.moves可以兼容python2和python3 +for i in six.moves.range(feature_num-1): data[:, i] = (data[:, i] - avgs[i]) / (maximums[i] - minimums[i]) ratio = 0.8 # 训练集和验证集的划分比例 diff --git a/01.fit_a_line/index.cn.html b/01.fit_a_line/index.cn.html index 0f3644b..d9a8ba5 100644 --- a/01.fit_a_line/index.cn.html +++ b/01.fit_a_line/index.cn.html @@ -194,8 +194,8 @@ data = data.reshape(data.shape[0] // feature_num, feature_num) maximums, minimums, avgs = data.max(axis=0), data.min(axis=0), data.sum(axis=0)/data.shape[0] -for i in six.moves.range(feature_num-1): # six.moves可以兼容python2和python3 - +# six.moves可以兼容python2和python3 +for i in six.moves.range(feature_num-1): data[:, i] = (data[:, i] - avgs[i]) / (maximums[i] - minimums[i]) ratio = 0.8 # 训练集和验证集的划分比例 -- GitLab