diff options
-rw-r--r-- | mllib/src/main/scala/org/apache/spark/mllib/fpm/AssociationRules.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/fpm/AssociationRules.scala b/mllib/src/main/scala/org/apache/spark/mllib/fpm/AssociationRules.scala index 95c688c86a..07eb750b06 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/fpm/AssociationRules.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/fpm/AssociationRules.scala @@ -142,5 +142,10 @@ object AssociationRules { def javaConsequent: java.util.List[Item] = { consequent.toList.asJava } + + override def toString: String = { + s"${antecedent.mkString("{", ",", "}")} => " + + s"${consequent.mkString("{", ",", "}")}: ${confidence}" + } } } |