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

    https://github.com/apache/spark/pull/20070#discussion_r158744230
  
    --- Diff: 
examples/src/main/scala/org/apache/spark/examples/ml/CorrelationExample.scala 
---
    @@ -51,10 +51,10 @@ object CorrelationExample {
     
         val df = data.map(Tuple1.apply).toDF("features")
         val Row(coeff1: Matrix) = Correlation.corr(df, "features").head
    -    println("Pearson correlation matrix:\n" + coeff1.toString)
    +    println(s"Pearson correlation matrix:\n ${coeff1.toString}")
    --- End diff --
    
    Another thing we could improve: `.toString` is redundant here I believe


---

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

Reply via email to