Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6452#discussion_r31271309
  
    --- Diff: 
mllib/src/test/scala/org/apache/spark/ml/feature/VectorAssemblerSuite.scala ---
    @@ -61,4 +63,39 @@ class VectorAssemblerSuite extends FunSuite with 
MLlibTestSparkContext {
             assert(v === Vectors.sparse(6, Array(1, 2, 4, 5), Array(1.0, 2.0, 
3.0, 10.0)))
         }
       }
    +
    +  test("ML attributes") {
    +    val browser = NominalAttribute.defaultAttr.withValues("chrome", 
"firefox", "safari")
    +    val hour = NumericAttribute.defaultAttr.withMin(0.0).withMax(24.0)
    +    val user = new AttributeGroup("user", Array(
    +      NominalAttribute.defaultAttr.withName("gender").withValues("male", 
"female"),
    +      NumericAttribute.defaultAttr.withName("salary")))
    +    val row = (1.0, 0.5, 1, Vectors.dense(1.0, 1000.0), Vectors.sparse(2, 
Array(1), Array(2.0)))
    +    val df= sqlContext.createDataFrame(Seq(row)).toDF("browser", "hour", 
"count", "user", "ad")
    --- End diff --
    
    space: ```df =```
    
    Should this include a Vector column with numAttributes specified?


---
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]

Reply via email to