-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-7388][SPARK-7383] wrapper for VectorAssembler in Python #5930
Conversation
Merged build triggered. |
Merged build started. |
Test build #31938 has started for PR 5930 at commit |
Test build #31938 has finished for PR 5930 at commit
|
Merged build finished. Test FAILed. |
Test FAILed. |
Merged build triggered. |
Merged build started. |
Test build #31943 has started for PR 5930 at commit |
Merged build triggered. |
Merged build started. |
Test build #31944 has started for PR 5930 at commit |
Test build #31943 has finished for PR 5930 at commit
|
Merged build finished. Test FAILed. |
Test FAILed. |
Test build #31944 has finished for PR 5930 at commit
|
Merged build finished. Test PASSed. |
Test PASSed. |
@@ -218,6 +219,22 @@ class BooleanParam(parent: Params, name: String, doc: String) // No need for isV | |||
override def w(value: Boolean): ParamPair[Boolean] = super.w(value) | |||
} | |||
|
|||
/** Specialized version of [[Param[Array[T]]]] for Java. */ | |||
class ArrayParam[T : ClassTag]( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having ClassTag
is not Java friendly. Array[T]
will be translated into Object
in Java to handle both primitive arrays and object arrays. How about adding StringArrayParam
instead of ArrayParam[T]
in this PR?
Merged build triggered. |
Merged build started. |
Test build #31995 has started for PR 5930 at commit |
@@ -22,6 +22,7 @@ import java.util.NoSuchElementException | |||
|
|||
import scala.annotation.varargs | |||
import scala.collection.mutable | |||
import scala.reflect.ClassTag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line.
Test build #31995 has finished for PR 5930 at commit
|
Merged build finished. Test PASSed. |
Test PASSed. |
overload StringArrayParam.w
Merged build triggered. |
Merged build started. |
Test build #32118 has started for PR 5930 at commit |
Test build #32118 has finished for PR 5930 at commit
|
Merged build finished. Test PASSed. |
Test PASSed. |
The wrapper required the implementation of the `ArrayParam`, because `Array[T]` is hard to obtain from Python. `ArrayParam` has an extra function called `wCast` which is an internal function to obtain `Array[T]` from `Seq[T]` Author: Burak Yavuz <brkyvz@gmail.com> Author: Xiangrui Meng <meng@databricks.com> Closes #5930 from brkyvz/ml-feat and squashes the following commits: 73e745f [Burak Yavuz] Merge pull request #3 from mengxr/SPARK-7388 c221db9 [Xiangrui Meng] overload StringArrayParam.w c81072d [Burak Yavuz] addressed comments 99c2ebf [Burak Yavuz] add to python_shared_params 39ecb07 [Burak Yavuz] fix scalastyle 7f7ea2a [Burak Yavuz] [SPARK-7388][SPARK-7383] wrapper for VectorAssembler in Python (cherry picked from commit 9e2ffb1) Signed-off-by: Xiangrui Meng <meng@databricks.com>
LGTM. Merged into master and branch-1.4. Thanks! I left SPARK-7388 open. |
The wrapper required the implementation of the `ArrayParam`, because `Array[T]` is hard to obtain from Python. `ArrayParam` has an extra function called `wCast` which is an internal function to obtain `Array[T]` from `Seq[T]` Author: Burak Yavuz <brkyvz@gmail.com> Author: Xiangrui Meng <meng@databricks.com> Closes apache#5930 from brkyvz/ml-feat and squashes the following commits: 73e745f [Burak Yavuz] Merge pull request apache#3 from mengxr/SPARK-7388 c221db9 [Xiangrui Meng] overload StringArrayParam.w c81072d [Burak Yavuz] addressed comments 99c2ebf [Burak Yavuz] add to python_shared_params 39ecb07 [Burak Yavuz] fix scalastyle 7f7ea2a [Burak Yavuz] [SPARK-7388][SPARK-7383] wrapper for VectorAssembler in Python
The wrapper required the implementation of the `ArrayParam`, because `Array[T]` is hard to obtain from Python. `ArrayParam` has an extra function called `wCast` which is an internal function to obtain `Array[T]` from `Seq[T]` Author: Burak Yavuz <brkyvz@gmail.com> Author: Xiangrui Meng <meng@databricks.com> Closes apache#5930 from brkyvz/ml-feat and squashes the following commits: 73e745f [Burak Yavuz] Merge pull request apache#3 from mengxr/SPARK-7388 c221db9 [Xiangrui Meng] overload StringArrayParam.w c81072d [Burak Yavuz] addressed comments 99c2ebf [Burak Yavuz] add to python_shared_params 39ecb07 [Burak Yavuz] fix scalastyle 7f7ea2a [Burak Yavuz] [SPARK-7388][SPARK-7383] wrapper for VectorAssembler in Python
The wrapper required the implementation of the `ArrayParam`, because `Array[T]` is hard to obtain from Python. `ArrayParam` has an extra function called `wCast` which is an internal function to obtain `Array[T]` from `Seq[T]` Author: Burak Yavuz <brkyvz@gmail.com> Author: Xiangrui Meng <meng@databricks.com> Closes apache#5930 from brkyvz/ml-feat and squashes the following commits: 73e745f [Burak Yavuz] Merge pull request apache#3 from mengxr/SPARK-7388 c221db9 [Xiangrui Meng] overload StringArrayParam.w c81072d [Burak Yavuz] addressed comments 99c2ebf [Burak Yavuz] add to python_shared_params 39ecb07 [Burak Yavuz] fix scalastyle 7f7ea2a [Burak Yavuz] [SPARK-7388][SPARK-7383] wrapper for VectorAssembler in Python
The wrapper required the implementation of the
ArrayParam
, becauseArray[T]
is hard to obtain from Python.ArrayParam
has an extra function calledwCast
which is an internal function to obtainArray[T]
fromSeq[T]