Skip to content

Commit 3b5547c

Browse files
committed
Improvements to kernel matrix computation
1 parent 6732005 commit 3b5547c

File tree

1 file changed

+1
-0
lines changed
  • dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/kernels

1 file changed

+1
-0
lines changed

dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/kernels/SVMKernel.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ object SVMKernel {
7878
logger.info("Constructing kernel matrix.")
7979

8080
val kernelIndex = utils.combine(Seq(mappedData.zipWithIndex, mappedData.zipWithIndex))
81+
.filter(s => s.head._2 >= s.last._2)
8182
.map(s => ((s.head._2, s.last._2), eval(s.head._1, s.last._1)))
8283
.toMap
8384

0 commit comments

Comments
 (0)