HyukjinKwon commented on a change in pull request #31160:
URL: https://github.com/apache/spark/pull/31160#discussion_r556210918



##########
File path: python/pyspark/ml/feature.pyi
##########
@@ -1633,3 +1569,57 @@ class VarianceThresholdSelectorModel(
     def setOutputCol(self, value: str) -> VarianceThresholdSelectorModel: ...
     @property
     def selectedFeatures(self) -> List[int]: ...
+
+class UnivariateFeatureSelector(
+    JavaEstimator[UnivariateFeatureSelectorModel],
+    _UnivariateFeatureSelectorParams,
+    JavaMLReadable[UnivariateFeatureSelector],
+    JavaMLWritable
+):
+    def __init__(
+        self,
+        numTopFeatures: int = ...,
+        featuresCol: str = ...,
+        outputCol: Optional[str] = ...,
+        labelCol: str = ...,
+        selectorType: str = ...,
+        percentile: float = ...,
+        fpr: float = ...,
+        fdr: float = ...,
+        fwe: float = ...,
+    ) -> None: ...
+    def setParams(
+        self,
+        numTopFeatures: int = ...,
+        featuresCol: str = ...,
+        outputCol: Optional[str] = ...,
+        labelCol: str = ...,
+        selectorType: str = ...,
+        percentile: float = ...,
+        fpr: float = ...,
+        fdr: float = ...,
+        fwe: float = ...,
+    ) -> UnivariateFeatureSelector: ...
+    def setFeatureType(self, value: str) -> UnivariateFeatureSelector: ...
+    def setLabelType(self, value: str) -> UnivariateFeatureSelector: ...
+    def setScoreFunction(self, value: str) -> UnivariateFeatureSelector: ...
+    def setSelectorType(self, value: str) -> UnivariateFeatureSelector: ...
+    def setNumTopFeatures(self, value: int) -> UnivariateFeatureSelector: ...
+    def setPercentile(self, value: float) -> UnivariateFeatureSelector: ...
+    def setFpr(self, value: float) -> UnivariateFeatureSelector: ...
+    def setFdr(self, value: float) -> UnivariateFeatureSelector: ...
+    def setFwe(self, value: float) -> UnivariateFeatureSelector: ...
+    def setFeaturesCol(self, value: str) -> UnivariateFeatureSelector: ...
+    def setOutputCol(self, value: str) -> UnivariateFeatureSelector: ...
+    def setLabelCol(self, value: str) -> UnivariateFeatureSelector: ...
+
+class UnivariateFeatureSelectorModel(
+    JavaModel,
+    _UnivariateFeatureSelectorParams,
+    JavaMLReadable[UnivariateFeatureSelectorModel],
+    JavaMLWritable
+):
+    def setFeaturesCol(self, value: str) -> UnivariateFeatureSelectorModel: ...
+    def setOutputCol(self, value: str) -> UnivariateFeatureSelectorModel: ...
+    @property
+    def selectedFeatures(self) -> List[int]: ...

Review comment:
       cc @zero323 FYI




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to