aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/ml/regression.py
diff options
context:
space:
mode:
authorHolden Karau <holden@us.ibm.com>2016-05-09 09:11:17 +0100
committerSean Owen <sowen@cloudera.com>2016-05-09 09:11:17 +0100
commit12fe2ecd1998a8b01667aa1ab910a604b2aec4c8 (patch)
tree39813ff79a12b15e95541e6b68077704eadbbd8f /python/pyspark/ml/regression.py
parent68abc1b4e9afbb6c2a87689221a46b835dded102 (diff)
downloadspark-12fe2ecd1998a8b01667aa1ab910a604b2aec4c8.tar.gz
spark-12fe2ecd1998a8b01667aa1ab910a604b2aec4c8.tar.bz2
spark-12fe2ecd1998a8b01667aa1ab910a604b2aec4c8.zip
[SPARK-15136][PYSPARK][DOC] Fix links to sphinx style and add a default param doc note
## What changes were proposed in this pull request? PyDoc links in ml are in non-standard format. Switch to standard sphinx link format for better formatted documentation. Also add a note about default value in one place. Copy some extended docs from scala for GBT ## How was this patch tested? Built docs locally. Author: Holden Karau <holden@us.ibm.com> Closes #12918 from holdenk/SPARK-15137-linkify-pyspark-ml-classification.
Diffstat (limited to 'python/pyspark/ml/regression.py')
-rw-r--r--python/pyspark/ml/regression.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/python/pyspark/ml/regression.py b/python/pyspark/ml/regression.py
index 04f566dfec..a2300fa49c 100644
--- a/python/pyspark/ml/regression.py
+++ b/python/pyspark/ml/regression.py
@@ -229,7 +229,9 @@ class LinearRegressionSummary(JavaWrapper):
"""
Returns the explained variance regression score.
explainedVariance = 1 - variance(y - \hat{y}) / variance(y)
- Reference: http://en.wikipedia.org/wiki/Explained_variation
+
+ .. 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
@@ -283,7 +285,9 @@ class LinearRegressionSummary(JavaWrapper):
def r2(self):
"""
Returns R^2^, the coefficient of determination.
- Reference: http://en.wikipedia.org/wiki/Coefficient_of_determination
+
+ .. 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
@@ -627,7 +631,7 @@ class DecisionTreeRegressor(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredi
DecisionTreeParams, TreeRegressorParams, HasCheckpointInterval,
HasSeed, JavaMLWritable, JavaMLReadable, HasVarianceCol):
"""
- `http://en.wikipedia.org/wiki/Decision_tree_learning Decision tree`
+ `Decision tree <http://en.wikipedia.org/wiki/Decision_tree_learning>`_
learning algorithm for regression.
It supports both continuous and categorical features.
@@ -782,7 +786,7 @@ class RandomForestRegressor(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredi
RandomForestParams, TreeRegressorParams, HasCheckpointInterval,
JavaMLWritable, JavaMLReadable):
"""
- `http://en.wikipedia.org/wiki/Random_forest Random Forest`
+ `Random Forest <http://en.wikipedia.org/wiki/Random_forest>`_
learning algorithm for regression.
It supports both continuous and categorical features.
@@ -890,7 +894,7 @@ class GBTRegressor(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredictionCol,
GBTParams, HasCheckpointInterval, HasStepSize, HasSeed, JavaMLWritable,
JavaMLReadable):
"""
- `http://en.wikipedia.org/wiki/Gradient_boosting Gradient-Boosted Trees (GBTs)`
+ `Gradient-Boosted Trees (GBTs) <http://en.wikipedia.org/wiki/Gradient_boosting>`_
learning algorithm for regression.
It supports both continuous and categorical features.