Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/9936#discussion_r49177086
--- Diff: python/pyspark/ml/tests.py ---
@@ -371,6 +378,126 @@ def test_fit_maximize_metric(self):
self.assertEqual(1.0, bestModelMetric, "Best model has R-squared
of 1")
+class RegressorTest(PySparkTestCase):
--- End diff --
@Lewuathe Sorry for late response. What I means is that we can add test for
```numFeatures``` in the current test cases of each algorithm. For example, we
can add
```
>>> model.numFeatures
2
```
after
[here](https://github.com/apache/spark/blob/master/python/pyspark/ml/classification.py#L55)
for ```LogisticRegressionModel```.
The python doctest can also used as examples that users can get how to use
```numFeatures``` from the test case context.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]