From 12fe2ecd1998a8b01667aa1ab910a604b2aec4c8 Mon Sep 17 00:00:00 2001 From: Holden Karau Date: Mon, 9 May 2016 09:11:17 +0100 Subject: [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 Closes #12918 from holdenk/SPARK-15137-linkify-pyspark-ml-classification. --- python/pyspark/ml/regression.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'python/pyspark/ml/regression.py') 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 \ + `_ 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 \ + ` 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 `_ 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 `_ 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) `_ learning algorithm for regression. It supports both continuous and categorical features. -- cgit v1.2.3