You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/09 13:59:50 UTC

[GitHub] [spark] srowen commented on a change in pull request #27841: [SPARK-31077][ML] Remove ChiSqSelector dependency on mllib.ChiSqSelectorModel

srowen commented on a change in pull request #27841: [SPARK-31077][ML] Remove ChiSqSelector dependency on mllib.ChiSqSelectorModel
URL: https://github.com/apache/spark/pull/27841#discussion_r389697685
 
 

 ##########
 File path: mllib/src/main/scala/org/apache/spark/ml/stat/ChiSquareTest.scala
 ##########
 @@ -75,4 +77,34 @@ object ChiSquareTest {
     val statistics: Vector = Vectors.dense(testResults.map(_.statistic))
     spark.createDataFrame(Seq(ChiSquareResult(pValues, degreesOfFreedom, statistics)))
   }
+
+  /**
+   * @param dataset  DataFrame of categorical labels and categorical features.
+   *                 Real-valued features will be treated as categorical for each distinct value.
+   * @param featuresCol  Name of features column in dataset, of type `Vector` (`VectorUDT`)
+   * @param labelCol  Name of label column in dataset, of any numerical type
+   * @return Array containing the SelectionTestResult for every feature against the label.
+   */
+  @Since("3.1.0")
+  def testChiSquare(dataset: Dataset[_], featuresCol: String, labelCol: String):
+  Array[SelectionTestResult] = {
 
 Review comment:
   Nit: break this a little differently? indent more here or wrap the arguments and indent

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org