From 8ce0662b545d486170b356eb7c5ef0ba75ee393a Mon Sep 17 00:00:00 2001 From: liuyubobobo Date: Mon, 12 Mar 2018 10:25:30 -0700 Subject: [PATCH] metrics.py comments bug fixed. --- .../05-Regression-Metrics-MSE-vs-MAE/playML/metrics.py | 2 +- 05-Linear-Regression/06-R-Squared/playML/metrics.py | 2 +- 05-Linear-Regression/08-Our-Linear-Regression/playML/metrics.py | 2 +- .../09-Regression-in-scikit-learn/playML/metrics.py | 2 +- .../playML/metrics.py | 2 +- .../05-Vectorize-Gradient-Descent/playML/metrics.py | 2 +- 06-Gradient-Descent/07-SGD-in-scikit-learn/playML/metrics.py | 2 +- 07-PCA-and-Gradient-Ascent/05-Data-Projection/playML/metrics.py | 2 +- .../04-Implement-Logistic-Regression/playML/metrics.py | 2 +- 09-Logistic-Regression/05-Decision-Boundary/playML/metrics.py | 2 +- .../playML/metrics.py | 2 +- .../07-ROC-Curve/playML/metrics.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/05-Linear-Regression/05-Regression-Metrics-MSE-vs-MAE/playML/metrics.py b/05-Linear-Regression/05-Regression-Metrics-MSE-vs-MAE/playML/metrics.py index 1a8cc7e..5aa9341 100644 --- a/05-Linear-Regression/05-Regression-Metrics-MSE-vs-MAE/playML/metrics.py +++ b/05-Linear-Regression/05-Regression-Metrics-MSE-vs-MAE/playML/metrics.py @@ -25,6 +25,6 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" return np.sum(np.absolute(y_true - y_predict)) / len(y_true) \ No newline at end of file diff --git a/05-Linear-Regression/06-R-Squared/playML/metrics.py b/05-Linear-Regression/06-R-Squared/playML/metrics.py index 269ea9e..4b2fda9 100644 --- a/05-Linear-Regression/06-R-Squared/playML/metrics.py +++ b/05-Linear-Regression/06-R-Squared/playML/metrics.py @@ -25,7 +25,7 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" assert len(y_true) == len(y_predict), \ "the size of y_true must be equal to the size of y_predict" diff --git a/05-Linear-Regression/08-Our-Linear-Regression/playML/metrics.py b/05-Linear-Regression/08-Our-Linear-Regression/playML/metrics.py index 269ea9e..4b2fda9 100644 --- a/05-Linear-Regression/08-Our-Linear-Regression/playML/metrics.py +++ b/05-Linear-Regression/08-Our-Linear-Regression/playML/metrics.py @@ -25,7 +25,7 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" assert len(y_true) == len(y_predict), \ "the size of y_true must be equal to the size of y_predict" diff --git a/05-Linear-Regression/09-Regression-in-scikit-learn/playML/metrics.py b/05-Linear-Regression/09-Regression-in-scikit-learn/playML/metrics.py index 269ea9e..4b2fda9 100644 --- a/05-Linear-Regression/09-Regression-in-scikit-learn/playML/metrics.py +++ b/05-Linear-Regression/09-Regression-in-scikit-learn/playML/metrics.py @@ -25,7 +25,7 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" assert len(y_true) == len(y_predict), \ "the size of y_true must be equal to the size of y_predict" diff --git a/06-Gradient-Descent/04-Implement-Gradient-Descent-in-Linear-Regression/playML/metrics.py b/06-Gradient-Descent/04-Implement-Gradient-Descent-in-Linear-Regression/playML/metrics.py index 269ea9e..4b2fda9 100644 --- a/06-Gradient-Descent/04-Implement-Gradient-Descent-in-Linear-Regression/playML/metrics.py +++ b/06-Gradient-Descent/04-Implement-Gradient-Descent-in-Linear-Regression/playML/metrics.py @@ -25,7 +25,7 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" assert len(y_true) == len(y_predict), \ "the size of y_true must be equal to the size of y_predict" diff --git a/06-Gradient-Descent/05-Vectorize-Gradient-Descent/playML/metrics.py b/06-Gradient-Descent/05-Vectorize-Gradient-Descent/playML/metrics.py index 269ea9e..4b2fda9 100644 --- a/06-Gradient-Descent/05-Vectorize-Gradient-Descent/playML/metrics.py +++ b/06-Gradient-Descent/05-Vectorize-Gradient-Descent/playML/metrics.py @@ -25,7 +25,7 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" assert len(y_true) == len(y_predict), \ "the size of y_true must be equal to the size of y_predict" diff --git a/06-Gradient-Descent/07-SGD-in-scikit-learn/playML/metrics.py b/06-Gradient-Descent/07-SGD-in-scikit-learn/playML/metrics.py index 269ea9e..4b2fda9 100644 --- a/06-Gradient-Descent/07-SGD-in-scikit-learn/playML/metrics.py +++ b/06-Gradient-Descent/07-SGD-in-scikit-learn/playML/metrics.py @@ -25,7 +25,7 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" assert len(y_true) == len(y_predict), \ "the size of y_true must be equal to the size of y_predict" diff --git a/07-PCA-and-Gradient-Ascent/05-Data-Projection/playML/metrics.py b/07-PCA-and-Gradient-Ascent/05-Data-Projection/playML/metrics.py index 269ea9e..4b2fda9 100644 --- a/07-PCA-and-Gradient-Ascent/05-Data-Projection/playML/metrics.py +++ b/07-PCA-and-Gradient-Ascent/05-Data-Projection/playML/metrics.py @@ -25,7 +25,7 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" assert len(y_true) == len(y_predict), \ "the size of y_true must be equal to the size of y_predict" diff --git a/09-Logistic-Regression/04-Implement-Logistic-Regression/playML/metrics.py b/09-Logistic-Regression/04-Implement-Logistic-Regression/playML/metrics.py index 269ea9e..4b2fda9 100644 --- a/09-Logistic-Regression/04-Implement-Logistic-Regression/playML/metrics.py +++ b/09-Logistic-Regression/04-Implement-Logistic-Regression/playML/metrics.py @@ -25,7 +25,7 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" assert len(y_true) == len(y_predict), \ "the size of y_true must be equal to the size of y_predict" diff --git a/09-Logistic-Regression/05-Decision-Boundary/playML/metrics.py b/09-Logistic-Regression/05-Decision-Boundary/playML/metrics.py index 269ea9e..4b2fda9 100644 --- a/09-Logistic-Regression/05-Decision-Boundary/playML/metrics.py +++ b/09-Logistic-Regression/05-Decision-Boundary/playML/metrics.py @@ -25,7 +25,7 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" assert len(y_true) == len(y_predict), \ "the size of y_true must be equal to the size of y_predict" diff --git a/09-Logistic-Regression/06-Polynomial-Features-in-Logistic-Regression/playML/metrics.py b/09-Logistic-Regression/06-Polynomial-Features-in-Logistic-Regression/playML/metrics.py index 269ea9e..4b2fda9 100644 --- a/09-Logistic-Regression/06-Polynomial-Features-in-Logistic-Regression/playML/metrics.py +++ b/09-Logistic-Regression/06-Polynomial-Features-in-Logistic-Regression/playML/metrics.py @@ -25,7 +25,7 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" assert len(y_true) == len(y_predict), \ "the size of y_true must be equal to the size of y_predict" diff --git a/10-Classification-Performance-Measures/07-ROC-Curve/playML/metrics.py b/10-Classification-Performance-Measures/07-ROC-Curve/playML/metrics.py index 482aa76..5d15a04 100644 --- a/10-Classification-Performance-Measures/07-ROC-Curve/playML/metrics.py +++ b/10-Classification-Performance-Measures/07-ROC-Curve/playML/metrics.py @@ -25,7 +25,7 @@ def root_mean_squared_error(y_true, y_predict): def mean_absolute_error(y_true, y_predict): - """计算y_true和y_predict之间的RMSE""" + """计算y_true和y_predict之间的MAE""" assert len(y_true) == len(y_predict), \ "the size of y_true must be equal to the size of y_predict"