This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch branch-3.1 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.1 by this push: new f88a522 [MINOR][DOCS] Avoid some python docs where first sentence has "e.g." or similar f88a522 is described below commit f88a52207b5fe725451fb87ab145746c04288e02 Author: Sean Owen <sro...@gmail.com> AuthorDate: Wed May 12 10:38:59 2021 +0900 [MINOR][DOCS] Avoid some python docs where first sentence has "e.g." or similar Avoid some python docs where first sentence has "e.g." or similar as the period causes the docs to show only half of the first sentence as the summary. See for example https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.ml.regression.LinearRegressionModel.html?highlight=linearregressionmodel#pyspark.ml.regression.LinearRegressionModel.summary where the method description is clearly truncated. Only changes docs. Manual testing of docs. Closes #32508 from srowen/TruncatedPythonDesc. Authored-by: Sean Owen <sro...@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> (cherry picked from commit a189be8754f474adbae477ed366750e2f85418d6) Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> --- python/pyspark/ml/classification.py | 10 +++++----- python/pyspark/ml/clustering.py | 6 +++--- python/pyspark/ml/regression.py | 4 ++-- python/pyspark/ml/util.py | 4 ++-- python/pyspark/sql/context.py | 2 +- python/pyspark/sql/session.py | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/python/pyspark/ml/classification.py b/python/pyspark/ml/classification.py index 17994ed..6b8951d 100644 --- a/python/pyspark/ml/classification.py +++ b/python/pyspark/ml/classification.py @@ -738,7 +738,7 @@ class LinearSVCModel(_JavaClassificationModel, _LinearSVCParams, JavaMLWritable, @since("3.1.0") def summary(self): """ - Gets summary (e.g. accuracy/precision/recall, objective history, total iterations) of model + Gets summary (accuracy/precision/recall, objective history, total iterations) of model trained on the training set. An exception is thrown if `trainingSummary is None`. """ if self.hasSummary: @@ -1237,7 +1237,7 @@ class LogisticRegressionModel(_JavaProbabilisticClassificationModel, _LogisticRe @since("2.0.0") def summary(self): """ - Gets summary (e.g. accuracy/precision/recall, objective history, total iterations) of model + Gets summary (accuracy/precision/recall, objective history, total iterations) of model trained on the training set. An exception is thrown if `trainingSummary is None`. """ if self.hasSummary: @@ -1843,7 +1843,7 @@ class RandomForestClassificationModel(_TreeEnsembleModel, _JavaProbabilisticClas @since("3.1.0") def summary(self): """ - Gets summary (e.g. accuracy/precision/recall, objective history, total iterations) of model + Gets summary (accuracy/precision/recall, objective history, total iterations) of model trained on the training set. An exception is thrown if `trainingSummary is None`. """ if self.hasSummary: @@ -2700,7 +2700,7 @@ class MultilayerPerceptronClassificationModel(_JavaProbabilisticClassificationMo @since("3.1.0") def summary(self): """ - Gets summary (e.g. accuracy/precision/recall, objective history, total iterations) of model + Gets summary (accuracy/precision/recall, objective history, total iterations) of model trained on the training set. An exception is thrown if `trainingSummary is None`. """ if self.hasSummary: @@ -3500,7 +3500,7 @@ class FMClassificationModel(_JavaProbabilisticClassificationModel, _Factorizatio @since("3.1.0") def summary(self): """ - Gets summary (e.g. accuracy/precision/recall, objective history, total iterations) of model + Gets summary (accuracy/precision/recall, objective history, total iterations) of model trained on the training set. An exception is thrown if `trainingSummary is None`. """ if self.hasSummary: diff --git a/python/pyspark/ml/clustering.py b/python/pyspark/ml/clustering.py index 54c1a43..763fea3 100644 --- a/python/pyspark/ml/clustering.py +++ b/python/pyspark/ml/clustering.py @@ -189,7 +189,7 @@ class GaussianMixtureModel(JavaModel, _GaussianMixtureParams, JavaMLWritable, Ja @since("2.1.0") def summary(self): """ - Gets summary (e.g. cluster assignments, cluster sizes) of the model trained on the + Gets summary (cluster assignments, cluster sizes) of the model trained on the training set. An exception is thrown if no summary exists. """ if self.hasSummary: @@ -560,7 +560,7 @@ class KMeansModel(JavaModel, _KMeansParams, GeneralJavaMLWritable, JavaMLReadabl @since("2.1.0") def summary(self): """ - Gets summary (e.g. cluster assignments, cluster sizes) of the model trained on the + Gets summary (cluster assignments, cluster sizes) of the model trained on the training set. An exception is thrown if no summary exists. """ if self.hasSummary: @@ -828,7 +828,7 @@ class BisectingKMeansModel(JavaModel, _BisectingKMeansParams, JavaMLWritable, Ja @since("2.1.0") def summary(self): """ - Gets summary (e.g. cluster assignments, cluster sizes) of the model trained on the + Gets summary (cluster assignments, cluster sizes) of the model trained on the training set. An exception is thrown if no summary exists. """ if self.hasSummary: diff --git a/python/pyspark/ml/regression.py b/python/pyspark/ml/regression.py index ba63de7..2ba3048 100644 --- a/python/pyspark/ml/regression.py +++ b/python/pyspark/ml/regression.py @@ -348,7 +348,7 @@ class LinearRegressionModel(_JavaRegressionModel, _LinearRegressionParams, Gener @since("2.0.0") def summary(self): """ - Gets summary (e.g. residuals, mse, r-squared ) of model on + Gets summary (residuals, MSE, r-squared ) of model on training set. An exception is thrown if `trainingSummary is None`. """ @@ -2270,7 +2270,7 @@ class GeneralizedLinearRegressionModel(_JavaRegressionModel, _GeneralizedLinearR @since("2.0.0") def summary(self): """ - Gets summary (e.g. residuals, deviance, pValues) of model on + Gets summary (residuals, deviance, p-values) of model on training set. An exception is thrown if `trainingSummary is None`. """ diff --git a/python/pyspark/ml/util.py b/python/pyspark/ml/util.py index 156e7f0..21d2725 100644 --- a/python/pyspark/ml/util.py +++ b/python/pyspark/ml/util.py @@ -152,7 +152,7 @@ class GeneralMLWriter(MLWriter): def format(self, source): """ - Specifies the format of ML export (e.g. "pmml", "internal", or the fully qualified class + Specifies the format of ML export ("pmml", "internal", or the fully qualified class name for export). """ self.source = source @@ -202,7 +202,7 @@ class GeneralJavaMLWriter(JavaMLWriter): def format(self, source): """ - Specifies the format of ML export (e.g. "pmml", "internal", or the fully qualified class + Specifies the format of ML export ("pmml", "internal", or the fully qualified class name for export). """ self._jwrite.format(source) diff --git a/python/pyspark/sql/context.py b/python/pyspark/sql/context.py index 5071240..ad77ce6 100644 --- a/python/pyspark/sql/context.py +++ b/python/pyspark/sql/context.py @@ -298,7 +298,7 @@ class SQLContext(object): Parameters ---------- data : :class:`RDD` or iterable - an RDD of any kind of SQL data representation(e.g. :class:`Row`, + an RDD of any kind of SQL data representation (:class:`Row`, :class:`tuple`, ``int``, ``boolean``, etc.), or :class:`list`, or :class:`pandas.DataFrame`. schema : :class:`pyspark.sql.types.DataType`, str or list, optional diff --git a/python/pyspark/sql/session.py b/python/pyspark/sql/session.py index 4db958a..57c680f 100644 --- a/python/pyspark/sql/session.py +++ b/python/pyspark/sql/session.py @@ -580,7 +580,7 @@ class SparkSession(SparkConversionMixin): Parameters ---------- data : :class:`RDD` or iterable - an RDD of any kind of SQL data representation(e.g. :class:`Row`, + an RDD of any kind of SQL data representation (:class:`Row`, :class:`tuple`, ``int``, ``boolean``, etc.), or :class:`list`, or :class:`pandas.DataFrame`. schema : :class:`pyspark.sql.types.DataType`, str or list, optional --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org