aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorNick Pentreath <nickp@za.ibm.com>2016-06-22 10:05:25 -0700
committerXiangrui Meng <meng@databricks.com>2016-06-22 10:05:25 -0700
commit18faa588ca11190890d2eb569d7497fbb25eee5c (patch)
tree309c146287fdb3112772d9d41172b73427be2323 /python
parentea3a12b0147821960f8dabdc58d726f07f1f0e52 (diff)
downloadspark-18faa588ca11190890d2eb569d7497fbb25eee5c.tar.gz
spark-18faa588ca11190890d2eb569d7497fbb25eee5c.tar.bz2
spark-18faa588ca11190890d2eb569d7497fbb25eee5c.zip
[SPARK-16127][ML][PYPSARK] Audit @Since annotations related to ml.linalg
[SPARK-14615](https://issues.apache.org/jira/browse/SPARK-14615) and #12627 changed `spark.ml` pipelines to use the new `ml.linalg` classes for `Vector`/`Matrix`. Some `Since` annotations for public methods/vals have not been updated accordingly to be `2.0.0`. This PR updates them. ## How was this patch tested? Existing unit tests. Author: Nick Pentreath <nickp@za.ibm.com> Closes #13840 from MLnick/SPARK-16127-ml-linalg-since.
Diffstat (limited to 'python')
-rw-r--r--python/pyspark/ml/classification.py8
-rw-r--r--python/pyspark/ml/regression.py8
2 files changed, 10 insertions, 6 deletions
diff --git a/python/pyspark/ml/classification.py b/python/pyspark/ml/classification.py
index d6d713ca53..c035942f73 100644
--- a/python/pyspark/ml/classification.py
+++ b/python/pyspark/ml/classification.py
@@ -224,7 +224,7 @@ class LogisticRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):
"""
@property
- @since("1.6.0")
+ @since("2.0.0")
def coefficients(self):
"""
Model coefficients.
@@ -1051,7 +1051,7 @@ class NaiveBayesModel(JavaModel, JavaMLWritable, JavaMLReadable):
"""
@property
- @since("1.5.0")
+ @since("2.0.0")
def pi(self):
"""
log of class priors.
@@ -1059,7 +1059,7 @@ class NaiveBayesModel(JavaModel, JavaMLWritable, JavaMLReadable):
return self._call_java("pi")
@property
- @since("1.5.0")
+ @since("2.0.0")
def theta(self):
"""
log of class conditional probabilities.
@@ -1260,7 +1260,7 @@ class MultilayerPerceptronClassificationModel(JavaModel, JavaMLWritable, JavaMLR
return self._call_java("javaLayers")
@property
- @since("1.6.0")
+ @since("2.0.0")
def weights(self):
"""
vector of initial weights for the model that consists of the weights of layers.
diff --git a/python/pyspark/ml/regression.py b/python/pyspark/ml/regression.py
index 29efd6a852..8de9ad8531 100644
--- a/python/pyspark/ml/regression.py
+++ b/python/pyspark/ml/regression.py
@@ -138,7 +138,7 @@ class LinearRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):
"""
@property
- @since("1.6.0")
+ @since("2.0.0")
def coefficients(self):
"""
Model coefficients.
@@ -511,6 +511,7 @@ class IsotonicRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):
"""
@property
+ @since("2.0.0")
def boundaries(self):
"""
Boundaries in increasing order for which predictions are known.
@@ -518,6 +519,7 @@ class IsotonicRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):
return self._call_java("boundaries")
@property
+ @since("2.0.0")
def predictions(self):
"""
Predictions associated with the boundaries at the same index, monotone because of isotonic
@@ -1248,7 +1250,7 @@ class AFTSurvivalRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):
"""
@property
- @since("1.6.0")
+ @since("2.0.0")
def coefficients(self):
"""
Model coefficients.
@@ -1271,12 +1273,14 @@ class AFTSurvivalRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):
"""
return self._call_java("scale")
+ @since("2.0.0")
def predictQuantiles(self, features):
"""
Predicted Quantiles
"""
return self._call_java("predictQuantiles", features)
+ @since("2.0.0")
def predict(self, features):
"""
Predicted value