diff options
author | hyukjinkwon <gurwls223@gmail.com> | 2016-11-22 11:40:18 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-11-22 11:40:18 +0000 |
commit | 933a6548d423cf17448207a99299cf36fc1a95f6 (patch) | |
tree | 8244d8b993bce2cb023d0ad9dcaf037f34cb7378 /python/pyspark/ml/regression.py | |
parent | 4922f9cdcac8b7c10320ac1fb701997fffa45d46 (diff) | |
download | spark-933a6548d423cf17448207a99299cf36fc1a95f6.tar.gz spark-933a6548d423cf17448207a99299cf36fc1a95f6.tar.bz2 spark-933a6548d423cf17448207a99299cf36fc1a95f6.zip |
[SPARK-18447][DOCS] Fix the markdown for `Note:`/`NOTE:`/`Note that` across Python API documentation
## What changes were proposed in this pull request?
It seems in Python, there are
- `Note:`
- `NOTE:`
- `Note that`
- `.. note::`
This PR proposes to fix those to `.. note::` to be consistent.
**Before**
<img width="567" alt="2016-11-21 1 18 49" src="https://cloud.githubusercontent.com/assets/6477701/20464305/85144c86-af88-11e6-8ee9-90f584dd856c.png">
<img width="617" alt="2016-11-21 12 42 43" src="https://cloud.githubusercontent.com/assets/6477701/20464263/27be5022-af88-11e6-8577-4bbca7cdf36c.png">
**After**
<img width="554" alt="2016-11-21 1 18 42" src="https://cloud.githubusercontent.com/assets/6477701/20464306/8fe48932-af88-11e6-83e1-fc3cbf74407d.png">
<img width="628" alt="2016-11-21 12 42 51" src="https://cloud.githubusercontent.com/assets/6477701/20464264/2d3e156e-af88-11e6-93f3-cab8d8d02983.png">
## How was this patch tested?
The notes were found via
```bash
grep -r "Note: " .
grep -r "NOTE: " .
grep -r "Note that " .
```
And then fixed one by one comparing with API documentation.
After that, manually tested via `make html` under `./python/docs`.
Author: hyukjinkwon <gurwls223@gmail.com>
Closes #15947 from HyukjinKwon/SPARK-18447.
Diffstat (limited to 'python/pyspark/ml/regression.py')
-rw-r--r-- | python/pyspark/ml/regression.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/python/pyspark/ml/regression.py b/python/pyspark/ml/regression.py index 385391ba53..b42e807069 100644 --- a/python/pyspark/ml/regression.py +++ b/python/pyspark/ml/regression.py @@ -245,9 +245,9 @@ class LinearRegressionSummary(JavaWrapper): .. seealso:: `Wikipedia explain variation \ <http://en.wikipedia.org/wiki/Explained_variation>`_ - Note: This ignores instance weights (setting all to 1.0) from - `LinearRegression.weightCol`. This will change in later Spark - versions. + .. note:: This ignores instance weights (setting all to 1.0) from + `LinearRegression.weightCol`. This will change in later Spark + versions. """ return self._call_java("explainedVariance") @@ -259,9 +259,9 @@ class LinearRegressionSummary(JavaWrapper): corresponding to the expected value of the absolute error loss or l1-norm loss. - Note: This ignores instance weights (setting all to 1.0) from - `LinearRegression.weightCol`. This will change in later Spark - versions. + .. note:: This ignores instance weights (setting all to 1.0) from + `LinearRegression.weightCol`. This will change in later Spark + versions. """ return self._call_java("meanAbsoluteError") @@ -273,9 +273,9 @@ class LinearRegressionSummary(JavaWrapper): corresponding to the expected value of the squared error loss or quadratic loss. - Note: This ignores instance weights (setting all to 1.0) from - `LinearRegression.weightCol`. This will change in later Spark - versions. + .. note:: This ignores instance weights (setting all to 1.0) from + `LinearRegression.weightCol`. This will change in later Spark + versions. """ return self._call_java("meanSquaredError") @@ -286,9 +286,9 @@ class LinearRegressionSummary(JavaWrapper): Returns the root mean squared error, which is defined as the square root of the mean squared error. - Note: This ignores instance weights (setting all to 1.0) from - `LinearRegression.weightCol`. This will change in later Spark - versions. + .. note:: This ignores instance weights (setting all to 1.0) from + `LinearRegression.weightCol`. This will change in later Spark + versions. """ return self._call_java("rootMeanSquaredError") @@ -301,9 +301,9 @@ class LinearRegressionSummary(JavaWrapper): .. seealso:: `Wikipedia coefficient of determination \ <http://en.wikipedia.org/wiki/Coefficient_of_determination>` - Note: This ignores instance weights (setting all to 1.0) from - `LinearRegression.weightCol`. This will change in later Spark - versions. + .. note:: This ignores instance weights (setting all to 1.0) from + `LinearRegression.weightCol`. This will change in later Spark + versions. """ return self._call_java("r2") @@ -822,7 +822,7 @@ class DecisionTreeRegressionModel(DecisionTreeModel, JavaMLWritable, JavaMLReada where gain is scaled by the number of instances passing through node - Normalize importances for tree to sum to 1. - Note: Feature importance for single decision trees can have high variance due to + .. note:: Feature importance for single decision trees can have high variance due to correlated predictor variables. Consider using a :py:class:`RandomForestRegressor` to determine feature importance instead. """ |