Github user mengxr commented on the pull request:
https://github.com/apache/spark/pull/1733#issuecomment-51347255
The previous proposal may be hard to implement in Python. Another solution
would be separate goodness-of-fit test from independence test, e.g.,
`chiSqGofTest` and `chiSqIndTest`.
~~~
def chiSqGofTest(counts: Vector)
def chiSqGofTest(counts: Vector, p: Vector)
def chiSqIndTest(counts: Matrix)
def chiSqIndTest[V1, V2](observations: RDD[(V1, V2)])
~~~
We can also add direct RDD support, which may be unnecessary:
~~~
def chiSqGofTest[V](observations: RDD[V], p: Map[V, Double])
~~~
Since we only support `pearson`, we can hide `method` in the public API for
now.
---
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]